You're most welcome. The whole point of sharing my efforts here on the forum.
CyberGene since ultimately I'm asking just out of curiosity.
For this purpose, it's good. If it'll become "why don't you do this since it appears to me that's better", then github is the place.
CyberGene Do you mean that every single key is scanned at 10kHz or the entire group of 11 keys is scanned at 10kHz?
I don't remember the exact numbers from the top of my head, but for sure the STM32 ADC clock is usually set around 50MHz, so the 10kHz must be per channel. Plus, since half of the channels are "note off", if necessary and with more complicated software, one may divide by 11 instead of 22, i.e. don't sample note off until a note on is detected (however you do need to continue sampling note-on events also before the corresponding note off is detected otherwise repetitions may have problems, so it's not exactly half).
Moreover, as the github issue #31 say, even at slower clock, the higher spatial resolution of an ADC approach could compensate for "slower" temporal sampling. I think "slower" there means "compared to other options such as dedicated ADCs which can reach up to 500kHz per channel".
CyberGene P.S. BTW, the scanning speed of 1.3kHz per key I'm citing is the net scanning speed, i.e. it includes the processing of the events for the key and generating MIDI. Have you calculated how much the delay will be when you include the processing of the data on the ADC boards which AFAIK includes some filtering and math stuff?
The ADC happens separately in interrupts, there is no "scanning", so there is not time spent on it. Also the STM32 cpus is much more powerful than the other ones in Teensy and similar, so again going in that direction.
CyberGene Not meaning to compete though! Just trying to wrap my head around the solution.
Totally understood. Same reason why I eventually went in this route after having examined a number of options, including yours. Now that I'm settled, I forgot the details (like you) 😃
This has been turned inside out like a glove at https://pianoclack.com/forum/d/289-scanning-speed-and-velocity-mapping-of-cybrid/