Can you explain how you would detect the pressure on each key, either using these "digital ldr" you mention or otherwise? Some links to these components would be helpful.
Oh oh... I made a mistake... It happens when you edit things up so that they look nothing like what they did when they started.
My idea was this:
You got one white LED and one LDR hooked up (the LED is simply hooked up to Vcc, with its resistor of course). It is has all sides except its top painted blsck.
You got one LDR hoocked up next to it, also protected by a black cover an all sides except top.
They are both conected to the inside of the keys. On the inside of ervery key (out of view by pianist), they are painted with a zebra pattern.
The light would reflect from the LED back to the LDR on the white strips, but no light would reflect on the black ones. You should be able to detect the number of strips down and therefore the speed of the keypress that way... I beleive...
The digital LDR reference was incorrect. An LDR is an analog pin, not a digital one.
How does this sounds?
I still have the problem of the need of too many pins. This means that I need to use a MEGA to detectonly 2 octaves, while the UNO not being able to tackle even one.
Two possible methods of reducing the number of inputs would be A. multiplexing and B. creating a matrix (which is in truth another form of multiplexing).
Thanks. I will research both options.
Using analog or digital multiplexors, you can generally reduce the number of inputs required by a factor of 8 or 16. So for example 5 x 16-channel multiplexors would be enough for your 88 keys. This would require 5 inputs and 4 outputs.
This doesn't adds up to me...5*16=80, which is less than 88... Am I missing something?
A matrix would probably require more inputs and outputs, but might avoid the need for more components/chips.
I am not afraid to do use additional chips, but I want to avoid shields if at all possible. The reason or this will became clear in a later post on this thread.