Thanks for the quick reply @PieterP
I let the Arduino IDE update my local copy of Control Surface library which seems to have broken my midi apps which use multiplexers.
// Instantiate a multiplexer
CD74HC4067 mux_1{4, {6, 7, 8, 9} , }; //input, S0-S3, optional enable
CD74HC4067 mux_2{14, {6, 7, 8, 9} , }; //input, S0-S3, optional enable
// MIC BYPASS
//B1 Button
CCButton B2_But1 {mux_2.pin(2), {28, CHANNEL_16},};
This is the error I get when the compiler gets to the line creating the button:
Compilation error: 'using CD74HC4067 = class CS::AH::AnalogMultiplex<4> {aka class CS::AH::AnalogMultiplex<4>}' has no member named 'pin'; did you mean 'pins'?
Is there a syntax change for creating buttons using pins from multiplexers?
I tried:
CCButton B2_But1 {mux_2.digitalRead(2), {28, CHANNEL_16},}
Which silences error but I get this new error with this code block here:
// // Instantiate a program changer with 9 programs
ProgramChanger<9> programChanger {
{
10, // Vox Robo 1
11, // Vox Robo 2
12, // Vox Robo 3
13, // Single Drone
14, // Major Drone
15, // Minor Drone
16, // Transpostion
17, // Instrument CTRL
18, // Reflex Tune
},
CHANNEL_16, // MIDI channel to use
};
//B1 Buttons 1 and 2
IncrementDecrementSelector<9> selector = {
programChanger, // what to select
{mux_2.digitalRead(0), mux_2.digitalRead(1)}, // push button pins (increment, decrement)
Wrap::Wrap, // wrap around if min/max program is reached
}
Error :
"Compilation error: could not convert '{CS::programChanger, {CS::mux_2.CS::AH::AnalogMultiplex<4>::digitalRead(0), CS::mux_2.CS::AH::AnalogMultiplex<4>::digitalRead(1)}, Wrap}' from '' to 'CS::CS::IncrementDecrementSelector<9>'"
This is a good reminder to not let the IDE autoupdate my libs!