Teensy 3.0/3.1 Audio Library with sound pitch control

Status
Not open for further replies.
Thanks for the note, Paul. I am thankfully not speeding up the sound. I need to take a 24khz - 26khz sound and pitch shift it down to an audible range, maybe 12-13khz, or 6-7.5 khz if there aren't too many artifacts in the time stretch

I am trying to test using 27khz frequencies but I either am having a hard time generating a frequency or I am having hard time sensing it with the teensy. I have to test a sound generation device that I don't have in my hands just yet. I will be ordering a few of these ultrasonic transducers to see how they fare with the teensy mic in.
http://www.mouser.in/ProductDetail/Kobitone/255-250SR16P-ROX/?qs=sGAEpiMZZMvtrnhC60i%2bOsZHfFLa1IkJ

There is a corollary to Paul's comment.
If you use a sampling frequency of 44 kHz (say PJRC audio card with Audio software) you cannot have frequencies above 22 kHz. so your 27 kHz does not exist after the ADC.
If you use 96 kHz sampling rate with your own software, then you can do it.
 
There is a corollary to Paul's comment.
If you use a sampling frequency of 44 kHz (say PJRC audio card with Audio software) you cannot have frequencies above 22 kHz. so your 27 kHz does not exist after the ADC.
If you use 96 kHz sampling rate with your own software, then you can do it.

ugh, good point. I did not think of that. dang.

Would it be possible to do 16bit/96khz? Has anyone played with this using the audio library?
im poking around the control_stgl5000.cpp and it seems like I can change the sample rate to 96khz somehow, but I am guessing that most of the DSP code for the audio library would not work as expected...
 
A few people have played with running the audio library at higher sample rates, with some levels success. As far as I know, nobody has truly verified all of the library at any other sample rate. I don't have links handy to those messages.
 
So I found a device which does a form of varispeed / playing a WAV back at a different sample rate. The Radio Music module. It doesn't appear to use the teensy audio lib, but I am wondering if the code could be integrated into the audio lib somehow.

If you look here:
https://github.com/TomWhitwell/Radi...e86ab402bca6adc9e7b0/RadioMusic/SDPlayPCM.cpp

there is a function SDPlayPCM::update() which utilizes a variable called playbackSpeed.

I haven't dug too deep into this yet, but I will be soon.


EDIT: it DOES in fact use the audio library... https://github.com/TomWhitwell/Radi...e86ab402bca6adc9e7b0/RadioMusic/AudioEngine.h

ok, I gotta dig deeper into this...
 
Any news regarding this?

So I found a device which does a form of varispeed / playing a WAV back at a different sample rate. The Radio Music module. It doesn't appear to use the teensy audio lib, but I am wondering if the code could be integrated into the audio lib somehow.

If you look here:
https://github.com/TomWhitwell/Radi...e86ab402bca6adc9e7b0/RadioMusic/SDPlayPCM.cpp

there is a function SDPlayPCM::update() which utilizes a variable called playbackSpeed.

I haven't dug too deep into this yet, but I will be soon.


EDIT: it DOES in fact use the audio library... https://github.com/TomWhitwell/Radi...e86ab402bca6adc9e7b0/RadioMusic/AudioEngine.h

ok, I gotta dig deeper into this...

Hey, 5 years later.. :)

Any news with this? Someone did it and changed playback speed?
WAV files from SD card or code samples? maybe Teensy 4.0 helped?

Will be very happy to hear if there is progress.
 
Status
Not open for further replies.
Back
Top