Page 1 of 1

Time stamp information in Audacity

Posted: Thu Nov 11, 2010 7:02 am
by chantrip
Dear all

I'm a newbie to Audacity and have a problem in audio synchronization. My project is using distributed PCs/laptops deployed in a certain area to detect the sound's arrival time and triangulate its origin. To do this all PCs/laptops (I would call sensor nodes) must be synchronized (around 0.1 millisecond is fine). I have a clock server to synchronize all sensors using NTP. Every sensor has Audacity software installed and ready to use. I have a script broadcast to every sensor node to order Audacity to record, stop and export files into a server (basically a command 'R' and 'S'). However, when I tested the system by placing all sensor nodes closed to each other, there's a time shift among files recorded from different sensor nodes. I suspect that even though the CPU clock are synchronized, the time each sensor takes to process the command 'R' and 'S' are different. My idea is to edit the Audacity source code by, after receiving 'R', saving the time stamp in each sensor before the sound is sampled and saved in the memory and export this time together with the wave file to the server. Can anybody suggest me how to do this? or where in the source code that I should check it? Also, any other ideas to synchronize recording audio files are welcome :).

I use m-Audio sound card. The sensors that I use are 2 Fujitsu laptops and 2 PCs with Intel Core2Duo.
Audacity 1.2.6

Cheers and thanks a lot :)

-Jim

Re: Time stamp information in Audacity

Posted: Fri Nov 12, 2010 12:30 pm
by steve
There are a lot of factors that will affect the precise time that Audacity will start recording (and not all of them are in Audacity).
I would suggest taking an alternative approach to the problem:

Set your sound cards to record "Stereo Mix" (http://wiki.audacityteam.org/wiki/Mixer ... trol_Panel ) so that you can record from the sensor and any other sound that is playing on the computer.

Start all computers recording, then send a signal to each (over Ethernet, or however you have them networked) to play a sound (just a simple "click") by any method you like as long as it responds fast. This will create a "timing mark" on the Audacity track that can act as a synchronisation reference.

Re: Time stamp information in Audacity

Posted: Sat Nov 20, 2010 7:03 am
by chantrip
Hi Steve

Thanks for your post. Yep, I agree with you. I tried to synchronize them for a week and there are too many parameters involved. I think yours should be fine.

-Jim