Go Down

Topic: MIDI Keyboard Encoder - Arduino Piano/Keyboard (question) (Read 14 times) previous topic - next topic

mstanley


To achieve step 3, you need matrix scanning code (which is what the Keypad library is). As a bonus, the way it is written eliminates the need for the diodes in your wiring diagram, hence the simpler
sammyg, you are correct that the diodes are not required for preventing shorts between keys on keypads and keyboards.  But there is another problem called shadowing where some combinations of multiple keypresses will cause the keyboard driver to think that an extra key is being pressed when it is not.  That would mean an extra note would be added to the chord.  The solution is to place a diode across every key.  All midi keyboards should already have the diodes but if op builds his own he should add them.

sammyg

Ah, indeed; rather a large oversight on my part. Thank you for pointing this out mstanley and of course, thanks for writing such a useful library :)

ypelletier

I built a MIDI controller with an old organ keyboard, an Arduino and two hc595 shift registers.  It is documented in my blog (it's written in french, but maybe the sketch and schematics will be of some help?)

Scanning the keyboard and displaying the result on the serial monitor:
http://electroniqueamateur.blogspot.ca/2012/05/decodage-dun-clavier-dorgue-par-un.html

And then sending out MIDI messages:
http://electroniqueamateur.blogspot.ca/2012/05/clavier-midi-base-darduino.html

SotosAle

:~ Hmmmm... All those tutorials confused me... The last one seemed to be the best, but unfortunately it is in French and I couldn't understand what's going on! I downloaded the Keypad and MIDI Libraries and installed them, but I really need some guidance for the code. As I've already mentioned I couldn't figure it out... I suppose that the given codes in the links need to be modified in order to work with my switch setup, which by the way I've built. I used these switches ---> http://www.superdroidrobots.com/images/TE-044-000.jpg and I also used 1N4148 diodes just in case. I installed them on a wooden structure but there  are not any keys yet. These will be made later. Anyway...  I know that I asked for instructions, but that doesn't obviously work... So, would anyone be kind enough to write the code for me, or give me some clear instructions on how to write the code on my own (don't forget that I want the code to co-operate with the swtitch setup I made).
Sorry for being such a newbie, but I really need to complete this project.
Thanks in advance...
???? ?????? ??? ??????, ? ?????? ??????  ?????????? ??? ?????, ?? ??????? ??? ????...

SotosAle

Come on.... Somebody! I' ve already invested money in this project. It would be such a pity if I gave up!
???? ?????? ??? ??????, ? ?????? ??????  ?????????? ??? ?????, ?? ??????? ??? ????...

Go Up