However, it's probably wise to clip the signal before sending it to dac~. Entirely for health and safety reasons!




www.peimankhosravi.co.uk || RSS Feed || Concert News


On 21 December 2013 13:48, IOhannes m zmölnig <zmoelnig@iem.at> wrote:
On 2013-12-20 23:34, Martin Peach wrote:
> On 2013-12-20 16:55, Alexandre Torres Porres wrote:
>> Hi there, where can I find info about headroom and clipping on Pd. Or
>> can anyone tell me quickly how it goes?
>>
>> Does it always really clip over a maximum of 1, or is there some
>> headroom? Does it depend on the audiocard or something?
>
> The soundcard will always clip above +1 and below -1, and sometimes even

yes, but the output of Pd (what you send to [dac~]) is not necessarily
sent directly to the soundcard: e.g when using jack, the samples will be
passed as floating point values to the next client: so samples exceeding
-1..+1 need not clip at all.
you can confirm this by connecting the output of Pd to the input of Pd
via jack, and send a [osc~ 440]*10 ...

but when you connect this output to the system output, you will get
clipping.

afaik, you get something similar on OSX, where the (portaudio) API will
take floating point samples, and the signal gets sent through a limiter
to prevent obvious clipping.

so the bottom line is: hardware always has a physical range limit (that
is mapped to -1..+1).
but Pd is software and some audio APIs can handle sample values in
floating point format just fine. with these, you most likely don't get
any *immediate* problems if the range exceeds -1..+1.
however, how excessive samples are handled is highly depending on the
audio API and eventually other components in the signal chain.
so if you do want to output signals that are outside -1..+1, you are on
your own (from Pd's perspective).


> within those limits (if the interpolated waveform between samples goes
> over the limit).

well, the reconstruction filters in the DAC won't necessarily clip in
this case.


gfamdsr
IOhannes


_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list