Hi,
I've been trying for a while now to get a BLE MIDI device to work with Bela and Faust. I have it basically working now, but it's a bit awkward. I wonder if I could be doing it better ...
I first got a non-Faust example to work, although I had to change the "port name" passed to the midi.readFrom() and .writeTo() methods from "hw:1,0,0" to "virtual", to create a virtual device, and then use aconnect on the cmdline to route notes from my BLE footswitch's virtual audio device to the virtual device created by the bela program.
Then I figured out that I could do the same thing by modifying the render.cpp generated by faust2bela, replacing 0 with "virtual" in the corresponding calls to .readFrom() and .writeTo() . But I still have to manually create the connection between two virtual midi devices using aconnect .
What I haven't found yet is a way to get a Bela program to recognize that my "virtual" BLE MIDI device is the only attached MIDI device on my system, and to use it by default. Maybe that's what an argument of 0 is supposed to accomplish, but it doesn't seem to work.
If there's a "hw:*" pattern that will match my BLE MIDI device, I haven't found it. This may have something to do with how BLE MIDI is implemented in the bluez stack (I'm running v5.50 at the moment.) I don't see why a BLE MIDI device is "virtual" while a USB MIDI device is "hardware". But those are Linux issues, not Bela-specific ones. I just wonder if anybody can suggest a way to get this device recognized & used by Bela programs automatically, without having to log in & run aconnect .
Thanks in advance,
-mykle-