you can run on the console at the bottom of the IDE:
this will return something like this:
Dir Device Name
IO hw:0,0 f_midi
IO hw:1,0,0 nanoKONTROL2 MIDI 1
IO hw:2,0,0 SomethingElse
where the first one is the virtual MIDI interface to the computer, and the others are the ones that are plugged in. On Bela, Pd by default only opens the port called
1,0,0, which is the first USB MIDI device you plugged in. You can add more to those. For instance, to add port
[hw 2 0 0(
there are more details in the hello-midi example .
Once you have multiple ports set up, the messages you receive and send from them will be on different channels. For instance, the first interface that was enabled will have channels 0-15, the next one will be 16-31 and so on. Check the log at the bottom of the Bela IDE to see what the current state of the MIDI ports is.