Raspi as a USB MIDI Host on Patchbox OS

I plan to use my Raspi as a USB MIDI Host on Patchbox OS for my multiple instruments.

I know that amidiauto would route the USB devices automatically, but they are actually not all connected together.

For example, with amidiauto, both my Digitakt and my midi keyboard are able to control software instruments in Orac/Modep. However, I can not control my Digitakt using my midi keyboard.

I tried to use Patchage to route the devices manually, and it actually works. But this would impact the auto-routing (of amidiauto) when I activated modules such as Modep.
The structure is like all USB devices are connected to the software, and they are also segregate by the software.

I also tried the method here: Raspberry Pi as USB/Bluetooth MIDI host (neuma.studio)
It also works if I only want a midi host. The function of amidiauto would be impact.

Does anyone know any method to connected all midi devices together automatically, while keep the software midi function still working?

Hi, check out the amidiminder by mrzero utility which gives more control over the routings:

You should write up the rules according to your setup for it do what you’re after.