Arduino MIDI Touch Piano

Just to complete the set, this is the Arduino Touch Piano – Part 2 stripboard version generating MIDI rather than tones.

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!

This builds on all the knowledge gained so far in the following:

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

Parts list and Circuit

This project needs the Arduino Touch Piano – Part 2.

I’ve used my now conventional MIDI din plug with two resistors as described in my previous MIDI projects and connected it to GND, +5V and TX on the stripboard shield.

The Code

As you might expect this takes the capacitive sensor code from the Touch Piano, but uses the MIDI note generating code from the Nano MIDI Keyboard.  There is nothing new here that we haven’t seen already.

The only thing to be wary of is that I have removed the calibration code which uses the serial port as we are wanting to use the serial port for MIDI transmissions. This consequently assumes a calibrated system with an adequate SENSOR_THRESHOLD value.  Part 2 of the Touch Piano project will allow this to be worked out.  It doesn’t need a tone speaker to calibrate, although that makes it easy to see if the keyboard is responding well.

Find it on GitHub here.

Closing Thoughts

Adding those extra capacitors and building this project on stripboard has increased the reliability a lot and was well worth doing.  This has been an interesting sequence of builds and it is really quite odd to hear complex synth sounds being triggered from this simple touch keyboard.

Now that basic touch functionality exists it will be interesting to see what else could be used as a touch panel – pieces of furniture, crocodile clips to other objects, even other musical instruments!

Kevin

 

Leave a comment