[CM] Resampling in SND

e deleflie edeleflie@gmail.com
Tue, 22 May 2007 17:43:39 +1000


I have to admit that I am stumped by src-sound .... I cant for the
life of me work out how to resample a file from 48000 to 44100 ....
I've read the documentation a dozen times, but I still dont understand
what is expected from the parameters.

src-sound (num-or-env :optional base snd chn edpos)

The documentation says "The argument 'num-or-env' can be either a
number or an envelope. In the latter case, 'base' sets the segment
base ...."

It is never stated what the first case ('num') is supposed to
represent. I've tried putting 44100 ... assuming that 'num' is
supposed to be the new sample rate. But this gives clearly incorrect
results.

Also, what is meant by the segment base?

Are there any examples anywhere?

Etienne

On 5/22/07, e deleflie <edeleflie@gmail.com> wrote:
> I've noticed that save-sound-as contains a field for sample rate  ...
> I've tried putting a different sample rate in there but there was no
> conversion.
>
> What about if I want to change the bit-depth (from 16 to 24)? how
> would I do that?
>
> Etienne
>
> On 5/18/07, Bill Schottstaedt <bil@ccrma.stanford.edu> wrote:
> > >  can anyone advise on the best quality re-sampling option?
> >
> > src-sound is Snd's resampler; its quality depends to some extent
> > on the sinc-width (this sets the length of the section of sound that
> > is convolved with a sinc function during the conversion).  The
> > src speed is directly proportional to this width, so its default in
> > Snd is 10 -- this is about as small as it can be, so you will sometimes
> > hear artifacts -- Perry Cook liked 40 as a default, and I've heard
> > cases where I had to use 100 -- listen to the result and if it
> > sounds fine, you've got the right choice.  Look under sinc-width
> > in extsnd.html for a test case.
> >
> >
>