RIP
AlexanderBunt I think that is what I will do then. Use one sensor per key, and adjust the measure points in code. I see you did this with a Raspberry Pi, but do you think it's also possible with for example a Teensy 3.5 of Arduino Mega (calculating speed etc.)?
I am using a Raspberry Pi pico (last part is very important), which is the wimpiest thing you can think of (well I guess the C=64 I used in my youth was wimpier 🤣 and much larger). If I can do it with that (and I can), you can do it with anything.The only question is if that "anything" has enough ADC inputs
AlexanderBunt This seems to be a nice solution, but I don't know a thing about ADC's and measurement speeds.
ADC = Analog to Digital Converter. A thing that takes a voltage input, such as the one produced by these CNY70 or similar sensors and transform it into a digital number. See https://pianoclack.com/forum/d/289-scanning-speed-and-velocity-mapping-of-cybrid/121 for the latest example of what the data looks like.
Resolution is measured in number of bits, which usually is 10, 12 or more. However the ENOB, Effective Number of Bits, is lower, because there is "noise" (=imperfection) in the measures and the lowest digits cannot be trusted. You see it very well on the pictures linked above. For the pico, the resolution is 12 bits, but the ENOB is slightly less than 9. The measurement speed is frequency and is measured in thousands of "samples" (measurements) per second. Depending on how fast the thing you want to measure moves, you need to "sample" it faster. Surprisingly, the wimpy pico is one of the fastest sampler, at 500kSample/s (so fast that it has trouble putting that information somewhere, because it is too slow to move so much data -- but it can measure it and compare it to threshold)
Also, since ADCs are relatively expensive, they are often "multiplexed" i.e. one ADC serves multiple "channels" which in our case would be attached to a different sensor for each key. So as CG said you can use just a couple of those boards to sense all the keys you need.
AlexanderBunt CyberGene 10mm is a lot
Less would be better or worse?
Less would make it harder in that you have to sample quicker. No better or worse per se, just have to be faster, which reduces the number of ADCs and multiplexers you can use.
I recommend that you read the the READMEs and wiki of @JayKominek 's repository at https://github.com/jkominek/piano-conversion which is really great with lots (and probably "all you need to know") of info. What might be missing there are only "obvious" things which "everybody knows", i.e. that you can find easily on wikipedia and/or online tutorials at Sparkfun, DigiKey, personal blogs etc.
Nice to have you onboard!



