Midi connection manager

If I only want to make connections between all plugged hardwares, am I simply add the lines in amidiauto.conf as

[allow]
hw <-> hw

What I need is to use Pisound as a MIDI host, for the connection with Digitakt and several controllers.

1 Like

At the moment you have to explicitly mention the names of the virtual MIDI ports if you want connections of ports in the same hardware category.

So something like:

[allow]
pisound <-> digitakt

and more lines like above. Use aconnect -l to see the port names, also the rules are case sensitive.

1 Like

Thanks @Giedrius! It’s working!

I’m curious to know what the Midi Through MIDI device is.

Also, may I know is there a way I can run SuperCollider before amidiauto? Imagine I would like to do this:
scide MIDIClient.init MIDIIn.connectAll &

I’m not sure if I can do above on IDE, I want SC starts and initialize MIDIClient and connect all available ports, then let amidiauto recognize all the virtual ports from SC. I don’t need s.boot; as all I would like to do is use SC only as a MIDI dispatcher.

I don’t think the order of startup is important, amidiauto does its work for all the ports it found on startup, as well as any ports appearing dynamically at runtime. Other software is free to make their own connections, amidiauto won’t disconnect them.

1 Like

Thanks! It is wonderful!

Hi Giedrius,
Ive just realized when I activate the ORAC 2.0 Module, that the Amidiauto Midi configs dont work anymore, but all the devices connects to Pure Data. When I deactivate the ORAC Module, everything works again. Any idea to solve this?
Here is the aconnect -l output with Orac activated:

client 0: 'System' [type=kernel]
0 'Timer           '
1 'Announce        '
    Connecting To: 128:0, 129:0

client 14: ‘Midi Through’ [type=kernel]
0 ‘Midi Through Port-0’
Connecting To: 129:0[real:0]
Connected From: 129:0
client 20: ‘pisound’ [type=kernel,card=1]
0 ‘pisound MIDI PS-0Z7FE7V’
Connecting To: 129:0[real:0], 130:0
Connected From: 129:0, 130:1
client 24: ‘OP-Z’ [type=kernel,card=2]
0 'OP-Z MIDI 1 ’
Connecting To: 129:0[real:0], 130:0
Connected From: 129:0, 130:1
client 28: ‘OP-1 Midi Device’ [type=kernel,card=3]
0 ‘OP-1 Midi Device MIDI 1’
Connecting To: 129:0[real:0], 130:0
Connected From: 129:0, 130:1
client 130: ‘Pure Data’ [type=user,pid=594]
0 ‘Pure Data Midi-In 1’
Connected From: 20:0, 24:0, 28:0, 129:0, 131:0[real:0], 133:0, 134:0
1 ‘Pure Data Midi-Out 1’
Connecting To: 20:0, 24:0, 28:0, 129:0[real:0], 132:0, 134:0
client 131: ‘MEC MIDI OUTPUT’ [type=user,pid=653]
0 'MIDI OUT ’
Connecting To: 130:0[real:0], 129:0[real:0]
client 132: ‘RtMidiIn Client’ [type=user,pid=794]
0 'TouchOSC Bridge ’
Connected From: 130:1, 129:0
client 133: ‘RtMidiOut Client’ [type=user,pid=794]
0 'TouchOSC Bridge ’
Connecting To: 130:0, 129:0[real:0]
client 134: ‘pisound-ctl’ [type=user,pid=807]
0 'pisound-ctl ’
Connecting To: 130:0, 129:0[real:0]
Connected From: 130:1, 129:0

Yes, ORAC module has its own amidiauto.conf file, you can customize it here:

/usr/local/patchbox-modules/orac/amidiauto.conf

and re-activate ORAC.

Hi, another questions here regarding Mac to Midi over Wifi.
I have Pi and Mac in the same network, and want to send Sync data from Mac to Pisound,
I have set it up as stated here: https://help.ableton.com/hc/en-us/articles/209071169-Sending-and-receiving-MIDI-messages-using-a-virtual-MIDI-network

Thats working, and Mac seems to send data to Pisound, but the devices connected to PIsound by USB dont receive the Sync data from Mac.
When I check on aconnect RtMidi Client is connected to everything, I also tried to connect RtMidiOut to OP-1 for example with amidiconf, using it with ORAC currently.
Any idea what could be missing? Thanks!

client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
        Connecting To: 128:0, 129:0
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
        Connecting To: 129:0[real:0]
        Connected From: 129:0
client 20: 'pisound' [type=kernel,card=1]
    0 'pisound MIDI PS-0Z7FE7V'
        Connecting To: 24:0, 129:0[real:0], 131:0, 28:0
        Connected From: 129:0, 131:1
client 24: 'OP-Z' [type=kernel,card=2]
    0 'OP-Z MIDI 1     '
        Connecting To: 129:0[real:0], 131:0, 28:0
        Connected From: 20:0, 129:0, 130:0, 131:1
