[PD] change samplerate locally

Charles Henry czhenry at gmail.com
Mon Mar 16 13:37:51 CET 2009


On Sun, Mar 15, 2009 at 2:44 AM, hard off <hard.off at gmail.com> wrote:
> to re-create the sound of a dx7 i need to change samplerate from my default
> (44.1khz) to 28khz.
> globally changing pd's samplerate to 28khz has the intended effect, but i
> want to be able to run other patches at 44.1khz while running my dx7 at
> 28khz.

One thing that occurs to me is that the quality of the reconstructed
sound has more to do with the interpolator rather than the sample
rate.

The actual output is an analog signal which is obtained by
interpolating samples.  Most audio systems use linear interpolation,
which has characteristic spectral characteristics.  A low-end or
possibly obsolete system may use sample-and-hold rather than
interpolation.

Probably, there's a high-frequency "sizzle" that you want to emulate
here.  To get that full sound (an analog signal), there's a freq
domain transformation that should work.

It comes from the linear interpolator.  It actually leaves some sound
in the range from 14kHz to 22.05kHz.  To reproduce the effect, you
would fold over frequencies from 5.95kHz to 14 kHz into 14kHz to
22.05kHz.  Then you would apply the spectrum of the interpolator,
which will reduce but not eliminate the high frequencies.

I haven't worked it all out.  That's as far as I got this weekend.

Chuck


>
> i naively tried adding this construct to the output, but the sound is
> completely wrong:
> (if it doesn't show, the phasor~ is connected to the right inlet of the
> [samplehold~])
>
> [inlet~]           [phasor~ 28000]
> |                      |
> [samplehold~]
> |
> [outlet~]
>
> i thought about it for a bit, and i understand why that doesn't work, but i
> can't think of another solution.
>
> is there some way i can 'mimic' 28khz samplerate while running pd at 44.1?
> or even better, is there some way to locally set the samplerate for a
> patch?  i tried messing round with [block~] but i can't make it do what i
> need.
>
> also, i need to mimic a 12bit DAC~ too.
>
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>




More information about the Pd-list mailing list