Using the Doppler Effect for Motion Sensing, Browser Scrolling...
I saw today's project this past Saturday from Daniel Rapp and it bumped everything else, just had to share this. First, it currently works in Chrome, yeah, yeah... I know...but use Chrome to best see this work... But it IS a Microsoft Research paper.
Recently I stumbled upon an interesting paper for implementing motion sensing requiring no special hardware, only a speaker and mic! Unfortunately the paper didn't include code to test it, so I decided to reproduce it here on the web!
What is the doppler effect?
First of all, what is the doppler effect? The doppler effect is a physical phenomenon which affects waves in motion. The standard example is the effect on a fire engine siren as it quickly drives past. When it moves towards you the sound waves are compressed, and so the frequency becomes higher, and when it moves away from you the frequency becomes lower.
Now for the fun applications!
The most obvious application for this is motion sensing. Below I've calculated the left and right bandwidth of the 20 kHz region (defined as the number of frequencies to the left and right that are within 99.9% in amplitude of the 20 kHz tone). I've then attached their difference to the size of the box.
A cool application to motion sensing, as suggested by the SoundWave paper, is scrolling (see the video above). Click below to try it out.
Start hands-free scrolling
This implementation doesn't have the double-tap feature for reversing the scrolling-direction, instead it's just using the left and right bandwidth-difference. Thus if you want to scroll down you have to move your hand quickly towards the computer, and slowly away from the computer.
Did this give you any ideas? I also created a small library to play around with this. Just run
var diff = bandwidth.left - bandwidth.right;
to start experimenting.