Hi!
I am very new to Teensy
I am trying to make a MIDI controller for my HX Stomp that can send MIDI CC messages to bypass blocks on the HX Stomp.
I have been successful in being able to turn a block on with a CC message however thats as far as my knowledge can get me in Teensy coding. I need the button to be pressed again to turn off the block.
so is there a way to toggle controlValues between 0 and 127 with the same button? or some other way to toggle the same controlNumber on and off?
I am using Teensy 3.6
I am very new to Teensy
I am trying to make a MIDI controller for my HX Stomp that can send MIDI CC messages to bypass blocks on the HX Stomp.
I have been successful in being able to turn a block on with a CC message however thats as far as my knowledge can get me in Teensy coding. I need the button to be pressed again to turn off the block.
so is there a way to toggle controlValues between 0 and 127 with the same button? or some other way to toggle the same controlNumber on and off?
I am using Teensy 3.6
Code:
#include <MIDI.h>
#include <Bounce.h>
MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);
Bounce button1 = Bounce(2, 5); // 5 = 5 ms debounce time
void setup() {
pinMode(2, INPUT_PULLUP);
MIDI.begin(MIDI_CHANNEL_OMNI);
Serial1.setRX(1);
Serial.begin(31250);
}
void loop() {
button1.update();
// Note On messages when each button is pressed
if (button1.fallingEdge()) {
MIDI.sendControlChange(90, 127, 1);
}
}