For that last two days I've been working out how to pull the 'current' dominant sound frequency (or tone) out of a digital audio stream. This is done using something called a "Fourier Transform". This is a complex algorithm based on some pretty heavy duty calculus. I don't know calc. Never did. I did have working C code that did what I needed (which I paid for a couple of years ago) so I decided to just transcribe that code into Java.
The transcription itself really wasn't that hard. It took a couple of days mostly because I insist on understanding at least some of what I'm writing. I felt really bad though at using code to do something I didn't really understand well until I read this paper on the subject. Apparently, you're not really supposed to understand it much. Its just the basis for the entire industry and how they map analog data to digital and back again.
Basically, an audio stream is not at all a continuous series of "tones" and "volumes" as I'd sort of expected. Its a sequence of snapshots showing the plotting of a sin wave as it changes across moments in time. To make matters worse, they're not really snapshots. They're a measure of the amount of change, positive or negative, in the way from the previous point. Click here for a more scientific explanation.
Suffice it to say that I couldn't even read the explanations I found first, because I don't even know the names of the symbols being used. And yet, here I am at the end of the third day with reliable code which can accurate pull the 'dominant' Motorola reed tone out scanner radio traffic and pinpoint when a specific tone sequence is used to activate one group or another. Its all part of a new service offering I hope to rollout within 30 days.
Comment Entry |
Please wait while your document is saved.