Thursday, March 30, 2006

Fun with FFT and DTMF

I was listening to WYUR the other night, when the host starting calling people on his phone list (he actually called me, but my phone was on 'vibrate' and not in my pocket). But he dialed the numbers on air. Now, WYUR has this superstrict policy about not discussing any indentifiable personal info on the air, such as full names, AIM screen names, and telephone numbers. I always figured that I could listen to the dialed numbers, and, by pushing telephone buttons, work out what numbers were dialed. However, this is harder than it sounds (ha!).

Telephone tones use something called DTMF which stands for "Dual-Tone Multi-Frequency." In short, it means that sound for each number on the telephone keypad is made up of two frequencies. For example, 1 is a combination of a 697Hz signal with a 1209Hz signal. If you go here [wikipedia], you'll see that when looking across a row the numbers share the low frequency and vary the high frequency, whereas when you look down a column, the numbers share the high frequency and vary the low.

Why is all this important? Well, it means that although it is often easier to tell the difference between a 1 and a 2 by listening, it is not as easy to hear the difference between a 1 and a 4. This is because humans hearing (generally) is most sensitive to frequencies in the 1000-4000Hz range, meaning that with notes sharing a higher frequency the changes in the lower frequencies are much harder to perceive. So, since I couldn't do it by ear: Enter FFT - "Fast Fourier Transform."

[People who may be scared by somewhat mathy/physicsy stuff may want to skip till after the pictures]
At the risk of scaring more people off, I will briefly explain what Fourier Transforms (FTs) "do." I'll use sound for this example, since that is what the end goal in this case is. Basically, when you look at a sound - which is caused by something vibrating - you usually look at the movement of the vibrating stuff as it varies through time. Alternatively, you could also look at what 'amount' of which frequencies of vibration are present in that sound. A FT is a mathematical mechanism of switching between those two views.

If you have a recorded audio signal, which is a measurement of the vibration, and you apply a FT to that signal, you will get a measure of the frequencies in the audio, instead. (As a side note, in Quantum Mechanics, FTs are often used to switch between a momentum distribution and a position distribution.) A FFT is simply "an efficient algorithm to compute" the FT - in other words, it's faster than doing a FT directly.

For example, this is what a dialed 4 looks like in vibration-land:

And this is what it looks like in frequency land. Notice the peaks at 770Hz and 1209 (I used Log frequency scale to see the peaks clearer, even if the exact frequency peak is hard to see by eye, but the computer picks out the peaks exactly):

So, (Finally! Whew!) using Audacity's FFT tool, I picked out which frequencies were in each of the dialed notes, matched them up with the frequency chart, and got the entire dialed number: 1-414-....
Take that WYUR!

[PS. Audacity is a really great FREE! program]

Tuesday, March 28, 2006

Things I Have Seen in the Past 15 Minutes

To explain, I seriously mean the past fifteen minutes. Number one, as I am leaving from a midterm I see three college students playing keep the ball up in a dorm parking lot (I remind you that it is now past twelve). While driving to my house I see a fox with a goose in its mouth. If this was just the first fifteen minutes I can’t wait for the rest of the day, I still have 95 more 15 minute periods.

Sunday, March 26, 2006

Fun With Evaluation Forms

The women’s center at NJIT brought in a female speaker from MIT Robotics in last week. They gave a huge introduction where they yabbered on and on about this other woman NJIT chemistry professor from like the 60’s, then the MIT lady spent half the time talking about her life instead of her life work.

This wasn’t actually a big loss because while the rest of MIT builds paratrooper insects that climb mountains in outer space she’s making fuzzy stuffed animals whose sole purpose* is to display emotion. *by purpose, in no way do I mean useful purpose.

Her idea of a final frontier is, and I quote in context “not outer space but in your living room.” Clearly I have a few opinions so I filled out one of those survey things. There wasn’t enough room so I wrote on the back.

You should open the pictures to get the readable versions.

Tuesday, March 21, 2006

Lets Complain

On March 20th 2006 the Family Circus comic strip published this comic.

Now this is an outrage against anyone with a rudimentary knowledge of science. The plants don't absorb the green light; they absorb the red and blue light and reflect the green light. For this we must complain to the writers of the Family Circus strip Jeff and Bill Keane, their email is We should also complain to all the newspapers that publish this horrible comic, not only do they make up science facts they also dress like they are in the 1940.

Sunday, March 19, 2006

Statistics on Cornell University

