Monday, November 16, 2009

PS3 Eye 4-channel Audio Tests on Ubuntu Karmic

The PS3 Eye is a great USB camera for experimenting. It can capture video at 320x240x120Hz, or 640x480x60Hz - much faster than the average webcam. The necessary drivers are built into the latest Ubuntu Karmic, allowing it to work straight out of the box.

As an added bonus, the PS3 Eye has a built-in 4-channel microphone array. It is apparently used for adaptive noise cancelling.

Out of curiousity I decided to see if the drivers would allow capturing 4-channel audio from the microphone array. I was pleasantly surprised to find that Audacity was able to record using the default USB ALSA drivers.

I measured the distance between the outermost microphones to be about 62mm. At an air temperature of 20°c that corresponds to (0.062/343)=0.00018s or about 180μs delay between channel 1 and 4.

Holding the PS3 Eye almost side-on and making a "tick" sound:



The two middle channels were reversed, however after flipping them the waveforms clearly show a delay between successive channels, and also a reduction of amplitude to the most distance microphone. It is what you'd expect, but still neat!

The highlighted selection above marks the zero-crossing for the second oscillation. Measuring the delay between the zero-crossings at several locations gave ~8 samples delay between channel 1 and 4.

At 44.1kHz, that is (8/44100) ~ 181.4μs or about 62.2mm separation. Thats close enough for me!

No comments:

Post a Comment