Skip to content

Instantly share code, notes, and snippets.

@01GOD
Forked from RyoKosaka/BLE-MIDI_test.ino
Created September 4, 2023 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 01GOD/eea574e34b58079b034ddc1d3583ee21 to your computer and use it in GitHub Desktop.
Save 01GOD/eea574e34b58079b034ddc1d3583ee21 to your computer and use it in GitHub Desktop.
#include <BLEMIDI_Transport.h>
#include <hardware/BLEMIDI_ESP32.h>
BLEMIDI_CREATE_INSTANCE("E-Drum",MIDI);
int tempo = 280;
void setup()
{
MIDI.begin(10);
}
void loop()
{
MIDI.sendNoteOn(36, 100, 10);
MIDI.sendNoteOff(36, 0, 10);
MIDI.sendNoteOn(44, 100, 10);
MIDI.sendNoteOff(44, 0, 10);
delay(tempo);
MIDI.sendNoteOn(44, 100, 10);
MIDI.sendNoteOff(44, 0, 10);
delay(tempo);
MIDI.sendNoteOn(38, 100, 10);
MIDI.sendNoteOff(38, 0, 10);
MIDI.sendNoteOn(44, 100, 10);
MIDI.sendNoteOff(44, 0, 10);
delay(tempo);
MIDI.sendNoteOn(44, 100, 10);
MIDI.sendNoteOff(44, 0, 10);
delay(tempo);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment