WWV Ticks

Share your advanced PureBasic knowledge/code with the community.
Posts: 745
Joined: Mon Oct 24, 2005 1:05 pm

WWV Ticks

Post by chris319 »

Here is a silly little program.

It emulates the "ticks" of WWV, the U.S. standard time and frequency radio station. All you need to do is make a wav file consisting of 5 cycles of a 1,000 Hz sine wave. My wav file has a sample rate of 100,000 Hz to make it easier to check the calibration. Of course this is only an approximation of the true time and frequency. Sorry, I do not have ready access to a cesium-fountain clock so I'll have to settle for an approximation. :D
WWV transmits audio "ticks" once per second, to allow for accurate manual clock synchronization. These ticks are always transmitted, even during voice announcements and silent periods. Each tick begins on the second, lasts 5 ms and consists of 5 cycles of a 1000 Hz sine wave.

Code: Select all

result = LoadSound(1, "D:\Data\Radio\WWV tick 100000.wav"); 5 CYCLES @ 1000 Hz; 100,000 Hz SAMPLE RATE
;Debug result
PlaySound(1,0,100);TICK IS 5 ms IN DURATION