DIY MIDI Amp knobs.

Great projects, dudes :)
Question though: you've been using these arduino boards. Is it possible to just build something simpler and just analog that would work?
I'm not sure what you mean by "analog" here... in order to send the midi messages you need some sort of digital platform. Arduino is both cheap and easy to source.
 
Great projects, dudes :)
Question though: you've been using these arduino boards. Is it possible to just build something simpler and just analog that would work?
I don't think so. In order to communicate with the Axe-FX and exchange this amount of information you need a programmable controller like an Arduino, Raspberry Pi etc. The only external analog signals that you can send to the AXE-FX are the foot pedals. Fractal have done a great job of allowing you to assign them to a lot of different parameters but not all of them (like Amp tone controls).
 
OK, here is the current version of my Arduino program

https://www.dropbox.com/s/29bf9hegmm79a88/AxeAnalogControl_C11.ino?dl=0

Disclaimer: I am not an expert, not even a student, in programming. I am just a 51 years old hobbyist, and this is only my second project with Arduino (the first one is the Axe-FX foot controller at my signature) I have learnt everything by trial –and-error and frankesteinizing pieces of code from others. The program can write parameters to the Axe-FX but requires debugging on reading them. The display multiplexers and the encoders may have room for improvement in order to speed up the process. As I’ve said, I have abandoned this project while I am programming a MIDI Foot Bass Pedal Synth. Suggestions, improvements and remakes of the program are welcome.
Hi Piing - just downloaded your sketch. Would I be correct in thinking this is only set up for 2 encoders vs the 10 shown in your early photo.?
 
Last edited:
All encoders and displays can be used, but I have only programmed parameters on to two of them for testing purposes, and because I did not have the complete list of parameters (it took me a while to get the parameters of those two using MidiOx because it was the first time I did this). But now that Nero has kindly provided the whole list it, they could all be programmed with different functions.
 
All encoders and displays can be used, but I have only programmed parameters on to two of them for testing purposes, and because I did not have the complete list of parameters (it took me a while to get the parameters of those two using MidiOx because it was the first time I did this). But now that Nero has kindly provided the whole list it, they could all be programmed with different functions.

Thanks thought I'd just check incase you'd somehow come up with a cunning way of running 8 encoders from just 4 I/O pins :)
 
I've been thinking about starting an open source arduino controller project, i already wrote one for my footcontroller that stays in sync, i wrote an app to edit the footcontroller already, i'm going to look into it and maybe make it modular
 
I've been thinking about starting an open source arduino controller project, i already wrote one for my footcontroller that stays in sync, i wrote an app to edit the footcontroller already, i'm going to look into it and maybe make it modular
does your controller "that stays in sync" have the same audio facets and dropping and wobble like AxeEdit?
 
Thanks thought I'd just check incase you'd somehow come up with a cunning way of running 8 encoders from just 4 I/O pins :)

There are rotary encoders with serial output that can be daisy-chained. So address space size would be the limiting factor.
 
Thanks thought I'd just check incase you'd somehow come up with a cunning way of running 8 encoders from just 4 I/O pins :)

I have wired all the 10 rotary encoders and their pushbuttons. The Arduino Mega has plenty of IO's! But I have only written program for a couple couple of encoders.

Rotary01.jpg

Rotary02.jpg

Rotary03.jpg

Rotary04.jpg
 
This type of project seems to be promising! I am very interested in the final solution. You guys are amazing!
 
Thanks for sharing guys. Lots of great info you all provided out there. I have a Pi and Arduino Mega and have done many projects with both of these over the years. It was interesting looking at the code in this thread and comparing it to mine. This code was very easy to understand, once I figured out all the variables were global. It actually made it easy to follow. :) I am no expert and just do it as a hobby, so I can appreciate the different ways we all approach things.

I have never messed with Midi and while looking for optoisolators I thought... heck with this. I am going to use the USB instead. I ran into a snag where if the AX8 is not polled fast enough (it seems), it stops outbound communication until you reboot the AX8. I am able to send at will and am using rotary encoders for this. I also am using an 8-bit TFT display. The write time for the display holds things up for the polling and is part of the problem.

