Re: [LAU] Resampling 48000hz samples down to 44100hz?

From: Frank Barknecht <fbar@email-addr-hidden>
Date: Sat Jan 30 2010 - 13:39:00 EET

Hallo,
Gabriel M. Beddingfield hat gesagt: // Gabriel M. Beddingfield wrote:

>
>
> On Fri, 29 Jan 2010, Andrew C wrote:
>
> > Hey all,
> >
> > Anyone know any quick ways to resample a large amount of .wav files with
> > spaces in them from 48000hz to 44100hz while still keeping the same wav
> > names?
>
> Using sox and the command line, you could do it like this:
>
> $ cd /path/to/wav/files
> $ for N in * ; do \
> sox "$N" -r 44100 "/path/to/resampled/files/$N" ; \
> done
> $

I use "sndfile-resample" from the libsamplerate tools - it has excellent
resampling algorithms. The bash line then would be:

$ for N in *.wav ; do \
     sndfile-resample -to 44100 -c 0 "$N" "/path/to/resampled/files/$N" ; \
   done

"-c 0" selects the resample method:

  The optional -c argument allows the converter type to be chosen from
  the following list :

       0 : Best Sinc Interpolator
       1 : Medium Sinc Interpolator (default)
       2 : Fastest Sinc Interpolator
       3 : ZOH Interpolator
       4 : Linear Interpolator

Ciao

-- 
Frank
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sat Jan 30 16:15:04 2010

This archive was generated by hypermail 2.1.8 : Sat Jan 30 2010 - 16:15:04 EET