Skip to content

An Arduino library to use Midi over BLE (Bluetooth Low Energy), on ESP32 boards

License

Notifications You must be signed in to change notification settings

mrichana/ESP32-BLE-MIDI

Repository files navigation

ESP32-BLE-MIDI

An Arduino library to use Midi over Bluetooth Low Energy (BLE) on ESP32 boards.

Quick start

#include <Arduino.h>
#include <BLEMidi.h>

void setup() {
  Serial.begin(115200);
  Serial.println("Initializing bluetooth");
  BLEMidiServer.begin("Basic MIDI device");
  Serial.println("Waiting for connections...");
  //BLEMidiServer.enableDebugging();  // Uncomment if you want to see some debugging output from the library
}

void loop() {
  if(BLEMidiServer.isConnected()) {             // If we've got a connection, we send an A4 during one second, at full velocity (127)
      BLEMidiServer.noteOn(0, 69, 127);
      delay(1000);
      BLEMidiServer.noteOff(0, 69, 127);        // Then we stop the note and make a delay of one second before returning to the beginning of the loop
      delay(1000);
  }
  delay(1);   // we feed the ESP32 watchdog when there is no connection
}

Changes

    • 2021-03-02
      • Added pitch bend callback
      • Added a range parameter for pitch bend sending
    • 2021-03-11
      • Added an a new overload for pitch bend sending
  • v0.1.1

    • 2020-12-29
    • 2020-12-30
      • Implemented packet timestamps

Future work

  • Implement missing features (aftertouch, etc).

  • Add some more examples

  • Add documentation, with Doxygen ?

  • Add keywords.txt for Arduino IDE

  • Add support for realtime messages ?

  • Add debugging messages in BLEMidiServer ?

  • Check that incoming messages format is correct

  • Add support for running status messages

  • Better debug function

Thanks

Thanks to the authors of those pages / pieces of code :

Message to users

If you make some noise with it, I would be glad to see your projects ! Don't hesitate to drop me an e-mail.

Donations

I work on this project for pleasure, but if you think it is worth some money, feel free to send me the amount you want, via Paypal or Bitcoin.

PayPal Bitcoin

1AM3HCBRrXQcQMFckB1LH1VZvxbecvVxJd

About

An Arduino library to use Midi over BLE (Bluetooth Low Energy), on ESP32 boards

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 94.7%
  • C 4.9%
  • Makefile 0.4%