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.