I was hoping maybe someone out there has already messed with the Fractal USB? I wrote some USB code for the Fender Mustang III for the pi, android, and Arduino and it was a lot of work. Hope to not have to figure all of that out again. The more it comes to hardware, interrupts and drivers, the more it gets out of my comfort zone.

I was wondering if the messages are always 64 bytes, or are they variable coming from USB? Anyone else run into choking the poor thing out? On the Fender Mustang, if you didn't poll the usb, the unit would stop working or get very very slow. I think Fractal was smart and chose to just cut off the routine to usb "out" thinking performance playing was more important. It seems very sensitive to this. I guess with the true midi ports, it doesn't matter. I am using the USB Host library and shield and used the <usbh_midi> library. I think this library waits for 64 bytes to arrive and maybe that is part of the issue.

I have USB send working on both devices but have not played with receive on the Pi yet.

This is something I plan on sharing, if I get something that works. Others might be interested in using USB and ditching the Midi cables. (maybe not :) )

Sorry if this is confusing. I am thinking as I am typing.
 
Thanks for sharing guys. Lots of great info you all provided out there. I have a Pi and Arduino Mega and have done many projects with both of these over the years. It was interesting looking at the code in this thread and comparing it to mine. This code was very easy to understand, once I figured out all the variables were global. It actually made it easy to follow. :) I am no expert and just do it as a hobby, so I can appreciate the different ways we all approach things.

I have never messed with Midi and while looking for optoisolators I thought... heck with this. I am going to use the USB instead. I ran into a snag where if the AX8 is not polled fast enough (it seems), it stops outbound communication until you reboot the AX8. I am able to send at will and am using rotary encoders for this. I also am using an 8-bit TFT display. The write time for the display holds things up for the polling and is part of the problem.

I was hoping maybe someone out there has already messed with the Fractal USB? I wrote some USB code for the Fender Mustang III for the pi, android, and Arduino and it was a lot of work. Hope to not have to figure all of that out again. The more it comes to hardware, interrupts and drivers, the more it gets out of my comfort zone.

I was wondering if the messages are always 64 bytes, or are they variable coming from USB? Anyone else run into choking the poor thing out? On the Fender Mustang, if you didn't poll the usb, the unit would stop working or get very very slow. I think Fractal was smart and chose to just cut off the routine to usb "out" thinking performance playing was more important. It seems very sensitive to this. I guess with the true midi ports, it doesn't matter. I am using the USB Host library and shield and used the <usbh_midi> library. I think this library waits for 64 bytes to arrive and maybe that is part of the issue.

I have USB send working on both devices but have not played with receive on the Pi yet.

This is something I plan on sharing, if I get something that works. Others might be interested in using USB and ditching the Midi cables. (maybe not :) )

Sorry if this is confusing. I am thinking as I am typing.


I had a lot of issues with the host shield and my AX8, turned out i needed the updated micro firmware on my AX8, the micro firmware had a bug when sending midi sysex where each sysex byte was sent in an individual packet and every code index number was 5, their latest micro update fixed it, I got my AX8 not long after release so a newer AX8 should have the latest micro.

Try this sketch


Code:
#include <usbh_midi.h>
#include <usbhub.h>
USB Usb;
USBH_MIDI  Midi(&Usb);
bool testComplete = false;

void setup(){
  Serial.begin(115200);
  if (Usb.Init() == -1) {
    while (1);
  }
  delay( 200 );
}
void loop(){
  Usb.Task();
  if(Usb.getUsbTaskState() == USB_STATE_RUNNING){
    if(!testComplete){
      pollMIDI();
    }
 
  }
}
void pollMIDI(){
  uint8_t size;
  uint8_t incomingDataBuffer[4];
  do {
    if((size = Midi.RecvRawData(incomingDataBuffer))>0){
      Serial.println("Reading packet");
      uint8_t cin = incomingDataBuffer[0] & 0x0F;
      if((incomingDataBuffer[0] & 0x0F) != 5){
        testComplete = true;
        Serial.println("ALL GOOD");
      }
   
    }
  } while(size>0);
}

