I used an Ultrasonic Ping))) Sensor coupled with a speaker and some Arduino magic to make what I think might be referred to as a sonically digital theremin. Here's a video of it in action (https://www.youtube.com/watch?v=wF1uo4gXYqU
) and the code is in the description of that video. I'm not entirely happy, however, with the sound quality coming from it. I think some of it is coming from the fluctuations in the reported distance from the sensor, do to a poor accuracy, and some of it from the fact that I'm using the speaker from an old rotary telephone handset with no amplifier. You'll notice in the code that the length of each tone is 10ms, which I take it is rather large. The problem is, as it gets smaller, the audio gets even worse, such that I've found 10ms to be the best for now.
I guess what I'm trying to ask, is what can I do to get this closer to sounding like a true theremin? Would replacing the ping))) sensor with a 10cm-80cm IR sensor improve it? The range seems to fit the job better than the ~43cm ping sensor.
Thanks a bunch.