Keyboard MIDI Matrix Decode

Following on from my Keyboard Matrix Decode I’ve now added MIDI out!  So I have a full sized MIDI controller keyboard for the cost of a cheap Arduino Nano clone and a couple of passive components!

Warning! I strongly recommend using an old or second hand keyboard for your MIDI experiments.  I am not responsible for any damage to expensive instruments!

These are the key Arduino tutorials for the main concepts used in this project:

If you are new to Arduino, see the Getting Started pages.

Parts list

The Circuit

NanoMIDIKeyboardDecode_bb

This is the same wiring of the Nano as described previously but with GND, 5V and TX hooked up to a MIDI output circuit.  Note that as before, A6 and A7 have been disabled to allow the connector to be re-routed over to D11 an D12.

2020-09-22 15.30.54

The Code

I’ve taken the previous code an added simple MIDI out functionality.  When the key was detected as PRESSED instead of printing that out to the serial port, it now calls MIDI.sendNoteOn with the appropriate MIDI note value.  Similarly on RELEASED with MIDI.sendNoteOff.

To help with debugging I also light up the LED_BUILTIN when a MIDI note is playing.

Find it on GitHub here.

Closing Thoughts

Adding basic MIDI functionality was a fairly small step and it would be nice to build a simple “shield” to plug the Nano into.  Next might be to consider adding some build-in synthesis perhaps using one of the previous projects, such as the Arduino Multi Mozzi String Synth or the Arduino MIDI VS1053 Synth.  I actually have a couple of other MIDI-drivable sound-generating modules that might be worth having a play with too.

It would be nice to be able to hook up some of the buttons but I think the original circuit board is too corroded for the tracks to still work, so I’d have to start again, possibly even with a custom PCB and that is getting quite a lot of effort for a sub £20 keyboard that was being thrown away!

Kevin

One thought on “Keyboard MIDI Matrix Decode

Leave a comment