Searching for Audio Time-Stretching algorithm

Status
Not open for further replies.

Frank13

New member
Hello everybody,

I am searching for an algorithm for time-stretching audio data. I want to build a sound-module for model ships with a teensy 3.6. I would prefer a simple algorithm without using any complex libraries because the sound shall be in sync with some additional effects.

Has anybody an idea where I can start searching or already a useable algorithm?

Best regards

Frank13
 
Are you willing to accept the pitch shifting along with the time stretching? Like, if you make the sample longer, the pitch drops proportionally. If so, it's pretty easy.

But, if you want the pitch to stay the same while the length changes, that's harder.

Which do you need?
 
Hi,

I need the hard way... the pitch should stay largely where it is. The optimum range would be 50 to 200 %, otherwise I can use multible data files and switch to the "faster" or "slower" sound after for example 75% to 150%.

Greetings

Frank13
 
Yes, it will not work to just play the audio slower.
If you listen to a motor, it will not change pitch. The time between ignitions changes.
I could imagine to cut the audio in short pieces (with audacity) and to play these pieces, according to the rpm.
It should good with a player like this: https://github.com/FrankBoesing/Teensy-WavePlayer
Perhaps it would be good to add more iginition-independed "noise" audio by playing it in the background for other loud mechanics (transmission) or the exhaust system, etc.. to make it more realitic.
The mentioned player has a automatic "loop" system which will be helpful - i guess it can produce relatic sound with just changing the length of the loop.. (but as mentioned additional independed background sound would be good)
 
Last edited:
Can't you use the wave table synth object for that, as it already doing some down/up "frequency shifting" of the sound.
Just create "one sample" soundfont and use that.
I have no idea how it would sound like but you can try.
 
Hello everybody,

Thanks for the ideas! I will have a look at the wave table object later, just now I am trying the "simple" version: My sound has a start-sequence, a loop (only a few bytes long) and a end-sequence. I already programmed a player which repeats the loop as long I want. Now I will try to change the loop on my PC an then play the version of the loop corresponding to the speed. Hopefully it sounds good...

Greetings

Frank13
 
Status
Not open for further replies.
Back
Top