Search results

  1. A

    Question regarding effect of changing sampling rate and block sample size on queues

    Hello, I am looking to record a short duration of sound and analyze the recorded queue for a particular frequency tone, and when it peaks in my recording. I am triggering the recording at the same time a tone is played from another teensy, and by processing the recorded queue I hope to...
  2. A

    Audio Play queue help

    Actually realized that by placing a small delay, I could get the output as expected. Also clearing the pointer helped. Sharing the code if anybody else find's it useful. /* SD -> pin 8 (in1)/pin 5 (in2) L/R -> GND/VCC (left/right channel) WS -> pin 20 (LRCLK1)/pin 3 (LRCLK2) SCK ->...
  3. A

    Audio Play queue help

    Made some changes to my code and pasting the complete one here. I think I would need to use the playBuffer() in the play queue taking in each 128 16 bit array at a time. I am calling two functions in the loop based on the trigger from the other teensy. The first one (back_end()) records data in...
  4. A

    Audio Play queue help

    Hi all, I am still trying to perform simple one way acoustic ranging through the audio library but keep having inconsistencies in the elapsed timing even after increasing the sampling rate. The idea I am pursuing is to see if I can record the sounds and post process the recording to detect the...
  5. A

    Discussion about a simple way to change the sample-rate

    Hi Frank, I wanted to tryout your sample rate changing code for the Teensy 4, which I pulled from CorBee's Bat Detector repo on github. It seems that it's not perhaps compatible with the Teensy 4 as I2S0_MCR & I2S_MCR_DUF are showing up as undefined during compilation. On a more recent thread...
  6. A

    Ranging using Teensy 4 + mic and speaker, timing variance issue

    This was very informative. Thank you! I'll have to read up more on this. From the snapshot of the audio library GUI, I see that two channels are being used from the i2s1 and then being fed into i2s2. I am currently using only a single mic so I guess I need to use just one channel? Also why do we...
  7. A

    Ranging using Teensy 4 + mic and speaker, timing variance issue

    Thanks Pete. Looks like without increasing the sample rate, FFT won't be practical for my application
  8. A

    Bat detector

    Thanks Cor, I'll have a look at it!
  9. A

    Bat detector

    Hi all, on recommendation from Frank I was going through this thread specifically looking to see if it is possible to increase the sampling rate for the audio library. On a few other threads here I saw that it is not an easy task. What changes were required to make it sample at 96khz in the bat...
  10. A

    Ranging using Teensy 4 + mic and speaker, timing variance issue

    Hey Pete, just a quick question, how did you come up with the FFT256 resolution of 50cm in water? I thought the time interval is only dependent on the sampling rate and FFT bin count? So with the same 5.8ms and sound would travel approx 7.3m in water right?
  11. A

    Ranging using Teensy 4 + mic and speaker, timing variance issue

    Pete, Frank, Chipaudette, thanks for the valuable information and feedback! My current setup is to develop a proof of concept in air, I only have a couple waterproof microphones but will have to wait till the university labs open back up again due to Covid-19 to do more tests in water for...
  12. A

    Ranging using Teensy 4 + mic and speaker, timing variance issue

    Hi Pete, thanks for the information! I guess I am limited by hardware in this case. Either way the maximum frequency I could get is 20Khz if I switch to perhaps a PDM microphone instead of the I2S one I have now. That might help reduce cycle time a bit. I don't have an electronics background...
  13. A

    Ranging using Teensy 4 + mic and speaker, timing variance issue

    Hi all, The project I am trying out is to do acoustic ranging using a Teensy 4 + speaker + I2S microphone. The issue I need help with is the large variance in the time elapsed between the sound being sent and heard. /* SD -> pin 8 (in1)/pin 5 (in2) L/R -> GND/VCC (left/right channel) WS...
  14. A

    Simple ranging with Teensy 4. Recurring beeps + FFT trouble

    Thanks Paul! That did the trick!
  15. A

    Simple ranging with Teensy 4. Recurring beeps + FFT trouble

    On further thinking, I think my issue is using the delay() command since that would stop everything and the FFT won't process during the time. I don't know of any other method of timing the beeps though :/
  16. A

    Simple ranging with Teensy 4. Recurring beeps + FFT trouble

    Hi all, The project I am trying out is to do ranging using a Teensy 4 + speaker + I2S microphone. My plan is to have a recurrent short 8khz tone sent via the speaker (while noting the time sent using elapsed time) and then listening to it via the Microphone + FFT and again noting the time...
  17. A

    Can't get FFT1024 to work with Teensy 4.0 and SPH0645 I2S Mic

    Great, thanks Pete! -Akshay
  18. A

    Can't get FFT1024 to work with Teensy 4.0 and SPH0645 I2S Mic

    I tried again and now I do get a response for the higher bins. Its more easy to see the change in the serial plotter, than monitor. I'd still like to know about the sampling rate and if it can be changed!
  19. A

    Can't get FFT1024 to work with Teensy 4.0 and SPH0645 I2S Mic

    Hi Pete, Yes if I remove the "failed" print I do get some low values for the first two bins. I tried a sweeping sine wave to see the response in other bins but nothing turns up just the "-" for them based on else statement (I kept the speaker close to the microphone, so it should have been...
  20. A

    Can't get FFT1024 to work with Teensy 4.0 and SPH0645 I2S Mic

    Hello! I am trying out an audio project which would require me to listen to a fixed frequency pulse which my microphone would hear and record the time of hearing. For this I am using the Teensy 4 + the SPH0645 I2S microphone (No audio shield). I have had success in using the peak and rms...
Back
Top