Giter Site home page Giter Site logo

arduino-ble-midi's Introduction

Arduino BLE-MIDI Transport

arduino-library-badge

This library implements the BLE-MIDI transport layer for the FortySevenEffects Arduino MIDI Library

Installation

This library depends on the 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 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

#include <BLEMIDI_Transport.h>
#include <hardware/BLEMIDI_ESP32.h>
...
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

#include <BLEMIDI_Transport.h>
#include <hardware/BLEMIDI_ESP32_NimBLE.h>
...
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-ble-midi's People

Contributors

lathoub avatar robertohe avatar alf45tar avatar tyzjames avatar wakwak-koba avatar comoc avatar arik-caspi avatar aselectroworks avatar dacodekid avatar per1234 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.