I'm trying to find out if there is a way to assign a static port number for a MIDI device. I'm trying to run a pd-l2ork patch on startup but because you can't connect MIDI devices to pd-l2ork and because patchd2 doesn't work on RPi, I'm trying to make the connection with alsa aconnect and it seems to work so far except that every time I add or disconnect a USB device, the RPi starts up with a different port for my MIDI controller. I'm trying to figure out if there is a way to set a static port for that particular MIDI device no matter which USB port its connected to or what other USB peripherals I'm using.
I haven't been able to find anything about it in the ALSA documentation although admittedly I don't understand too much of it. I imagine that I could also use a command similar to aconnect that can refer to the MIDI device name instead of its port if such a thing exists.
Any help is greatly appreciated.