I have gathered some very accurate statistics on Cornell University,
  • It is sunny for exactly 30 seconds per 2 days

  • They will always let kids ring the Bells in the tower if you ask nicely

  • Every sign hung up anywhere in the city is ridiculous and funny in some way.

  • It requires no knowledge of the subject in question to pretend you are the third member of your friends group, assuming that this third person has never gone to class nor met his other partner and that you are still dressed up for purim as a Cornell student.
Since it was somewhat gray, I decided to liven it up a bit:

On the door to an official computer lab:

Thursday, March 16, 2006

Season's Greetings!

For much of the winter "Holiday Season," there are brightly-lit massive snowflakes and other assorted winter things hanging from streetlights all over the place. In Washington Heights, along with all of the usual stuff, was a large banner which proclaimed "Season's Greetings."
Why is it that midwinter is the only season that people feel the need to hang up garish signs greeting everyone? Early spring is as much a season as mid winter. There should be brightly-lit massive flowers and other assorted spring things (snowflakes?) hanging from streetlights. And Washington Heights (as a independant being, I suppose) should put their "Season's Greetings" banner back up.
Season's Greetings, everyone!

Tuesday, March 14, 2006

Spring Break, Lets Party!!!

The other day I was in my local library on their computerized catalog (who said the subject of this post had to have anything to do with the title) searching for books by Terry Pratchett. I found the book I was looking for. When I looked at the location section of the page I discovered the sentence, and I quote, "Standard shelving location." What does this mean? Where in this twisted maze of bookshelves is the standard shelving location for this book? I wandered around looking for this book for hours; until I was so hopelessly lost they had to send the scent hounds out to find me. I never did find the book.

It's Purim today and because of this, I am going to treat you to my families Purim shpiel [pdf].

Also I would like to wish you all a very happy Pi day from all of us at the National Association for the Advancement of Mathematical Constants.

PS - You can now access our blog at

Saturday, March 11, 2006

Officer Sparks Has a Corner Office

That's right, Public Safety Officer Sparks of The New Jersey Institute of Technology has the important job of ID checking so she gets a corner office! pshh pshh. Note: this is real.

Oh and I watched a skunk walk into the curb on the side of the road . . . multiple times. Not as interesting though as that time a squirrel fell out of a tree.

Thursday, March 09, 2006

I see lots of things!

This is another post from the taking things too literally school of thought. I think you will agree that there are very many things to see while travelling the subway. There are times when it requires utmost self control not to find the nearest police officer or MTA transit worker and tell them, with utmost feigned seriousness, about all of the things that I see. See how dull things can be when you want to avoid arrest?

Tuesday, March 07, 2006

Plants From Outerspace!!!

In a previous post I talked about a plant conspiracy against mankind. Now I have actually placed in my room a plant that could eat your hamster. Now of course everyone wants a carnivorous plant like the little venus flytraps that you can buy for a dollar at the Home Depot. However I have trumped this with the purchase (thanks mommy moot) of a large pitcher plant.

These pictures are courtesy of Yoni's camera.

Sunday, March 05, 2006

NJIT Awards me a PHD

I was walking around campus one bright beautiful morning after a snow when all of a sudden I saw the world before my eyes become a bit bluer. I got a little scared, nobody else around noticed anything, but to me things looked a bit blue, the snow that had been pure white a second earlier definitely looked a shade of light blue, was I going colorblind? Then I looked up, not a cloud in the sky . . . well there was this one cloud, a very well placed cloud that had just slid right in front of the sun leaving NJIT to bask in the light of the vast blue sky.

Perhaps this keen observation is why NJIT decided to award me a PHD
search this page for Lansey to see my new title used.

Thursday, March 02, 2006

Gremlins on Ice?

A while ago I blogged about a Loony Tunes episode which made use of the Russian folk songs "Song of the Volga River Boatmen" and "Dark Eyes" [see that post for details and music files]. Now, while a Ray Mears' show used the "The Volga Boatmen," I am pleased to report [thanks NotElon] that Sasha Cohen skated to "Dark Eyes" in the 2006 Winter Olympics in Turin, Italy. Although, apparently, she skated very well, I personally think that her routine would have improved had it involved some Gremlins from the Kremlin. It certianly would have gotten her the Russian judge's vote, although the German judge might not have appreciated it.

And now, for your viewing pleasure:
A very short clip of her routine, where you can only catch a few opening bars of "Dark Eyes," can be found on Google Video: [link]
The longer clip, which regularly killed my computer and needs Windows Media Player 7 and Internet Explorer, can be found on NBC's website: [link]