monkeybiscuits
Active member
I've got a MIDI controller with several inputs and a 7-segment LED that I'd like to have display the Control Numbers or Values of outgoing usbMIDI messages. "usbMIDI.read()" is only for incoming MIDI, correct?
This code does NOT WORK. This is only how my mind wants it to work.
How should I approach this?
This code does NOT WORK. This is only how my mind wants it to work.
Code:
#include <MIDI.h>
#include <Bounce.h>
const int pin = 0;
Bounce btn(pin, 50);
void setup(){
pinMode(pin, INPUT_PULLUP);
MIDI.begin();
usbMIDI.setHandleControlChange(OnCC);
}
void loop(){
btn.update();
if (btn.fallingEdge()){
usbMIDI.sendControlChange(20, 127, 1);
}
usbMIDI.read();
}
void OnCC(byte channel, byte control, byte value){
functionThatDisplaysValue(control);
}
How should I approach this?
Last edited: