Library for measuring distance using unexpensive IR reflective sensors (As CNY7)

well i have decided to go digital (on/off)and not measure the speed of the key. the existing 128 channel mux that i built in 1990 works fine with this on an arduino. but i'm considering using a different approach; namely a switched array. so i'm pretty confident this will work with the arduino.

good point about the separate IR sensor and turning on and OFF and ON the IR sensor. In my case all 96 sensors (the second board is smaller) are enclosed in a metal cabinet so the IR will be limited by the enclosure (i know of someone sensing guitar string vibrations with IR and that is much different because the human hand is right on the sensor).

What do you mean filters?

any how i'm hoping to post the final design and other notes on a website for others. started with piezos which didn't work at all - and then to sp/st switches which don't have the feel (or the 5/16" travel of a piano key) and now working on IR sensors.

Hope to get it done by maker faire in may 2013.