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. [...]
January 6th, 2010 at 1:18 am
stopping labor medication
fixtinhot http://www.sagebase-3d.com/ – buy valium Some other effects such as impatience, agitation, bad temper, aggression, hallucination, nightmares, psychoses and adverse behavioral effects are also observed to occur while on benzodiazepine medication. diazepam 5mg Effects experiences less frequently are perplexity, constipation, depression, diplopia, dysarthria, headache, hypotension, increase of saliva, rash, speaking problem, vibration of body, urinary retention, dizziness and blurred eye sight. order diazepam If such effect is experienced by the patient, the medication should be discontinued and the doctor needs to be notified about the condition.