- #1
mishima
- 576
- 43
I have an old piano keybed I am trying to turn into a midi controller for a synthesizer.
The keybed has 32 keys and is just a matrix of diodes and buttons. There are 2 buttons per key (2 buttons per note pressed on the piano). This is for MIDI velocity, ordinarily the time between the two strikes is used to send a midi command representing how hard the piano key was pressed. I am not doing those timing calculations for this project, but I still need to know that both buttons are pressed. This is how the 32 piano keys are uniquely identified.
From the keybed is a flat ribbon cable with 16 prongs. When a specific (lets say C6) note is pressed, I can read 3.8 Mohms across two pins, 1 and 16. At the same time, I can also read the same resistance across 2 and 16.
Of course its easy to detect 1 note with a microcontroller just using a pull up resistor around 20 Mohm. The difficulty I have now is getting multiple notes to work. I have decoded the matrix enough to know the pin combos for each note, but I suspect there is some kind of digital component I am unfamiliar with that I need to proceed.
What's confusing is that I almost need a way to detect which pin on the ribbon is being grounded while at the same time knowing which pins on the ribbon are being pulled high.
A short segment of the pattern is below so you can kind of see why 3 pins uniquely identify a note. The higher number is on the negative side of the diodes.
A5 1 and 14, 2 and 14
B5 1 and 15, 2 and 15
C6 1 and 16, 2 and 16
I can detect 1 and 2 being sent high. I don't know how to detect, at the same time, 16 as opposed to say 15 being taken negative.
Could a shift register help here? Is there some other component that's applicable? Any thoughts?
The keybed has 32 keys and is just a matrix of diodes and buttons. There are 2 buttons per key (2 buttons per note pressed on the piano). This is for MIDI velocity, ordinarily the time between the two strikes is used to send a midi command representing how hard the piano key was pressed. I am not doing those timing calculations for this project, but I still need to know that both buttons are pressed. This is how the 32 piano keys are uniquely identified.
From the keybed is a flat ribbon cable with 16 prongs. When a specific (lets say C6) note is pressed, I can read 3.8 Mohms across two pins, 1 and 16. At the same time, I can also read the same resistance across 2 and 16.
Of course its easy to detect 1 note with a microcontroller just using a pull up resistor around 20 Mohm. The difficulty I have now is getting multiple notes to work. I have decoded the matrix enough to know the pin combos for each note, but I suspect there is some kind of digital component I am unfamiliar with that I need to proceed.
What's confusing is that I almost need a way to detect which pin on the ribbon is being grounded while at the same time knowing which pins on the ribbon are being pulled high.
A short segment of the pattern is below so you can kind of see why 3 pins uniquely identify a note. The higher number is on the negative side of the diodes.
A5 1 and 14, 2 and 14
B5 1 and 15, 2 and 15
C6 1 and 16, 2 and 16
I can detect 1 and 2 being sent high. I don't know how to detect, at the same time, 16 as opposed to say 15 being taken negative.
Could a shift register help here? Is there some other component that's applicable? Any thoughts?