[PD] lower samplerate with block

Roman Haefeli reduzent at gmail.com
Fri Oct 9 13:22:23 CEST 2015


On Fri, 2015-10-09 at 01:09 -0300, Alexandre Torres Porres wrote:
> hi, I was testing a lower samplerate with block in the parent patch,
> and listening to it.

It would be interesting to know what patch you used to _listen_ to your
experiment. The attached patch simply shows that a down-sampled sine
still looks ok.

> sound is ruined in a way that is not explained or visible within
> what's going on in the patch. see attachment. If you lower it in the
> settings then it's fine... I really wonder why.

First, the help of [block~] and [switch~] states that they cannot be use
together with [dac~] and [adc~] in the same canvas. In order to listen
to that down-sampled sound, the signal needs to pass an [outlet~] which
also does re-blocking with different methods that can be specified by
arguments  (pad, hold, lin). All of them are quite simple and cause
artefacts. When you set a low sampling rate in the Pd settings, most
likely the audio-backend will resample the output of Pd to match the
sample rate of the audio card. The resampling algorithm used here is
much better and thus you don't get that heavy artefacts.

> 
> By the way, on a second note, I lowered it down to 1Khz and could lis
> ten a 440Hz sine wave alright, but getting closer to 500Hz, the sound
> quickly disappears. Not that this is really important, just curious.

Have you ever heard of the Nyquist-Shannon sampling theorem? The
sampling frequency needs to be at least twice the maximum frequency you
intend to sample (play or record). Anything above will be lost (if
filtered correctly, or else it will cause aliasing).

Roman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20151009/1684aba6/attachment.sig>


More information about the Pd-list mailing list