Configuring mother.pd to recognize multiple MIDI devices

Hi, I’m trying to get my organelle to recognize separate MIDI devices for in and out (dev1 for in, dev2 for out) as a normal protocol so I don’t have to connect a monitor and change it through the GUI manually every time. I figure I could do so by putting a message straight to pd in the mother.pd patch and loadbanging it:

pd …

I can’t seem to figure out the right command to send though. I tried -midiindev, but i think it only works as a startup flag. I’d appreciate any advice I can get. Thanks!

1 Like

Figured out that the command to send is “midi-dialog” with a string of settings numbers after and it’s working now, but weirdly it only works when the organelle is in GUI mode. Does anyone know why that would be or how to change this? @oweno this seems like your wheelhouse perhaps?

hmm, seems like it should work. When the graphical desktop is not running and you select a patch, Pd is started with the -nogui flag. The Pd GUI is a totally separate process, so my first thought was perhaps sending midi-dialog params depends on the GUI process, but a quick look at the source makes me think it should work even without GUI running. I assume it is fired off with a loadbang? maybe have [delay 100] just to make sure everything is initialized. Can you attach patch?

here’s the pic of part of the mother.pd I’m using; besides the loadbang–>delay–>midi-dialog message it’s all vanilla. The midirouting patch i’m using to test is literally just a notein—>noteout. I tried putting the whole deal in the midirouting patch, and also tried putting the notein–>noteout into the mother.pd. Same deal with all of them—when it’s in gui mode it works, when it’s not it does not.

There might be something getting printed out (error or otherwise) that that you are not able to see (the output from Pd is suppressed when run in non gui mode).

Running Pd manually might shed some light on it. In the graphical desktop, click on a terminal (bottom left), and then you can launch Pd just like the Organelle does, but now you’ll be able to see the output. Make sure you quit Pd if it is running already. Then run:

pd -rt -nogui -audiobuf 4 /root/mother.pd /usbdrive/Patches/your_patch

I launched both patches and also just mother.pd by itself, in both gui and nogui mode. Same deal, success with GUI mode none in nonGUI, and the console looked the same both ways:

tb_peakcomp~v1.0 2013 Two Big Ears
upsend: connecting to port 4001

No errors, no nothing. Interestingly, I also tried specifying the midi routing with configuration flags from the terminal (-midiindev 1 -midioutdev 2) and that didn’t work either. I really have no idea what could be causing this…

It might be a bug, or just the way it works. The internal Pd messages are not very well documented and might work in strange ways.

Do the midiindev / midioutdev flags work in GUI mode (starting pd from terminal without -nogui) ?

Alternatively, you can save the MIDI settings from Pd, discussed a little here:

So is there an easy way of connecting multiple MIDI controllers to the Organelle? I would really like to use a MIDI interface along with my QuNeo. I know nothing about how to do things on Linux. :slight_smile:


1 Like