Hello Archie. That's great! Have you got just the basic Teensy + audio board producing sound with a MIDI keyboard?
Yes, the rotary switches have resistors (all about 1k5) between each pole in series - so they just act like potentiometers with fixed resistance at each pole and are read by an ADC via the MUX. In checkMux(), the 10 bit value is bit-shifted by 3 to convert the value down to 7 bits which correspond to 0-127 MIDI CC values. You could just use a potentiometer instead of rotary switches without changing the code, which is what I'm intending to use in future - see below.
The small black board is the PCB on the cheap, mass-produced Keyes KY-040 encoder. I would recommend using a nice ALPS or Bourns one instead with detent and push switch.
I haven't got a Teensy 4.0 yet and am waiting for the large version that's being planned for next year. I had problems with trying to connect the SPI for the display to the same SPI bus used on the audio board, so I moved it to different pins. I can't think of any problems specifically using a T4.0. I'm still working on the code. It now has six voice polyphony (maxing 81% cpu and 44 audio memory on T3.6), pitch mod by filter envelope, white and pink noise level choice on one pot and various other improvements, particularly to the display.
Future plan
If anyone's interested, I'm currently working on a PCB plus a PCB-based front panel (my first). It will have the two surface mount MUXs and the MIDI In opto components already on it (courtesy of possibly JLC PCB). The rest is up to the individual to buy and solder the Teensy, audio board, connectors, 33 10k pots, display and encoder, plus hardware for a case (I'll provide a design for a laser cut/3D printed one). A step further is having the Teensy and audio components already on it like the recent
Kelpie synth. I'm planning to get rid of all buttons/switches and will replace them with capacitive touch switches on the front panel to make assembly easier, although whether these will work sending a signal from the front panel back to the Teensy, I'll find out. It will look something like this and be promoted as a DIY $99 12(16?) voice polyphonic programmable synth

:
