YATH (Yet another theremin)

What do you need for this?

  • An Arduino Leonardo
  • An Arduino Sensor Kit (optional)
  • Two Ultrasonic Distance Sensors
  • A DAW

A Leonardo, because your computer sees it as a MIDI device. And it fits the Sensor Kit.
The Sensor Kit, because it's convenient to connect the distance sensors to it, and it has all the other stuff that will come in handy.
A DAW like Reaper, because it's easy to try out different software synthesizers and make them react to the MIDI data. And it's easy to set up tracks for rehearsing, like this:

(sorry about the barking dog)
The distance sensors need a hard surface to echo against, that's why I use the plastic box. I have never played a real theremin, but I imagine it's a bit easier. Right now I'm afraid I have the typical 250 ms delay here, caused by the lousy sound system of Window. I have to fix that with Asio4all.

In the video I just click one note while the sustain pedal is down, all in the synthesizer GUI. This will keep one single note sounding. Then waving something in front of the sensors will send pitch bend and channel volume messages. Pitch bend is set to +-12 semitones.

Another approach is to trigger note on messages continuously. This will of course create discrete, well tuned tones, and if the synthesizer has settings for portamento, a theremin like glissando can be achieved. Other interesting things one can do with discrete note on events is using scales like whole tone, pentatonic etc.

I will include all that in the next version. Since I'm using the sensor kit here, I can create a simple UI for everything using the push button, the potentiometer and the OLED display.


I cut one Grove cable in two and soldered the cut ends to each distance sensor. The shield in the middle of the sensor kit has these labeled Grove connectors D7 and D8. D7 connects to digital pins 7 and 8, while D8 connects to digital pins 8 and 9. This is very convenient, now both sensors can have the pin 8 as the common trig pin, while pin 7 goes to the echo pin of one sensor and pin 9 goes to the other. To make this work, I use a lib allowing several ultrasonic distance sensors. Instantiating an array of sensors goes like this:
HCSR04 hc(8, new int[2]{7, 9}, 2); //initialisation class HCSR04 (trig pin , echo pin, number of sensor)

2 Likes

fun - nice work and good song playing skills :slight_smile:

Haha, not really. I thought it would have been easier. But I bet I will hit the tone more easily, if I get the midi lag sorted.

[edit]

Here's my next attempt. It's an mp3 in my Google Drive.
I got the lag down from 250 ms to 60 ms and it made it so much easier to play. Still need practice to get it right. But I need also to 3D print a case for the sensors and everything. And I need some paddles or something to keep in my hands.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.