Hi, I'm sorry to bump this old thread, but I can't get these very nice instructions to work with a teensy 4.0 and two CD74HC4067's. Here's what I've done so far.
Since I use 2 muxes, I've copy/pasted the code of oddson, which has a different mapping then OP's andrewslobford's.
Andrew:
//mapping of mux to teensy digital pins
int pin_Out_S0 = 4;
int pin_Out_S1 = 3;
int pin_Out_S2 = 2;
int pin_Out_S3 = 1;
int pin_In_Mux1 = A0;
Oddsond's:
//mapping of mux to teensy digital pins
int pin_Out_S0 = 0;
int pin_Out_S1 = 1;
int pin_Out_S2 = 2;
int pin_Out_S3 = 3;
int pin_In_Mux1 = A1;
int pin_In_Mux2 = A2;
I believe the digital ins are in the same spot on the 4 as on the lc, but tried both configs/codes and changed the wiring on my breadboard accordingly. When I open up Ableton Live, the teensy is recognized (Teensymidi), but when I assign the controller to a parameter, it seems any knob I use on my prototype sends this array: '70,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36' from the code, instead of just one cc.
Anyone has any thoughts on what could be wrong or perhaps is the wiring for a 4 different then for a lc and am I wrong in assuming it's the same perhaps?