Wifi Theremin
aaron posted in most unnecessary, wifi on January 19th, 2009
A theremin, for those who don’t already know, is a musical instrument that varies the pitch based on your proximity to an antenna, and varies the volume based on your proximity to another antenna. It’s a touch-less device, and you’d probably recognize the sound from old sci-fi movies (listen to the vibrato whistling sound in the background).
Here’s an example of a theremin:
So what does this have to do with anything? I wrote up a script that has the same functionality that uses a wifi device and its signal strength to control the frequency and volume. Yeah, pretty useless, but yet here it is. We actually did this a couple years ago at MRL, but that version was even more of a hack. This version will actually interpolate the pitch as the signal strength jumps around and is threaded so the sound is a little smoother. This version also allows for a second control (wifi interface) that corresponds with the volume so it is a little bit more like a real theremin. There’s still a decent amount of latency though, so you can’t really use it to create useful music.
Here’s a short sample of what it sounds like when you run it from my system. Now isn’t that a beautiful sound,
.
I started creating this on my mac book pro, but after realizing the embedded antenna is pretty difficult to control the signal strength from, I added support for linux. It’s not doing anything fancy for reading signal strength (just parsing CLI utils), so I’m not sure how portable it really is. Also, it does have a couple dependencies on audio libraries, but they’re pretty easy to install (in case you really care).
Anyway, Have fun!



January 23rd, 2009 at 5:34 pm
[...] Labs have put together a new toy for you to play with. It’s a Python script that makes your WiFi hardware behave more like a theremin. Based on the pyaudio library it monitors the signal strength of the AP you’re connected to [...]
January 24th, 2009 at 8:06 am
On my System the script died cause of slightly different iwconfig output. I hope this Patch is a bit more portable:
Change line
153: cmd = “iwconfig %s | grep ‘Signal level’ | cut -f2 -d: | cut -f1 -d’ ‘” % device ]
to
cmd = “iwconfig %s | grep ‘ignal level’”
and Line
161: signal = signal.rstrip()
to
x=signal.index(“ignal level=”)+len(“ignal level=”)
signal = signal[x:signal.index(" ",x)]
January 24th, 2009 at 11:55 am
[...] Labs have put together a new toy for you to play with. It’s a Python script that makes your WiFi hardware behave more like a theremin. Based on the pyaudio library it monitors the signal strength of the AP you’re connected to [...]
January 24th, 2009 at 9:05 pm
[...] Labs have put together a new toy for you to play with. It’s a Python script that makes your WiFi hardware behave more like a theremin. Based on the pyaudio library it monitors the signal strength of the AP you’re connected to [...]
January 26th, 2009 at 11:11 am
[...] Midnight Research Labs describes a nifty theremin hack implemented by detecting signal strength of a WIFI signal. Python source is available to examine. [...]
September 2nd, 2012 at 9:28 am
hi!,I like your writing so so much! share we keep up a correspondence more about your article on AOL? I require an expert on this house to resolve my problem. May be that’s you! Taking a look ahead to see you.
September 14th, 2012 at 8:38 pm
I like the valuable info you provide in your articles.
I will bookmark your blog and check again here regularly.
I am quite certain I will learn many new stuff right here!
Best of luck for the next!
November 9th, 2012 at 10:54 am
Hi, i think that i saw you visited my website thus i came to ?return the favor?.I’m trying to find things to improve my website!I suppose its ok to use a few of your ideas!!
December 19th, 2012 at 9:22 pm
it doesn’t work, it just flashes a command-promptish window for a split second an nothing.
December 26th, 2012 at 8:20 am
How to get rid of Acne Scars Displays Completely New Expressions : We’ll Step Into The Process
December 26th, 2012 at 11:08 am
I have noticed that over the course of creating a relationship with real estate owners, you’ll be able to get them to understand that, in most real estate purchase, a percentage is paid. All things considered, FSBO sellers never “save” the payment. Rather, they struggle to earn the commission by doing a good agent’s occupation. In the process, they shell out their money and also time to accomplish, as best they could, the tasks of an realtor. Those assignments include disclosing the home through marketing, showing the home to buyers, creating a sense of buyer urgency in order to prompt an offer, preparing home inspections, handling qualification investigations with the financial institution, supervising maintenance, and assisting the closing of the deal.
April 9th, 2013 at 12:04 am
Now this is exactly what I’ve been trying to find. Comprehensive, informative, and ACCURATE. I really think there ought to be a literacy assessment for brand new website owners. You’d pass for certain, but I believe 99% of all web sites would cease to exist, haha.
April 9th, 2013 at 9:21 pm
Thanks to this blog I deepened my knowledge.
April 14th, 2013 at 4:26 am
This is a excellent site to learn about Edie Harper prints.
April 22nd, 2013 at 2:58 am
Hello, I really want to tell you, you’re dead wrong. Your own point fails to make any sense.