So, the bats that live in my garden (and scare my Son) make calls in the range 20-60khz.
I have an adafruit electret microphone, which is spec rated up to 20khz, but I've heard can give some response 'up to 60khz'.
I have a teensy 3.1 (which is amazing!)
I have a adafruit mono amp and speaker.
I've worked through various examples, I just can't quite fit all the pieces together, so I'm asking for advice.
Plan:
1) Record a buffer of audio from the microphone as fast as I can (ideally 96khz+)
2) FFT the audio - identify if there are any signals in the 20-60khz range - if not, chuck away sample and recollect.
3) Shift the frequencies down to an audible range
3) iFFT the data to recover the shifted audio signal
4) playback the data (so you can hear an audio representation of the bat call)
I started working with the adafruit 'fun with FFT' tutorial (https://learn.adafruit.com/fft-fun-with-fourier-transforms/overview-1), which is very helpful - but this is based on a microsecond delay for the sample collection timing, and I don't know how to rewrite it to collect samples faster.
Today, I discovered the Teensy Audio library, which also has a great FFT example - but I don't see an inverse FFT offering? (I understand arm library can do it)
I still need to up the sample rate from 44khz to 96khz (mono, happy to sacrifice a few bits of quality).
So, can anyway offer any advice on:
1) Sampling at 96khz
2) Inverse FFT in Teensy Audio library
All other comments and suggestion welcome.
I have an adafruit electret microphone, which is spec rated up to 20khz, but I've heard can give some response 'up to 60khz'.
I have a teensy 3.1 (which is amazing!)
I have a adafruit mono amp and speaker.
I've worked through various examples, I just can't quite fit all the pieces together, so I'm asking for advice.
Plan:
1) Record a buffer of audio from the microphone as fast as I can (ideally 96khz+)
2) FFT the audio - identify if there are any signals in the 20-60khz range - if not, chuck away sample and recollect.
3) Shift the frequencies down to an audible range
3) iFFT the data to recover the shifted audio signal
4) playback the data (so you can hear an audio representation of the bat call)
I started working with the adafruit 'fun with FFT' tutorial (https://learn.adafruit.com/fft-fun-with-fourier-transforms/overview-1), which is very helpful - but this is based on a microsecond delay for the sample collection timing, and I don't know how to rewrite it to collect samples faster.
Today, I discovered the Teensy Audio library, which also has a great FFT example - but I don't see an inverse FFT offering? (I understand arm library can do it)
I still need to up the sample rate from 44khz to 96khz (mono, happy to sacrifice a few bits of quality).
So, can anyway offer any advice on:
1) Sampling at 96khz
2) Inverse FFT in Teensy Audio library
All other comments and suggestion welcome.