Other posts in the series Musical instruments for musicians and non-musicians:
- Part One: Controls: Analysing how continuous or discrete controls on the sound affect playability to great extent
- Part Two: Constraints: How embedding musical theory as constraints makes the instrument easier and more rewarding
- Part Three: Exotic examples: Examples of exotic instruments and how they achieve good or not so good results
- Part Four: Put into practice: Let’s put theory into practice to build an easy and musically-sounding Theremin
Now we want to put that into practice to build a musical instrument. Let’s consider we want to do something inspired by the Theremin, but simpler to play and more funny to look at while easier to build as well.
Requirements
Here is now a case study: We want to build an instrument that must be:
- Playable by friends that know very little in music: in other words really easy to play
- Attractive for friends that enjoy the fun of playing and jamming together: must be expressive
- Suitable for groovy electronic music (house, hip-hop, electro, acid-jazz, trip-hop and a bit of techno)
- Able to participate within a small band among other instruments, mostly electronic machines
- With a funky look and visually attractive when performing
Design and justification
Clik here to view.

The finished instrument
Based on these requirements, and after some trials and error we go for the following:
- Finger physical guidance, because it is too hard to keep hands in the air at the same position (req. 1)
- Bright leds plus light sensor as a primary way of playing, for the funky look and visually attractive performance (req. 5)
- Discrete pitch as primary way of playing, with pitch quantization against a pentatonic scale, easy, good sounding (but coupled to one fixed tonality unless putting configuration buttons) (req. 1)
- Expression on the pitch when a note is pressed send pitch bend events to modulate the pitch as on a guitar or real theremin; this only happen after a note is pressed, not to conflict with the primary pentatonic scale (req. 2)
- Allows for additional expression using a distinct light sensor mapped to a Midi Continuous Controller (controller 1: modulation wheel) (req. 2)
- Continuous rhythm control to start the project simply, plan to quantize it on 16th notes according to a midi clock later (tradeoff to keep simple right now, should be even simpler due to req. 1)
- MIDI controller rather than integrated synthesizer to allow for very good sounds generated from external professional synthesizers (req. 3)
- Internal scale setup within the range between C3 and C5, to dedicate the instrument to play solo on top of an electronic rhythm (req. 4)
- Arduino implementation (easy to implement pitch quantization logic and expression controls)
Construction
Clik here to view.

The very simple circuit
Clik here to view.

The Arduino board
- An aluminium rail (from a DIY shop) is fixed to an empty salt box as the body (hence the name « Salty Solo »)
- A LED (from Booxt) slides on the rail
- The main sensor and the expression sensor are two simple LDRs connected through a voltage divider to two Arduino analog inputs
- Two buttons are simply connected to two Arduino digital inputs.
- The MIDI out DIN plug is connected to the Arduino Tx pin.
- The rest is in the Arduino software!
I have decorated the salt box with adhesive stuff…
Playability and fixes
At first try, playing the Salty Solo is not that easy! A few problems happen:
- Reaction time (or « latency ») is not good
- Moving the light with the left hand is not very fast, hence impedes playing a melody that sounds like one.
- Also there is a kind of conflict between the note quantization that does a rounding to the closest accurate note, and the expression control that allows to « bend » notes.
The first problem has been solved by increasing the Arduino loop frequency down to 100Hz (wait period = 10ms); to prevent sending MIDI continuous controller and MIDI pitch bend too often we therefore needed to send them (when needed) once out of a few loops.
For the second problem a workaround has been done by using the second button to trigger the next note in the scale, and pressing both buttons together triggers the second next note in the scale. Basically, in the (almost) pentatonic scale we use this usually means jumping to the third or to the fifth. This kind of jump is very common when playing guitar or bass guitar thanks to their multiple strings, and it does help play faster while moving the left hand much less. With two buttons like this it is much easier to play melodic fragments.
The last problem has been solved a bit randomly: because of a bug in the code, the pitch bend only happen when on the highest note: this saves the most useful case of playing the guitar hero on a very high note while bending it a lot. On the other notes, sliding the left hand descend or ascend the scale instead. Further playing and external opinions will probably help tweak this behaviour over time.
Here is the Arduino source code for Salty Solo
Here is a video to illustrate how it works…
Experimental instrument for musicians and non-musicians from cyrille martraire on Vimeo.
Addendum
Other CC that could be used (however the modulation wheel can also control the same parameters, on a program by program basis on a synth):
- 1 Modulation Wheel or Joystick (positive polarity) (MSB) Can be effectively remapped to other controllers on some synth
- 7 Volume (MSB) If you re-route to Controller 7, your software mixer will mess up
- 71 Resonance (aka Timbre)
- 74 Frequency Cutoff (aka Brightness )
And the panic button: 123 All Notes Off