hi, I was testing a lower samplerate with block in the parent patch, and listening to it.
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.
By the way, on a second note, I lowered it down to 1Khz and could listen a 440Hz sine wave alright, but getting closer to 500Hz, the sound quickly disappears. Not that this is really important, just curious.
cheers
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.
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.
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
I thought the issue with dac was just about changing the block size to anything other than 64 - when it shuts down and gives the "bad vector size" warning. But yeah, it makes sense that there's a conflict issue like that.
Sampling frequency needs to be at least twice the maximum frequency you
intend to sample.
Sure, but I was mentioning the case where the sampling rate was 1Khz and the frequency less than 500Hz. If you do it, you'll still be able to listen to 440Hz, but if you raise it up towards 500Hz, you'll hear it disappearing very soon before reaching 500Hz. I'm sure I'm pushing things with such a small sample rate, but it's curious anyway, and same kind of thing seems to happen for higher sample rates, I'm just not good at listening to 10Khz and stuff.
cheers