client 28: 'OP-1 Midi Device' [type=kernel,card=3]
    0 'OP-1 Midi Device MIDI 1'
        Connecting To: 131:0, 129:0[real:0]
        Connected From: 131:1, 20:0, 24:0, 130:0, 134:0, 129:0
client 130: 'pisound-ctl' [type=user,pid=674]
    0 'pisound-ctl     '
        Connecting To: 24:0, 129:0[real:0], 131:0, 28:0
        Connected From: 129:0, 131:1
client 131: 'Pure Data' [type=user,pid=593]
    0 'Pure Data Midi-In 1'
        Connected From: 20:0, 24:0, 130:0, 129:0, 132:0, 132:0[real:0], 134:0, 28:0
    1 'Pure Data Midi-Out 1'
        Connecting To: 20:0, 24:0, 130:0, 129:0[real:0], 133:0, 28:0
client 132: 'MEC MIDI OUTPUT' [type=user,pid=677]
    0 'MIDI OUT        '
        Connecting To: 131:0, 131:0[real:0], 129:0[real:0]
client 133: 'RtMidiIn Client' [type=user,pid=773]
    0 'TouchOSC Bridge '
        Connected From: 131:1, 129:0
client 134: 'RtMidiOut Client' [type=user,pid=773]
    0 'TouchOSC Bridge '
        Connecting To: 131:0, 129:0[real:0], 28:0

How did you check that the Raspberry Pi is actually receiving the messages from your Mac? You ought to have some process on RPi side able to receive the Mac MIDI messages, I don’t think I see such a process in the attached client list.

Then I probably didnt see it. I was thinking that RtMidiIn and Out are connected to 28:0, which in that time is OP-1. What kind of information do you need to verify?
I can only say that I had added sucessfully PIsound / Rapsberry to the Virtual Midi Network.
Thanks, Im sorry If my information isnt accurate, trying to do my best.

hi, i would like to send the midi in to midi out of the pisound card, but i don’t see those port whith aconnect -l command; can some one help me? thanks

You should see Pisound’s MIDI ports listed in a way similar to this:

client 20: 'pisound' [type=kernel,card=1]
    0 'pisound MIDI PS-0Z7FE7V'
        Connecting To: 24:0, 129:0[real:0], 131:0, 28:0
        Connected From: 129:0, 131:1

In my experience, the most usual client number is 20:0, so you can try running aconnect 20:0 20:0 to forward incoming data directly to the output.

In amidiauto.conf, i have to write 20<->0 ?

I’m sorry, but still dont understand how the amidiauto.conf file as to be writen. I want to use the midi din5 output as a midi thru from the midi din5 input. Help!!

I meant you can execute aconnect 20:0 20:0 to make the direct connection.

You can put this in /etc/amidiauto.conf:

[allow]
* <-> *
pisound <-> pisound

Afterwards, restart amidiauto server for the changes to take effect:

sudo systemctl restart amidiauto

Running aconnect -l will then produce:

...
client 20: 'pisound' [type=kernel,card=1]
    0 'pisound MIDI PS-2RZAMPG'
        Connecting To: 20:0
        Connected From: 20:0
...

Thank you very much for the help, i will try it as soon as possible!

Hi Gedrius,
I did your tips and it works like a charm! I realise now how easy was that, thank you for your patience!

1 Like

Thanks a lot for that super handy deamon. Works like a charm!

1 Like

hey there, after a couple of failing hours i registered here to hopefully get my problems out of the way.

i‘m trying to headless connect different usb gear but i have zero luck. i tried to connect it via amidiauto and the amidiauto.conf route, but nothing seems to work. its starts with aconnect -li where my devices have longer names. in my case i try to connect the squarp pyramid with the minilogue. the client names are already a bit confusing:

client 28: ‘Pyramid MIDI USB’
0 ‘Pyramid MIDI USB MIDI 1’

and for the minilogue:

client 20: ‘minilogue’
0 ‘minilogue MIDI 1’
1 ‘minilogue MIDI 2’

not sure which one is the right one. i guess i tried them all already in the amidiauto.conf:

[allow]
*<->*
Pyramid USB MIDI <-> minilogue

(and every other combination i can think of).

strangly, when i try to connect them via:
aconnect ”Pyramid“ ”minilogue:1”
it works just fine.

it feels like my config file is not recognized or something, i can literally write anything in it and nothing yields problems.

would anyone be so kind and enlighten me? tried pretty much everything from this thread :frowning:

You have to restart the amdiiauto service every time you change the config - it doesn’t autodetect changes. You can restart it by running:

sudo systemctl restart amidiauto

Also, it may output something useful in its log, you can see it by running:

sudo journalctl -u amidiauto

Press ‘end’ button on the keyboard to go to the latest log lines.

Btw, a space on both sides of the <-> could be necessary. :slight_smile:

If I remember right, ALSA uses substrings to match for device names, the first one it finds that fits the substring is the one it uses, so this way, you may use partial names in the config.