Jim Audiomisc
pfm Member
I use WFGui for setting speed and W+F tests on tape decks, it can use 3000 and 3150 Hz tones, something that could tell me what the frequency was if not close to 3000 or 3150 Hz would be useful as WFGui starts rounding to the nearest 5Hz if it's far off. I have a half speed cassette deck and reel to reels to set the speed for too.
The program I've written takes in a 10 sec chunk of recording and measures the mean frequency over that time with an accuracy of a few parts per million. Should work over a range from somewhere below a 1kHz up to around 10kHz. It then uses this mean as the base for scaling the deviations.
Its basically what on a lab bench would be called a frequency counter. It scans the samples looking for waveform zero crossings, and counts how many there are. It also counts how many samples these cover from the first to last. It then knows how many cycles there are in about 10 sec with a precision of about +/- a sample interval. So for a 1kHz-ish tone it finds about 10,000 cycles over about 10 sec and knows the time taken to about +/- 1/96000 th of a sec. i.e an accuracy of 1 part in 960000. In practice it isn't perfect, so you get something around a few ppm.
The short term 'instantaneous' values use successive shorter chunks. But there I add in doing an interpolation to esitmate where between samples the crossings should be at the start and end of the count.
Provided you have a high tone/noise ratio this can work quite well.
Jim