[PD] Re: Downsampling to 8KHz
mott at reverberant.com
Tue Apr 12 08:26:57 CEST 2005
i typed too soon. I realise now i need to provide a multiple of 2 and
not something divisible by it.
still i'm left with a problem where I need to deal with files at 44100
and 8000Hz. I can compromise perhaps by running Pd at 32000 and using
block with a up/downsample value of 0.25 to write and read 8k files. I'm
not too keen on running it at 32k though. Any ideas?
On Tue, 2005-04-12 at 14:57 +1000, Iain Mott wrote:
> hello list!
> I'd like to be able to downsample to 8000Hz in a sub-patch in order to
> save a file at that rate and encode it in the "speex" format (speex is
> optimised to deal with 8k files). Because block~ and switch~ specify the
> downsampling factor in reciprocal form (eg. 0.5 is a factor of 2, 0.25 a
> factor of 4 etc), I find i'm stuck specifying a factor of 6 (running Pd
> at 48k a 6-fold downsample will give me 8k). Because the reciprocal of 6
> is a recurring number and there's no quantising of values in the source
> to find the nearest multiple of 2, errors result when trying to specify
> a 6-fold downsample (eg. a number like 0.16666).
> Can anyone see a solution to this - besides altering the source or using
> a utility such as sox to do the conversion to 8k (which i'm doing
> presently). Would it be useful to anyone else if block~ and switch~
> could quantise to multiples of 2? ie. could this be included in
> subsequent pd releases?
> cheers, iain
> Iain Mott
More information about the Pd-list