Skip to main content

Theremin Synth Music with Voyager/ScratchX

Profile picture for user Rich
Submitted by Rich on Thu, 08/23/2018 - 15:25


theremin , named after its Russian inventor in the early 1900's, is an electronic musical instrument that is controlled without any contact by the musician.   Volume is controlled by moving one hand near one antenna, while pitch is controlled by moving the other hand near a second antenna.  The sound is generated by a pair of high-frequency oscillators.

In an earlier lesson, Theremin Music Simulation: Voyager/ScratchX, we discussed a very simple theremin that makes use of only the PocketLab ScratchX extension.  In this lesson, a theremin with many more features and great sound is developed.  This Voyager-based theremin makes use of two ScratchX extensions--the PocketLab extension and the Sound Synthesizer extension by Eric Rosebaum.  If you are interested, feel free to check out some of the features of this sound synthesizer by clicking here.  This sound synthesizer allows you to control effects such as echo, wave forms (sine, square, etc.), and frequency or MIDI notes.  To learn how to load both the PocketLab and synth extensions into ScratchX, click this link.

Video Example of Voyager as a Theremin Synth

The video below shows an example of music that can be produced with the PocketLab Voyager theremin synthesizer.  This short composition uses the sine waveform as well as an echo effect to control the frequencies of the sound that is heard.  Pitch is highest when the hand is closer to the Voyager theremin and decreases as the hand is moved away.

The ScratchX Program

Figure 1 shows the ScratchX program for our PocketLab Voyager theremin synthesizer.  The minimum and maximum frequencies of the sound produced can be set as desired.  Setting the frequency range from 65 to 1040 Hz (cycles/sec) produces sounds from two octaves below middle C to two octaves above middle C.  (Middle C is about 260 Hz, with the frequency doubling for each octave.)  The oscillator type was selected as sine.  The synth volume was set to its maximum (100%).  The echo effect was set to 25% with a 0.5 second delay time.  A forever loop captures Voyager's rangefinder value, which is the distance of the hand in meters measured from Voyager.  Distances in excess of 0.33 m are ignored.  The result is that the entire frequency range is contained from 0 to 0.33 meter from Voyager's IR rangefinder.  Distances beyond 0.33 m produce no sound, other than echos that may have been created while in the 0 to 0.33 meter range.  The set synth frequency block simply maps rangefinder distances to the desired frequencies.  If the rangefinder reading is 0 meters, the frequency produced is the maximum allowed frequency.  If the rangefinder reading is 0.33 meter, the frequency produced is the minimum value allowed.

Note that extending the range to higher frequencies than used in this program may produce frequencies that can be quite piercing to both humans and dogs ears!

The sbx ScratchX file accompanies this lesson.

ScratchX program for the PocketLab Voyager theremin synthesizer
Figure 1


Playing the PocketLab Voyager Synth
Grade Level
Additional Content

To access this free lesson, please sign up to receive communications from us: