[PD] Re : Re: Is Pd clip the audio output?

Roman Haefeli reduzent at gmail.com
Fri Oct 20 22:35:45 CEST 2017


On Don, 2017-10-19 at 12:43 -0400, Jaime Oliver La Rosa wrote:
> The OS seems to be doing the clipping. Windows and OSX don't seem to 
> clip while linux, at least with alsa, does.

As someone else pointed out, it's not the OS, but rather the audio
backend is responsible for this. It's just the nature of an DAC that it
has a limited amplitude range. ALSA doesn't fuzz with your signal -
fortunately! - and thus it simply clips the audio if it exceeds the
limits (I know that not from reading the code, but from experience).
Jack doesn't clip anything. If you send a signal from Pd to Pd over
Jack, you can use the full range of 32-bit float. However, when you
send the signal through Jack (and ALSA as backend of Jack) to a
soundcard, then clipping occurs. 

I never really figured out what goes on with Coreaudio on macOS. It
seems there are multiple stages of processing (dynamic compression /
dynamic limiting) involved and the processing seems even dependent on
whether you use the built-in speakers or the headphone jack. If you
intend to do something more scientific, you're doomed. It's news to me
that similar processing goes on on Windows. Maybe that's something new
with Windows 10? 

Roman

> On 10/19/2017 11:21 AM, Nicolas Danet wrote:
> > 
> > Ok, thus if it there's a clipping it is "after" Pd (or at the I/O
> > API level). Thanks for the confirmation.
> > 
> > ----- Mail d'origine -----
> > De: Claude Heiland-Allen <claude at mathr.co.uk>
> > À: pd-list at lists.iem.at
> > Envoyé: Thu, 19 Oct 2017 17:10:12 +0200 (CEST)
> > Objet: Re: [PD] Is Pd clip the audio output?
> > 
> > On 19/10/17 15:56, Christof Ressi wrote:
> > > 
> > > -1 to 1 is the maximum range for floating point audio samples.
> > > there's nothing else you can do than clipping if you exceed that
> > > range.
> > A simple test on Linux with JACK shows that Pd doesn't clip audio
> > that
> > exceeds -1 to 1:
> > 
> > https://mathr.co.uk/tmp/jack-no-clip.png screenshot
> > 
> > Other API may be different, and the driver may clip (or do other
> > dynamics processing) before sending to the hardware.
> > 
> > > 
> > > > 
> > > > Von: "Nicolas Danet" <nicolas.danet at free.fr>
> > > > In the "A02.amplitude.pd" example it is claimed that:
> > > > 
> > > > "Amplitudes of audio signals can have any reasonable range, but
> > > > when you output a signal via the dac~ object, the samples
> > > > should range between -1 and +1. Values out of that range will
> > > > be clipped."
> > > > 
> > > > Is that still true in current version (Pd-0.48-0)?
> > I tested with a less current version:
> > 
> > $ pd -version
> > Pd-0.47.1 ("") compiled for Debian (0.47.1-3) on 2016/11/28 at
> > 20:56:10 UTC
> > 
> > 
> > Claude
> 
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/lis
> tinfo/pd-list
-------------- 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/20171020/7b9bd5c3/attachment.sig>


More information about the Pd-list mailing list