First post in the community but probably not the last!
I am trying to setup a rather simple idea, preferably using a ESP32.
(I have a WROOM-32 edition)
I want to turn on 4 leds, each of one with a different midi note message.
I ended up using the tttapa Control surface library, starting with the first input example Getting Started
I refined the code to work with the BLE midi library, and with the integrated Arduino pins as suggested here arduino-midi-light-controller
here is the code:
// Include the library
#include <Control_Surface.h>
// Instantiate a MIDI Interface to use
BluetoothMIDI_Interface midi;
using namespace MIDI_Notes;
// Turn on a LED when receiving MIDI Note message
NoteLED leds[] = {
{0, note(C, 4)}, // LED pin, address (note number, channel, cable)
{1, note(D, 4)}, //
{2, note(E, 4)}, //
{3, note(F, 4)}, //
};
// Initialize the Control Surface
void setup() {
Control_Surface.begin();
}
// Update the Control Surface
void loop() {
Control_Surface.loop();
}
And here are the issues:
multiple instances of "Control Surface MIDI" device are created.
In the serial monitor, this message is on loop:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:4916
load:0x40078000,len:16492
load:0x40080400,len:4
load:0x40080404,len:3524
entry 0x400805b8
Sometimes after reuploading the code over and over it works, only one instance of the device will show up, but the Arduino doesn't seem to receive any midi I send from my DAW.
Would be really glad if someone could help with this, maybe @PieterP
?
