Raspberry Pi as hub for USB midi devices - advice?


#3

yeah, axoloti works fine connected to rPI, and appears as a alsa midi device.
(ive been doing this, in fact with multiple axolotis connected , and also a few controllers)

you could write it in node.js, or anything thats supports midi e.g. Pd.
(I use C++, but thats just because its my preferred tool :))

the currently limitation is its tricky (not impossible) to get parameters information back from axoloti,
this is ok if you drive it all from the PI, but if you want two way info (e.g. because the patch changes), this takes more work.
this will hopefully improve in the next version of the Axoloti firmware, but be clear, it will still require programming on your part... (though once its done, Im considering writing an OSC bridge, when I get time)


Midi between boards
#4

Yes I did exactly that in python for my C.H.I.P, which is a similar platform to Raspi and I am super happy with the result. I've been meaning to publish this in the community but since I've been mentioned, here you go.
Feel free to use the code, I put the code on github https://gist.github.com/logsol/f9532b5799c5c12c8e15f99b077a7a55

It is very fresh and not fully tested yet but I already did two jams with it for a couple of hours and it was nicely fast and stable when the Axoloti was connected directly to the chip via usb.

The controllers should send from midi channel 1 and then they are being mapped to a new channel based on the channelMap in the script. This way you can know what controller your data is coming from in Axoloti and you can send midi data back via the same channel. It is also fully plug&play so you you should be able to start it on boot and plug and play axoloti and controllers as you go.

Let me know if it works for you on your Raspberry


#5

Thanks, y'all! I don't think I need actual data back from the Axoloti so long as I'm sending the midi from the pi - I'll make the lcd report the midi data itself - but it would be cool to have two way usb interaction with the Axoloti internals.

I'm excited by this! I just wish the patcher worked properly on the pi. That would be an amazing all-in-one workstation!


#6

Damn. Chips on back order.......

I was sleeping


#7

Hi there . Im happy to had spent some time with the new update and with mido library in Python . Following on @logsol idea and after a lot of brainstorming and dreaming of it with @Blindsmyth, I gave it a go and it works really well I must say .

Let me know your thoughts . Its no big deal yet , but the potential is clear.

Im driving now my poliphonic patch with my microbrute and using Launchcontrol XL simultaneously on the same usb in the axo like a charm .

Will keep reporting :wink:


#8

Hi Carlo, nice to see this idea being developed further and thanks for the mentions! What’s the reason you moved away from rtmidi to mido? And are there any new features in your version? :slight_smile:


Multiple Midi Controllers Working ! + Ableton Link and other dreams
#9

Hey @logsol I just started out fiddling with your gist and then found mido by chance searching for midi over TCP and Multiport input. No real reason behind , i just liked how simple the scripting is .

For now just testing out how to have the keyboard notes+ pitchbend from the microbrute and an extra controller to modulate the axoloti patch. Im having some trouble at the moment with polyphony , I will get back to it and report to you guys .


#10

Hey hey ,
continuing with this. I have now all the notes from my analog synth keyboard to axoloti , and the LaunchControl XL sending CC working flawlessly.

Im making some more tests , add some argument parser so you can use the script with your own controllers without editing it .

Probably now that I have the pi on the game I will experiment with ableton link too and some synthesis in the headless pi .


#11

this is very nice!
It makes me wonder: if I had several controllers and several axolotis and I use this to manage midi communication via usb between all of them. The raspberry pi is like the center hub for everything. Would it be possible that the pi also manages communication between computer and the axoloti? Especially managing the connection with the patcher?


#12

All you can think of in those terms is possible between the 4 onboard usb ports. Needless to say that you can also attach a MIDI DIN breakout board to the pi and have an additional IN / OUT DIN for anything else.
There are many ways to control a computer from a pi, it doesn't require midi necessarly if it's not too time sensitive but you could I guess.


#13

This looks neat too. And you can change the midi routing "scenes" on the fly


#14

mididings!
that's what i used on my Linux laptop back in the days.

but i wonder is it still maintained at all, since it's written in python2, an last commit on github was in 2015…


#15

I might try it soon and report back if I get trouble with my current project. It is old indeed but based on pretty solid libraries so I dont think that could be a problem anytime soon before MIDI 2.0 :slight_smile:

I've just installed the script and it works , at last nothing its broken, will report again when I test it out with some controllers.

btw Middings is such a wonderful tool . I will replace my system with this if its stable ,since my current setup uses python and mido , but mididings seems to run in lower level (C++) and uses python as interface

MIDIDINGS start


#16

Im following this method described here now , to get UART midi as a midi device into the equation as well


#17

thanks for the idea of using Pi for USB MIDI hub job.

installed Alpine Linux, built RT kernel, wrote udev rules for Axo & controllers that invoke aconnect.
just works.


#18

Hey Never heard of this distro , will look at it. AT the moment I use raspbian lite and as you said
aconnect -i after

ttymidi -s /dev/ttyAMA0 -b 38400 &

just works here too ! Just waiting for a pack of jumper wires to test it .

This will be super cool since I can use 4 onboard usb's + 1 tty serial midi to axoloti smoooooth

And even if old , i think I will be using mididings instead of my old approach

I just felt in love with mididings after reading the docs , the scenes system is just too good and all the other commands , sweeeet

putting together a small gist to remember all the steps pi_MIDI_brain

another useful gist to setup a "minimal" general purpose list of useful things for getting started into headless realms with the pi


Raspberry && Axoloti ❤️️ Thread
#19

Alpine is ultra-small & lightweight.
singnificantly lighter than mainstream distros (and perfectly runs from RAM).

Mididings are nice, but don't have „proper“ NRPN support — which is major PITA if you have to talk to e.g. Novation gear.
of course, workaround can be done treating NRPN message as a sequence of four CC — but that's pretty tricky.


#20

well cool . Is working smooth . I will open a new thread soon . Just got UART midi in & out working flawleslly ,
moded the extra-midi-io script to receive midi clock too


#21

Do you get consistent 31250 baud rate midi in on the pi RX with your method @chaocrator ?
In my side receiving from axo is working well , but sending unfortunately not.
I tried a fork of ttymidi with arbitrary baud rates available but still


#22

i use Pi only for USB MIDI, so can't tell.