hi,
Im not too concerned above heavy yet, more native bela and libPD.
No id prefer not to merge the inputs/outputs as one port, as the two ports are completely different usages.
(however, Im happy to select between them, I dont really need both at one time)
the reason is the Virus TI MIDI acts as a midi interface (i.e. midi DIN to other gear , which I have connect to a Radikal Spectralis), whereas the Virus TI Synth is from the local keyboard/synth engine. so different purposes.
I had a look at midi.cpp to see what was required, but the documentation on Alsa and raw midi files is pretty scarce!
so this device has 2 midi ports (2 input, 2 output), but there is only /dev/midi1, e.g. no /dev/midi2 to represent the second port. similarly the raw also device, there is only /dev/snd/midiC1D0
(i suspect this is due to the hw:1,0,1 , rather than hw:1,0 and hw:1,1 ?)
we can also see that both input and output is on one port
e.g.
root@bela1 /etc$ cat /proc/asound/card1/midi0
Virus TI
Output 0
Tx bytes : 162
Output 1
Tx bytes : 0
Input 0
Rx bytes : 403
Input 1
Rx bytes : 30
now I don't know much about ALSA, and as I said i cannot find anything about the raw data format it uses, in particular about how raw ports are treated....
but I did a small test program, and it appears (like your midi.cpp) that no data comes through from port 1 on /dev/midi1
my fear, from the bit of reading Ive done, is that /dev/midi1 is really a legacy interface for alsa/oss, so perhaps it doesn't support multiple ports, perhaps these have to be done via the alsa api? (which amidi uses, and works)
thoughts?