Patchbox as BLE MIDI Device?

By default there’s no service running ready to accept incoming BLE MIDI connections. However, looks like if you’d connect the Pi to some BLE MIDI device, an ALSA MIDI port would appear for it.

I’ve looked into this, and looks like there’s a btmidi-server program available to accept connections from phone devices. Unfortunately it’s not conveniently available just yet, but can be installed by running these commands:

(I probably had many of the libraries this depends on already installed, if you get compilation errors for missing headers or libraries, try to search the internet for which -dev apt packages to install, possibly running sudo apt build-dep libbluetooth3 would get the necessary libs)

git clone https://github.com/ftonello/bluez/ --branch midi-peripheral bluez
cd bluez
./bootstrap
./configure --enable-midi --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
make tools/btmidi-server
sudo cp tools/btmidi-server /usr/bin/btmidi-server

Then it can be started for example like this:

sudo btmidi-server -v -n "My Pi BLE MIDI"

More information is available here, as well as how to make this into a systemd .service: Raspberry Pi as USB/Bluetooth MIDI host

Not all Android software managed to work with this, but one that did was called Midi Commander

With the server running, once some device connects to it, a usable ALSA MIDI port should appear. (visible for example in aconnect -lio).

1 Like