I'm attempting to control an effects pedal using a custom midi controller I made using the Surface Control Library (@PieterP).
The documentation for my effects pedal show it can accept the following midi control messages:
CONTROL CHANGE
CC 20 BLEND Knob: 0=CCW 127=CW
CC 21 BANDS Knob: 0=CCW 127=CW
CC 22 TREBLE Knob: 0=CCW 127=CW
CC 23 GENDER Knob: 0=CCW 127=CW
CC 24 PITCH Knob: 0=CCW 127=CW
I reviewed the MIDI constants list:
https://tttapa.github.io/Control-Surface-doc/Doxygen/d4/dbe/namespaceMIDI__CC.html
I'm getting stuck on what constants to use for these control changes.
CC 20 is what constant etc.??
Here's my code:
CCPotentiometer vocoderPotentiometers[] {
{ A0, { MIDI_CC::20, CHANNEL_16 } }, //blend
{ A1, { MIDI_CC::21, CHANNEL_16 } }, //bands
{ A2, { MIDI_CC::22, CHANNEL_16 } }, //tone/treble
{ A3, { MIDI_CC::23, CHANNEL_16 } }, //gender
{ A10, { MIDI_CC::24, CHANNEL_16 } }, //pitch
};
There error I get is
expected unqualified-id before numeric constant
Also for patch/program control changes the pedal documentation says:
Program numbers 11 to 19 (11 = VOX ROBO 1, 9 = REFLEX-TUNE) select V256 modes without presets loaded.
I tried this:
ProgramChanger<9> programChanger {
{
MIDI_PC::11, // Vox Robo 1
MIDI_PC::12, // Vox Robo 2
MIDI_PC::13, // Vox Robo 3
MIDI_PC::14, // Single Drone
MIDI_PC::15, // Major Drone
MIDI_PC::16, // Minor Drone
MIDI_PC::17, // Transpostion
MIDI_PC::18, // Instrument CTRL
MIDI_PC::19, // Reflex Tune
},
CHANNEL_16, // MIDI channel to use
};
But get the same error.
I found the MIDI Namespace references doc and changed my program change code to this:
ProgramChanger<9> programChanger {
{
MIDI_PC::Vibraphone, // Vox Robo 1
MIDI_PC::Marimba, // Vox Robo 2
MIDI_PC::Xylophone, // Vox Robo 3
MIDI_PC::Tubular_Bells, // Single Drone
MIDI_PC::Dulcimer, // Major Drone
MIDI_PC::Drawbar_Organ, // Minor Drone
MIDI_PC::Percussive_Organ, // Transpostion
MIDI_PC::Rock_Organ, // Instrument CTRL
MIDI_PC::Church_Organ, // Reflex Tune
},
CHANNEL_16, // MIDI channel to use
};
This change halts the error, but I wanted to confirm that these are the correct constants to send to the pedal according to the documentation.
Does MIDI_PC::11 == Vibraphone etc??