Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lathoub/arduino-ble-midi
MIDI over Bluetooth Low Energy (BLE-MIDI) 1.0 for Arduino
https://github.com/lathoub/arduino-ble-midi
arduino arduino-library arduino-midi-library arduino-nano arduino-nano-33-ble arduino-nano-rp2040-connect ble ble-midi bluetooth-low-energy esp32 midi rp2040 transport-layer
Last synced: about 10 hours ago
JSON representation
MIDI over Bluetooth Low Energy (BLE-MIDI) 1.0 for Arduino
- Host: GitHub
- URL: https://github.com/lathoub/arduino-ble-midi
- Owner: lathoub
- License: mit
- Created: 2018-10-23T19:45:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-28T17:16:23.000Z (almost 2 years ago)
- Last Synced: 2023-11-07T18:00:08.861Z (about 1 year ago)
- Topics: arduino, arduino-library, arduino-midi-library, arduino-nano, arduino-nano-33-ble, arduino-nano-rp2040-connect, ble, ble-midi, bluetooth-low-energy, esp32, midi, rp2040, transport-layer
- Language: C++
- Homepage:
- Size: 192 KB
- Stars: 185
- Watchers: 19
- Forks: 29
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Arduino BLE-MIDI Transport
[![arduino-library-badge](https://www.ardu-badge.com/badge/BLE-MIDI.svg?)](https://www.ardu-badge.com/BLE-MIDI)This library implements the BLE-MIDI transport layer for the [FortySevenEffects Arduino MIDI Library](https://github.com/FortySevenEffects/arduino_midi_library)
## Installation
This library depends on the [Arduino MIDI Library](https://github.com/FortySevenEffects/arduino_midi_library).When installing this library from the Arduino IDE, the dependency be downloaded and installed in the same directory as this library. (Thanks to the `depends` clause in `library.properties`)
When manually installing this library, you have to manually download [Arduino MIDI Library](https://github.com/FortySevenEffects/arduino_midi_library) from github and install it in the same directory as this library - without this additional install, this library will not be able to compile.
When using `ESP32` consider using NimBLE (`NimBLE-Arduino`).
When using the `Arduino NANO 33 BLE` or `Arduino NANO RP2040 Connect`, you must install `ArduinoBLE`## Usage
### Basic / Default
```cpp
#include
#include
...
BLEMIDI_CREATE_DEFAULT_INSTANCE()
...
void setup()
{
MIDI.begin();
...
void loop()
{
MIDI.read();
```
will create a instance named `BLEMIDI` and listens to incoming MIDI.### using NimBLE for ESP32 with a custom name and turns LED on when its connected
```cpp
#include
#include
...
BLEMIDI_CREATE_INSTANCE("CustomName", MIDI)
...
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);BLEMIDI.setHandleConnected(OnConnected);
BLEMIDI.setHandleDisconnected(OnDisconnected);
MIDI.begin();
...
void loop()
{
MIDI.read();
...
void OnConnected() {
digitalWrite(LED_BUILTIN, HIGH);
}void OnDisconnected() {
digitalWrite(LED_BUILTIN, LOW);
}
```
will create a instance named `BLEMIDI` and listens to incoming MIDI.## Tested boards/modules
- ESP32 (OOB BLE and NimBLE)
- Arduino NANO 33 BLE
- Arduino NANO RP2040 Connect## Other Transport protocols:
The libraries below the same calling mechanism (API), making it easy to interchange the transport layer.
- [Arduino AppleMIDI Transport](https://github.com/lathoub/Arduino-AppleMIDI-Library)
- [Arduino USB-MIDI Transport](https://github.com/lathoub/USB-MIDI)
- [Arduino ipMIDI Transport](https://github.com/lathoub/Arduino-ipMIDI)