change speed of WAV playback?
bnikkel
Posts: 104
in Propeller 1
im using the wavplayer program with simpleIDE, is there anyway to speed up or slow down the playback speed of a wav track? thanks.
Comments
-Phil
Usually this kind of code will read the .wav header to get the playback sample rate (and other things). Usually around 24 to 48 kHz.
If you can find this part of the code, just change this number to be higher or lower to change the playback speed...
I figured the prop wasn't up to doing the pitch bending, so I decided to pitch bend the waves myself in a audio program, and save a bunch of them for different speeds.
And then play the set of waves for the speed I am running.
@JonnyMac does your object preserve the pitch? (i would imagine not?)
Wonder if audacity can do that...
Actually it can.
Think of a diesel engine as being like the human vocal tract. The pitch is controlled by the excitation of the vocal chords. In an engine, this would be the engine RPMs, which can vary up and down. But what gives speech its distinctive quality are the formants formed by resonances in the mouth and nasal cavity. These do not vary with pitch. In an engine, the formants are formed by resonances in the exhaust system: the manifold, exhaust pipe, muffler, and tailpipe. As with voice formants, these also do not change with pitch.
But adjusting the playback speed will change both the pitch and formant frequencies, rendering the engine with a different sound, rather than just revving higher. When this is done to a voice recording, you get Alvin and the Chipmunks, rather than hearing the same person singing at a higher pitch.
-Phil
Someone needs to get the prop running autotune code!
What say you phil, you wanna code that monstrosity of pointless....
oh nevermind, im sure the science behind autotune is much more complicated and interesting than the actual results and uses FOR autotune.
I didn't find any autotuned train engines on youtube.
Perhaps a new autotune trend should be started.
YouTube manages to change playback speed without changing pitch but I'm pretty sure this requires a lot of processing power and some very clever algorithms. My guess is they're using fourier transformations and lots of newt eyes for that kind of magic.
I'm betting they don't. YouTube recently added a "Custom" option that lets you set it to any arbitrary value. VLC has been able to do it in realtime for as long as I've used it.
Yeah, because we all run the youtube.exe application, just like VLC.exe
Mike
here is the begining of the spin file.