Stereo audio files wrong playback speed


#1

Hello, this is my first post here - started patching for the first time earlier today:slight_smile: So pls bare with me if this is trivial..

I have built a simple audio file player, using "wave/play fn stereo". It works great but the playback speed is too fast... However the mono version "wave/play fn" plays the same file in correct speed.

The same holds true for wave/play stereo (too fast) and wave/play (correct speed).

OSX 10.11, Axoloti 1.0.12

All the best!
Jonas


#2

If you want to use the wave/play fn stereo object, you need to make sure that your audio file is stereo as well.

Also best to use header-less RAW audio files, signed 16-bit PCM at 48.000 Hz. You can easily convert any audio file into this format with Audacity. WAV files have a header encoded in the file, which will result in a small click at the beginning when you play them back.


#3

Ahh yes ofcourse. I'm pretty sure all the sound files I tried are in mono. I did use Audacity to get the format right, so it must be the mono-files... Doh, why didn't I think of that... Will confirm tomorrow morning.

Thank you!
-Jonas


#4

Yes, problem solved.
However I did experience some weird things with Audacity. Even though I had converted a 96kHz audiofile to 48kHz in Audacity, exporting as .raw, resulted in 96kHz... So I used Switch (48kHz, 16 bit PCM (Intel Indian)) for the conversion instead, and that seems bulletproof.

Thank you, again!

-Jonas


#5

I just used ffmpeg to convert to a headerless 48000 stereo file

ffmpeg -i video.mp4 -ar 48000 -ac 2 -f s16le audio.pcm