Cat Trio – A PicoBoard Theremin with Scratch

Cat Trio

OK, I’m sure that’s the most confusing post title of all time. I’m sure it will make sense by the end of this post.

This is a Theremin…

Moog Theremin

Moog Etherwave Theremin

…and I want one. Unfortunately, Santa (aka, Laura) didn’t agree. Something about it being too expensive and weird-sounding. :-) Oh well. So, I decided to look into options for building one. I had been playing with the PicoBoard and MaKey MaKey, and thought those would provide excellent options.

It seems that everyone wants to make banana pianos with the MaKey Makey. Since a MaKey Makey imitates a keyboard, it’s great for discreet keys and tones. However, a Theremin operates on a continuum, sort of like a violin or trombone. Therefore something else was needed. That’s where the PicoBoard comes in, with its ability to return values along a continuum based on its sensors.

First, though, it might help to know what a Theremin is…

The Theremin was invented in 1928 by Lev Sergeyevich Termen, aka Léon Theremin. It was one of the first electronic instruments, predating synthesizer technology. A Theremin has two antennae – one controls pitch and the other controls volume. Players don’t touch the instrument, but changes in position relative to these antennae control pitch and volume.

RCA Theremin
Leon Theremin

Here’s a video of its inventor playing the Theremin…

The Theremin never gained the popularity that its inventor hoped. It was relegated to the realm of geekery, its unearthly tones often associated more with science fiction than symphony. Pop culture geeks from all ages have taken an interest in the instrument, from Boris Karloff as Frankenstein’s monster…

Boris Karloff playing the Theremin

to Sheldon Cooper on the Big Bang Theory…

Sheldon Cooper with Theremin

So, of course, being a geek with a keen interest in both electronics and electronic music, the Theremin would be right up my ally.

But, back to the project at hand…

First I needed some sort of tone generator. The PicoBoard only works with the Scratch programming language, so that’s where I had to start. I created a script that plays a tone when the space bar is pressed. I included a loop so that when the button on the PicoBoard is pressed, the amount of light hitting the PicoBoard’s sensor alters the pitch.

This wasn’t quite sufficient, though. No matter what timbre I selected, I was only getting discreet tones, rather than the smooth continuum of the Theremin. The trick was to used three tone generators instead of one. Each tone duration was off-set slightly, so that there was the illusion of a continuous sound. In Scratch actions are associated with “sprites”, and the default sprite is an orange cat. Seems appropriate since our own orange cat, Cosmo, was very keen to help.

Cosmo Helping Out

I altered the sprite animation so that each would appear to “sing” when the tones were being generated. I also added a fourth sprite and routine that marks the amount of pitch change in graph format.

Scratch Programming Screen

The completed script that I created is available from the MIT Scratch website, and you can run it online (assuming you have a PicoBoard.)

I set it up so that I could change from the light sensor to other resistance sensors on the PicoBoard. Here’s a video of the results. In addition to light I used a graphite pencil mark, a piece of cheese, and an orange.

Of these, it seemed that the orange had the best control over pitch. I think the citrus acid is a better conductor.

So far I had just been using tones generated by my laptop. Since the Raspberry Pi (RPi) will run Scratch, I thought I’d try it with the PicoBoard. Normally I’d press the space bar to start the script, press “q” to stop it, then press “r” to reset everything. Since the RPi doesn’t have a keyboard, the MaKey Makey would be perfect. I used VNC to attach to the RPi and an FTP client to upload the Scratch script to the RPi. I then altered the script so that instead of “q” and “r” it would use “a” and “w”, keys available on the MaKey MaKey. I used PlayDoh as keys for these, and created a ground bracelet by wrapping foil around my survival cord bracelet.

Labeled Pi Theremin 1
MaKey MaKey Labeled
Wrist Ground
All Components

It was all a beautiful plan, but…

In order to get it all connected I had to use a USB hub. Unfortunately, the RPi doesn’t put out enough juice through its USB ports to power the MaKey Makey, PicoBoard, and WiFi adapter. The RPi kept shutting down because it just couldn’t pull the power. I decided to strip things down to the basics. I used VNC to start the script on my laptop, but used just the PicoBoard and RPi to create the Theremin.

Simple RPi PicoBoard Theremin

Here’s the video results:

The RPi doesn’t respond to the PicoBoard sensors quite as well, so the pitch doesn’t seem to be as high. That actually turns out to be a good thing. The pitch is almost controllable.

Almost, but not quite.

Perhaps one day I may get a Moog Etherwave Theremin. Then I might be able to construct a Badgermin…

Badger Theremin or Badgermin

…but, for now, I think my Theremin longings have been sated.

Related Posts Plugin for WordPress, Blogger...

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>