Voklmar Vogel
Voklmar Vogel

Reputation: 95

Generation and detection of tones

I am looking for a successful method to identify self-generated sounds.

My idea is to spend even two different sounds over stereo. The two tones differ in their frequency. The tones I turn then back on a self-made cables for the microphone. The cable has two switches, which switches between the left or the right channel.

I want to note which of the two frequencies arrived at the microphone input, and then count them.

I've tried many things, but nothing brought the desired success. Well, I came across DTMF, but the implementation in Android is insufficient.

Does anyone have any idea what I can try next?

Upvotes: 1

Views: 937

Answers (2)

hotpaw2
hotpaw2

Reputation: 70703

You can use FSK modulation and demodulation. You don't need an FFT, as this can be done more simply by narrow-band DSP filters (a couple of Goertzel filters), or quadrature demodulators.

Upvotes: 1

Scott
Scott

Reputation: 2922

You need to take the Fast Fourier Transform (FFT) of the input audio. What you would need to do is capture a short window of audio, run an FFT, and then analyze the result. FFTs are a bit a complicated if you're not familiar with them, but it's possible to count and measure tones, provided that they're sufficiently separated in frequency.

Upvotes: 2

Related Questions