Open your serial monitor, connect the AX8 and turn on the tuner, If you keep seeing "Reading Packet" and you don't see "ALL GOOD" then you gotta contact fractal support and ask them that you want to update your micro firmware

In that function "Midi" is the usb midi object
 
Thank you for the code and your time. I tried it and am getting :read packet when I engage the tuner. These are the same functions I am using with my code and I get the same lockup result when I start turning the knobs.

I decided to hook it up to my Pi and have a look. I did a midi dump and everything looked as I would expect. It seems my arduino is just showing me garbage. I have been trying to figure out what all of these 5's are. Here is a sample of the output in my arduino code:

05 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 F0 00 00 05 00 00 00 05 01 00 00 05 74 00 00 05 08 00 00 05 29 00 00 05 00 00 00 05 24 00 00 05 F7 00 00 05 06 00 00
05 00 00 00 05 01 00 00 05 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 F0 00 00 05 00 00 00 05 01 00 00 05 74 00 00 05 08 00 00 05 29 00 00 05 00 00 00 05 24 00 00 05 F7 00 00 05 06 00 00
05 08 00 00 05 02 00 00 05 6A 00 00 05 00 00 00 05 01 00 00 05 00 00 00 05 7D 00 00 05 05 00 00 05 00 00 00 05 01 00 00 05 00 00 00 05 00 00 00 05 00 00 00 05 00 00 00 05 30 00 00 05 2E 00 00
05 31 00 00 05 32 00 00 05 00 00 00 05 00 00 00 05 F7 00 00 05 F0 00 00 05 00 00 00 05 01 00 00 05 74 00 00 05 08 00 00 05 0E 00 00

and on and on

where as the Pi:
20:0 System exclusive F0 00 01 74 08 29 00 24 F7
20:0 System exclusive F0 00 01 74 08 0E 03 4A 10 53 06 03 4E 18 63 06 03 52 20 23 07 03 5E 28 03 07 03 62 30 2B 78 03 42 7C 4F 7A 02 26 51 73 06 02 42 01 60 07 F7
20:0 System exclusive F0 00 01 74 08 29 00 24 F7
20:0 System exclusive F0 00 01 74 08 0E 03 4A 10 53 06 03 4E 18 63 06 03 52 20 23 07 03 5E 28 03 07 03 62 30 2B 78 03 42 7C 4F 7A 02 26 51 73 06 02 42 01 60 07 F7
20:0 System exclusive F0 00 01 74 08 29 00 24 F7
20:0 System exclusive F0 00 01 74 08 0E 03 4A 10 53 06 03 4E 18 63 06 03 52 20 23 07 03 5E 28 03 07 03 62 30 2B 78 03 42 7C 4F 7A 02 26 51 73 06 02 42 01 60 07 F7
20:0 System exclusive F0 00 01 74 08 29 00 24 F7

I wasn't even trying to decipher the output yet and didn't realize how messed up it was. I got fixated on the locking up thing instead.

My AX8 is just over a year old now. Is this the result you are talking about?

So...why does it work on the Pi and not the USB host? My brain is missing something, obviously.

Thank you,
Don
 
Yes, go to the main fractal site and go to support and file a support ticket explain that midi sysex is not class compliant on your AX8 and they will help you, once u update the micro firmware it will work.

The reason it works on your pi and it works on mac n pc is because they have safe guards on those drivers, the host shield doesnt have it
 
The 0x05 is the code index number of the midi packet, 0x05 means that the message is a system exclusive ending with the next byte in the packet, your AX8 is sending that CIN for each message so the midi driver for the shield things the end of the system exclusive message was reached when in reality it hasnt ended, the pi runs linux i think so it had a more mature driver than the host shield that prevents that error by doing something like

If(CIN == 0x05 && firstByteOfPacker != 0xF7){
continue;
}

http://www.usb.org/developers/docs/devclass_docs/midi10.pdf

Thats the class definition for midi page 16 has the CIN table
 
Back
Top Bottom