Hello there,
I'm working on a MIDI trim/fader project for my Sound devices 833 mixer, I'm using 2 rotary encoders to control channels 7 and 8 using the Control_Surface library
Now the the issue is that I want to be able to double press the encoder switches (pins 6 and 7) to toggle between {MCU::V_POT_#, CHANNEL_#}, (Which controls Fade) and {MCU::V_POT_7}, (Which controls trim)
I'm quite new to Teensy/Arduino and coding so i've got no clue how to make this possible. Anyone got any ideas
I'm working on a MIDI trim/fader project for my Sound devices 833 mixer, I'm using 2 rotary encoders to control channels 7 and 8 using the Control_Surface library
Now the the issue is that I want to be able to double press the encoder switches (pins 6 and 7) to toggle between {MCU::V_POT_#, CHANNEL_#}, (Which controls Fade) and {MCU::V_POT_7}, (Which controls trim)
I'm quite new to Teensy/Arduino and coding so i've got no clue how to make this possible. Anyone got any ideas
Code:
#include <Encoder.h> // Include the Encoder library.
#include <Control_Surface.h> // Include the Control Surface library
// Instantiate a MIDI over USB interface.
USBMIDI_Interface midi;
NoteButton buttons[] {
{ 6, MCU::V_POT_SELECT_7 },
{ 7, MCU::V_POT_SELECT_8 },
};
CCRotaryEncoder enc1 {
{2, 3}, // pins
{MCU::V_POT_7, CHANNEL_7}, // MIDI address (CC number + optional channel)
1 // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc2 {
{4, 5}, // pins
{MCU::V_POT_8, CHANNEL_8}, // MIDI address (CC number + optional channel)
1 // optional multiplier if the control isn't fast enough
};
void setup() {
// Select the correct relative MIDI CC mode:
RelativeCCSender::setMode(relativeCCmode::MACKIE_CONTROL_RELATIVE);
Control_Surface.begin(); // Initialize Control Surface
}
void loop() {
Control_Surface.loop(); // Update the Control Surface
}