<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Not clipping! (?) OMG, MY BAD, NEVERMIND]]></title><description><![CDATA[<p>I accidentally discovered that I can send audio streams with +/- 1.4 peaks to [dac~] and it doesn't clip on either my 01V96i or MOTU ultralite 4, although the analog output levels are different.  I always thought +/- 1 was full scale.  What's going on?  The mixer can be connected via S/PDIF or USB and the MOTU via USB, so I'm guessing those links can handle numbers &gt; 1 and &lt; -1 (what's the maximum?), and the fact that my converters produce different output levels for the same numbers means there's no standard?  And 1.4 suggests that the actual limit might be 1.4142 = sqrt(2) = pow(cos(pi/4), -1).  If true, what's the significance?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 09:17:56 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/14116.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 31 Oct 2022 11:13:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Thu, 03 Nov 2022 01:34:56 GMT]]></title><description><![CDATA[<p>I accidentally discovered that I can send audio streams with +/- 1.4 peaks to [dac~] and it doesn't clip on either my 01V96i or MOTU ultralite 4, although the analog output levels are different.  I always thought +/- 1 was full scale.  What's going on?  The mixer can be connected via S/PDIF or USB and the MOTU via USB, so I'm guessing those links can handle numbers &gt; 1 and &lt; -1 (what's the maximum?), and the fact that my converters produce different output levels for the same numbers means there's no standard?  And 1.4 suggests that the actual limit might be 1.4142 = sqrt(2) = pow(cos(pi/4), -1).  If true, what's the significance?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Thu, 03 Nov 2022 01:34:56 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Mon, 31 Oct 2022 18:53:48 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> Not gospel...... because there are so many unknowns.<br />
The values sent will not actually be between -1 and +1 but will be (probably signed)  integers between -32768 (?) and 32767 for 16bit.<br />
Pd processes at 32bit floating point.... so much bigger integers.. and can write those values to files.<br />
But usually a stream will be 16 or 24bit.<br />
Maybe the Pd value of 1 represents 32767..... a safe(ish) value for a 16bit stream for the computer internal soundcard.</p>
<p>But your usb soundcards are probably 24bit and so can accept much higher values without an integer overflow.<br />
SPDIF 20bit or sometimes 24bit.<br />
I don't know whether the bit depth is negotiated and the integer range scaled at the output from Pd, but maybe not.</p>
<p>Right from the birth of digital audio there was no standard for the ADC circuit.... sometimes it would accept 0dBu, often +18, or something else.</p>
<p>The numbers are streamed out of Pd to the OS, routed by the drivers..etc.<br />
What happens to the numbers after that, or even during that process?<br />
What do individual manufacturers do to keep their idiot customers happy?</p>
<p>As long as there are no integer overflows, and they arrive at the DAC within its range, there will be no clipping.<br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/2</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Mon, 31 Oct 2022 18:53:48 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Mon, 31 Oct 2022 20:52:24 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> I'd be curious if anyone sees analog output clipping at +/- 1.1 and if anyone <em>doesn't</em> see clipping at +/- 2.  That 1.4142 thing seems too...um...<em>spooky</em>.  Happy Halloween.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/3</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Mon, 31 Oct 2022 20:52:24 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Tue, 01 Nov 2022 00:54:33 GMT]]></title><description><![CDATA[<p>My understanding (based on educated guesswork) is that the audio chain remains floating point until the last possible moment. It does not make sense for the OS's audio-mixing framework to convert incoming streams to integer <em>before</em> mixing because then you would lose the ability to prevent clipping by turning down the master volume. Even Windows is not that stupid.</p>
<p>So this... &quot;The values sent will not actually be between -1 and +1 but will be (probably signed) integers between -32768 (?) and 32767 for 16bit&quot;... is true <em>at the hardware driver</em> level but not at the OS mixer level.</p>
<p>Pd must be outputting floats.</p>
<p>I would have assumed that the OS (or JACK etc) would map +/- 1.0 onto the integer samples' full scale. But I suppose there is no guarantee of that. There's nothing really to stop the OS mixer from attenuating before providing the integer samples to the driver. We <em>assume</em> that it isn't doing this, and assume that it's spooky otherwise, but... I never read anywhere that there's an ironclad promise not to.</p>
<p>Incidentally sqrt(2) is very very close to +3 dB -- 10 ** (3/20) == 1.4125375446228, sqrt(2) == 1.4142135623731. 3 dB isn't an arbitrary value in audio engineering <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title="wink" alt=":wink:" /></p>
<p>So one explanation could be that something in between Pd's audio output and the hardware driver is attenuating by 3 dB. What that might be, I've no idea.</p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/4</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Tue, 01 Nov 2022 00:54:33 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Tue, 01 Nov 2022 06:43:45 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> I know MacOS limits the output but I thought that was only for the built-in sound.. but maybe some OSes also limit going to external dacs</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/5</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Tue, 01 Nov 2022 06:43:45 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Tue, 01 Nov 2022 12:22:08 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/seb-harmonik-ar">@seb-harmonik.ar</a> I just tested the line out of my 2012 MacBook Pro 10.14.6 and it goes up to 1.4 without clipping too!  Puny signal though.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/6</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Tue, 01 Nov 2022 12:22:08 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Tue, 01 Nov 2022 14:31:18 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> Since the &quot;loudness wars&quot; the EBU R 128 spec recommends a maximum of -3dB as lossy codecs will often clip at just above.  I know that at least one pci soundcard card adjusts its metering for that spec, even though it is a broadcast spec, as it has madi output with aes/ebu.</p>
<p>I cannot find anything that points to whether Miller or the computer industry decided on your 1.4.<br />
Only that devices are different..... i.e. old ios didn't use floating point because it couldn't do the maths fast enough.</p>
<p>You need high impedance headphones with most laptops as their voltage rails are 3.3V nowadays.  Even when they were 5V audio out was puny.  The MacBook pro only delivers 3V RMS to the headphone socket.<br />
And 32bit floating point has a dynamic range of 1528dB....! ... be careful out there...!...<img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/fire.png" title="fire" alt=":fire:" /><br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/7</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Tue, 01 Nov 2022 14:31:18 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Wed, 02 Nov 2022 00:44:27 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> said:</p>
<blockquote>
<p>And 32bit floating point has a dynamic range of 1528dB....! ... be careful out there...!...<img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/fire.png" title="fire" alt=":fire:" /></p>
</blockquote>
<p>That's a joke, right?</p>
<p>Let's do a thought experiment. Let's say you have binary floating-point samples where the maximum exponent is 4 and you have 2 bits below the point. Then the maximum value is 1.11 * 2^4 = 11100 = 28. If you had all the bits of precision, the maximum would be 31 (the largest integer less than 2^(4+1)). So the maximum quantization error due to the limited precision of the mantissa is 3 = 2 ^ (max exponent - mantissa bits) - 1.</p>
<p>If we increase the maximum exponent to 5, the same holds: max possible value = 111111 = 63, max encodable = 111000, max error = 7.</p>
<p>If we increase the maximum exponent to 127 (max allowed in single precision), and allow 23 bits below the point, then the error is 2 ^ (127 - 23) - 1 = 2 ^ 104 - 1, or on the order of 2 * 10^31.</p>
<p>This is the noise part of signal-to-noise ratio. It's the maximum noise. The overall noise level is the integral of the quantization error function (which is the absolute value of the difference between y and quantized y, where quantized y is a piecewise function) divided by the x range (something like that) and this will be lower than the max.</p>
<p>Of course, if you have an audio signal scaled up to 2^127, then <em>some</em> samples might reach the peak, but many will be lower amplitude, and their quantization error will be lower. So the overall SNR should be higher than the worst case at the top of the range. But quantization error must integrate over the absolute value, so the lower error at small amplitudes does not cancel out the astronomical error at high amplitudes.</p>
<p>Yes, I've seen the articles producing that bogus 1528 dB figure. The mistake they make is to assume that quantization error is equally distributed throughout the range, and that the magnitude of this quantization error is proportional to the smallest representable value. This is a fundamental reasoning error. To understand how to think properly about quantization error, read <a href="https://www.analog.com/media/en/training-seminars/tutorials/MT-229.pdf" rel="nofollow">https://www.analog.com/media/en/training-seminars/tutorials/MT-229.pdf</a> .</p>
<p>I'm quite bothered by this, actually. Some marketing bros use faulty math to claim that &quot;our soundcard can give you 1528 dB dynamic range!!1!1!!&quot; and then this goes to the top of search results, and gets repeated as folklore. But it's nonsense. It needs to be stopped.</p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/8</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Wed, 02 Nov 2022 00:44:27 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Wed, 02 Nov 2022 08:14:32 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ddw_music">@ddw_music</a> True... of course no soundcard is going to give such a range... but the lies in audio marketing are legion and &quot;musician&quot; and &quot;space&quot; nearly synonyms.<br />
I thought we (but probably just me) were discussing internal IEEE standard processing wrt 32bit floating point. Anyway its a bit more complex than that.  A better read on the subject of quantization error imhb...... <a href="https://www.analog.com/en/technical-articles/relationship-data-word-size-dynamic-range.html" rel="nofollow">https://www.analog.com/en/technical-articles/relationship-data-word-size-dynamic-range.html</a><br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/9</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Wed, 02 Nov 2022 08:14:32 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Wed, 02 Nov 2022 10:21:47 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> said:</p>
<blockquote>
<p>I thought we (but probably just me) were discussing internal IEEE standard processing wrt 32bit floating point.</p>
</blockquote>
<p>Sure, and no dispute. Audio software generally assumes that floating point +/- 1.0 is full scale, and indeed I always assumed that. But if something in the chain is reducing by 3 dB then Pd wouldn't have any control over that.</p>
<p>In any case, I mainly wanted to note that this is one case where Google doesn't help.</p>
<p>Incidentally there were some extensive debates in SuperCollider land over whether SC should or should not clip to +/-1.0. Apparently in Mac, there might not be any limiting or clipping within CoreAudio before applying the system volume control. If something blows up, you might get a 700 dB signal out of SC, which would be attenuated by up to just a few dozen dB at the system volume control = full range distorted signal into your earphones, call your doctor. So pd isn't the only place where signals beyond full scale got passed through.</p>
<blockquote>
<p>A better read on the subject of quantization error imhb...... <a href="https://www.analog.com/en/technical-articles/relationship-data-word-size-dynamic-range.html" rel="nofollow">https://www.analog.com/en/technical-articles/relationship-data-word-size-dynamic-range.html</a></p>
</blockquote>
<p>One thing this article doesn't do is to calculate the 32 bit float SNR <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/laughing.png" title="laughing" alt=":laughing:" /> (unless I overlooked it), probably because the answer depends partly on signal amplitude.</p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/10</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Wed, 02 Nov 2022 10:21:47 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Wed, 02 Nov 2022 20:03:52 GMT]]></title><description><![CDATA[<p>this is why using abstractions to wrap/clip output before <code>[dac~]</code> are good practice imo.. I have <code>[outputc~]</code> in shadylib that also has a volume slider and the option to record.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/11</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Wed, 02 Nov 2022 20:03:52 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Wed, 02 Nov 2022 20:23:39 GMT]]></title><description><![CDATA[<p>I sometimes use my mixer as a lazy loopback device:  I output to it via S/PDIF and then take input via USB.  If I send signals that step outside of -1..1 I get clipping!  So so far I only see that 3dB of headroom on the analog outputs.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/12</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/12</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Wed, 02 Nov 2022 20:23:39 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Wed, 02 Nov 2022 23:03:31 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> said:</p>
<blockquote>
<p>So far I only see that 3dB of headroom on the analog outputs.</p>
</blockquote>
<p>Just occurred to me: If an equal-power stereo panner's gain is 0 dB at the sides, then the gain will be sqrt(1/2) in the center (both with sinusoidal and sqrt laws).</p>
<p>So here's a common audio operation that would drop 3 dB with default settings, which a driver or OS-mixer author might consider a good idea to include in the chain. (Also, this would be unlikely to be applied to mono inputs.)</p>
<p>hjh</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/13</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/13</guid><dc:creator><![CDATA[ddw_music]]></dc:creator><pubDate>Wed, 02 Nov 2022 23:03:31 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Thu, 03 Nov 2022 01:33:36 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ddw_music">@ddw_music</a> <strong><em>That's it!!!</em></strong>  I was ignoring my panner, which when panned to the middle is down 3dB on both L &amp; R.  And for that last test with my lazy man's loopback, I just wrote something from scratch and omitted the panner.  Crap, I wish I could delete this whole thread so as not to mislead anyone else.  -1..1 is the full range, period.  Sorry to waste everyone's time <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/frowning.png" title=":(" alt=":(" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/14</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/14</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Thu, 03 Nov 2022 01:33:36 GMT</pubDate></item><item><title><![CDATA[Reply to Not clipping! (?) OMG, MY BAD, NEVERMIND on Thu, 03 Nov 2022 06:43:17 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> The time was not wasted.... we all learnt something... and a great quantity of head scratching will probably save me money for shampoo... <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/construction_worker.png" title="construction_worker" alt=":construction_worker:" /><br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/15</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/14116/not-clipping-omg-my-bad-nevermind/15</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Thu, 03 Nov 2022 06:43:17 GMT</pubDate></item></channel></rss>