I'm having a good time with my Bela mini, but I would love to be able to ditch the USB to MIDI adapter. Yes it's an OCD thing, but it would make the physical wiring into my setup a lot cleaner and remove a potential point of failure on tour...
Ideally, I'd connect a regular MIDI 5-pin DIN cable through an opto-isolator as usual to the serial input. I'm assuming UART0 is available and that I should keep the signal at 3.3V, rather than the usual 5V?
Two existing solutions I found to handle MIDI through UART:
1- ttyMIDI: http://www.varal.org/ttymidi/
ttyMIDI is a program that allows external serial devices to interface with ALSA MIDI applications.
2- comport pd external: https://github.com/irllabs/Udoo/tree/master/puredata/comport
A PD external for unix/windows to use the serial ports
Both solutions pose some challenges. With ttyMIDI, I'd need to know how to launch it before the pure data patch so that the MIDI device is available (assuming it works with Bela). With the comport external, I'd have to parse the received bytes in PD to rebuild the MIDI messages, which could be more work than I'm willing to do for the sake of removing clutter.
A third option would be writing a new external based on comport to parse the midi messages using an existing C/C++ MIDI library, which I would prefer over option 2.