Re: [linux-audio-user] resampling ardour's files with sox...no way... sndfile-resample rocks

From: MarC <marc_contrib@email-addr-hidden>
Date: Sun Mar 06 2005 - 23:29:11 EET

En/na Erik de Castro Lopo ha escrit:

>On Sun, 06 Mar 2005 18:56:18 +0100
>MarC <marc_contrib@email-addr-hidden> wrote:
>
>
>
>>sbdy told me to resample ardour's files with sox...
>>Have I done anything wrong or it is not possible?
>>
>>marc@email-addr-hidden:~/ardour/sounds$ sox Audio\ 1-9.wav -w -r 44100 foo.wav
>>resample
>>sox: Failed reading Audio 1-9.wav: Sorry, this WAV file is in IEEE Float
>>format.
>>
>>
>
>Try using sndfile-resample instead of SoX.
>
>Sndfile-resample is part of libsamplerate:
>
> http://www.mega-nerd.com/SRC/
>
>Erik
>
>
Thank you Erik. Great program!

I did it with http://www.mega-nerd.com/SRC/. However when I started
again ardour and played the song, at the beginning of each inserted WAV
the sound was muted (as if it was clipped). It is an ardour problem as
with rezound I checked that the files were perfectly upsampled. Finally,
in ardour, I had to trim some WAVS at the beginning and everything was
solved. Weird but worked.
I paste here the script I executed in the "sounds" folder of the
ardour's session, to upsample my WAVS to 48k. Hope it is useful for sbdy.
Don't use it without making a copy of the ardour's session before
because of the problems I have already commented above.

#!/bin/sh
if [ "$1" = "" ]
then
RATE=48000
else
RATE=$1
fi
echo "All wav files will be overwritten upsampled at ${RATE}Hz, be
careful. Press Enter to continue..."
read

for file in *.wav
do
echo "Upsampling to ${RATE}Hz $file..."
sndfile-resample -to $RATE "$file" "$file.tmp"
mv "$file.tmp" "$file"
done
Received on Mon Mar 7 00:15:11 2005

This archive was generated by hypermail 2.1.8 : Mon Mar 07 2005 - 00:15:11 EET