Reputation: 41
I am recording a fsk signal with a preliminary tone before it. The sample rate is 8000 (samples/sec) and the frequency of the preliminary tone is 440Hz (represnted with 8192 samples - played approximately for 1 second). The signal of the data contains two frequencies, 934Hz for '1' and 510Hz for '0', the encoded message is the char '8' (00111000) each bit is represented using 8192 samples, the signal of the data comes right after the preliminary tone. I used the following code to capture the audio bytes, the only difference is that I am writing them to a ByteArrayOutputStream. https://stackoverflow.com/questions/23432398/audio-recorder-in-android-process-the-audio-bytes
I am trying to find the point where the frequency shifts from 440Hz of the preliminary tone to the frequency representing the bit '0' (510Hz). The general idea of what I am doing is to decode the message. I am using the FFT algorithm, with a Hann window and the HPS method (http://cnx.org/contents/8b900091-908f-42ad-b93d-806415434b46@2/Pitch_Detection_Algorithms) (I know it's not the best way and there are other algorithms that could perform better, but those are my instructions for now).
Is there any way to detect this point? Can I use the FFT to do it?
Upvotes: 1
Views: 774
Reputation: 70703
3 sliding Goertzel filters of length 8192 would work. Estimate the frequency transition/change times to be at the points where you find a maxima in the difference between the magnitude outputs of any 2 sliding filters.
Also check your tone gemerator and microphone to see if it they have a decent frequency response that low in frequency, which might be why you are detecting overtones instead.
Upvotes: 0