Termen ne mret
If you use wavemon with an 802.11b wireless network, you'll notice that signal quality is measured on a scale from 0 to 92, and can be affected directly simply by bringing your hand near to your wireless card. The closer your hand gets to the card, the poorer the signal quality will become.
wavemon even has a mode in which a graph of signal quality over time is displayed. While many people use that graph (and similar graphs in similar software) to help find wireless networks, or physically locate base stations, or figure out the best orientation for a laptop using a particular network, you can also just move your hand up and down and watch the graph line go up and down as your hand moves.
This means that the 802.11 card can function as a rough proximity sensor for your hand. This evening I realized that that means you can make a wireless card into a sort of poor man's theremin -- you just need to map the signal strength to a tone, play the tone, and move your hand. You'll be able to play several discrete pitches or scales, although with much less precision than a real theremin.
I wrote a three-line shell script which implements this idea (using Linux setterm, all on a beta test version of the LNX-BBC, it so happens), and later improved it a little bit with a small C program which wraps the Linux KIOCSOUND ioctl. It works just fine -- you can easily bring the tone up and down by moving your hand back and forth. That's a lot of fun. The most obvious problem is the discreteness of the whole thing. A real theremin is plainly an analog device. (The analogy is between the pitch level and the position of your hand.) This system is very obviously quantized, at best like someone playing a poor piano scale (and it's distorted sine waves rather than piano strings with their nice harmonics).
We can't really do better with the standard 802.11 drivers, because they definitely won't give anything more precise than the 92 discerete levels. You could modify the hardware (and build a real theremin, which is far simpler electrically than an 802.11b card). Another approach is to modify the way the tones are generated. What I'm currently thinking is something like this: we need to define a function i(s) and a function n(g, p), where i(s) is the ideal pitch in Hz corresponding to a signal strength measurement s and where n is the next pitch after some small constant time step if the goal is to reach pitch g and we're currently playing pitch p. So we use the function n to change pitch smoothly and always move gradually from the pitch we're currently playing toward a goal. The goal, at any given moment, will be i(s) -- that is, we do a loop like
p=i(signal_strength()) while 1: play(p) p = n(i(signal_strength()), p) sleep(time_step)
Now the pitch will always change continuously, and yet the pitch will be directly responsive to the (discrete) signal strength measurement. If the signal strength rises quickly, the pitch will rise quickly. If the signal strength rises slowly, the pitch will rise slowly. If the signal strength stays constant, the pitch will stay constant. If you move the position of your hand to a position x centimeters away from the card at one time, and later move it to the same position, the pitch should in each case approach roughly the same value -- which should be i(s) Hz for whatever value of s happens to correspond to holding your hand x cm away from the card.
(There might not be a unique such value, because it also depends on a lot of other factors like the angle at which you hold your hand. Obviously there is lots and lots of radio hardware which would give you much better results -- maybe even an ordinary AM or FM radio if you tweaked the demodulation circuit and gave it a suitable input signal. But there's not lots of radio hardware you can get so easily if you're not a radio expert and get a single digital value out of so readily and at such a high frequency. We can hope GNU Radio will change this situation quickly!)