Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Files Functions Variables Typedefs Macros Groups

Connecting MIDI devices to Bela!

Connect a USB MIDI device to Bela and try out our MIDI API. This example by default opens the MIDI port "hw:1,0,0", which normally corresponds to the first USB device that is plugged in. You can run amidi -l on the terminal to check which devices are available and edit this file accordingly. The device "hw:0,0,0" is (on Bela images v0.3 and above) a virtual MIDI device to the host computer over the USB port.

Every time a MIDI message comes in, the midiMessageCallback() function is called. In this example, we detect NoteOn messages and we use them to generate a sinewave with given frequency and amplitude. We can also write MIDI messages, by sending a sequence of bytes with writeOutput().