Close

Getting BLE MIDI running

A project log for BLE Midi controller conversion of NI KORE

Converting the Native Instruments KORE controller to a BLE/USB MIDI control surface

bjrn-brandalBjørn Brandal 05/21/2020 at 09:430 Comments

So I realized so many of my other hobby projects usually start by massive excitement, then buying everything I need, or think I might need, only to fizzle out by not getting around to get the base and fundamental implementation running. So this time I decided to start from the right end, getting fundamental functionality running FIRST.


So... time to get a running BLE MIDI prototype up.

This is all based on Adafruits' excellent Arduino Core for Adafruit Bluefruit nRF52 Boards. I already had an nRF52840-DK around, so following the instructions from Adafruit I quickly got the dev kit running with Arduino.

Notice that the nRF52840 has on-chip USB in addition to the Jlink programmer USB on the developmment kit. So make sure you are connected to the J-link USB for programming the arduino bootloader, and then change to the "Arduino USB" for the actual Arduino functionality

Install MIDI library

In Arduino, go to Sketch>include library>Library Manager

Chose communication category and search for "MIDI"

Install "MIDI library by Francois Best, lathoub". NOTE: make sure you select and install version 4.3.1. Version 5 and above currently doesnt work ith the Adafruit BLE Midi example, but gives compile error MIDI.hpp:457:20: error: 'class BLEMidi' has no member named 'beginTransmission'

Open midi BLE example from Examples>Adafruit Bluefruit nRF52 Libraries>Peripheral>blemidi

Open the serial monitor and the application will start to run. When code is running you will see LED blink when advertising. And in the serial monitor will show ‘Adafruit Bluefruit52 MIDI over Bluetooth LE Example’

Testing connection (Android)

Install "MIDI BLE Connect" on your Android device. This app is used to route BLE MIDI messages to MIDI capable apps.

Open MIDI BLE Connect and click on the Bluetooth scan button.

Choose "Bluefruit52 MIDI", and as  soon as connected you should see the blinking LED on nRF52840-DK changing to steady on.

Download a MIDI keyboard/synth, for example this:

When opened, click on the MIDI input/output icons and choose "Bluefruit52 MIDI" as the interface

You should now hear the arpeggio play, and also see the midi data from any keys you play in the serial monitor in Arduino.

Getting this up and running so quickly (again BIG thanks to the excellent folks at Adafruit) really fueld my enthusiasm and motivation, and I got cranking on wiring up the KORE controller with Arduino.

Discussions