<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Chris&#8217;s dynamic compressor</title>
	<atom:link href="http://pdf23ds.net/software/dynamic-compressor/feed/" rel="self" type="application/rss+xml" />
	<link>http://pdf23ds.net</link>
	<description>I will not be swayed be every small current; nor will the memes faze me or infect me. I am pure. I am intelligent. I am rational. I am at peace.</description>
	<pubDate>Tue, 06 Jan 2009 08:05:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: pdf23ds</title>
		<link>http://pdf23ds.net/software/dynamic-compressor/#comment-2084</link>
		<dc:creator>pdf23ds</dc:creator>
		<pubDate>Sat, 04 Oct 2008 06:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://pdf23ds.net/chriss-dynamic-compressor/#comment-2084</guid>
		<description>"So do you think we’re crazy to use your compressor on speech?"

Hey, if it works for you that's great. I'm not surprised it does better than other sorts of compressors for some things. Nyquist comes with a compressor that's similar to mine, but Audacity's repackaging of Nyquist doesn't include it (or a couple of library functions it uses).

"Click removal doesn’t really seem to work"

Well, clicks, pops, and other artifacts may sound similar but methods used to detect them can vary widely. For a microphone hitting something, I usually do a high-pass filter at around 20-50 Hz. It doesn't get rid of the sound, but it gets rid of the peak in the waveform. For speech, I'd probably do a highpass to the whole thing. For dealing manually with big peaks, it's pretty easy to use Audacity's interactive envelope function to scale it way down.

"what do you mean when you say you don’t think adjust-samp works on samples"

The value passed to adjust-samp isn't an individual sample, but part of the envelope that gets interpolated over the waveform. adjust-samp gets called once for each thousand samples.</description>
		<content:encoded><![CDATA[<p>&#8220;So do you think we’re crazy to use your compressor on speech?&#8221;</p>
<p>Hey, if it works for you that&#8217;s great. I&#8217;m not surprised it does better than other sorts of compressors for some things. Nyquist comes with a compressor that&#8217;s similar to mine, but Audacity&#8217;s repackaging of Nyquist doesn&#8217;t include it (or a couple of library functions it uses).</p>
<p>&#8220;Click removal doesn’t really seem to work&#8221;</p>
<p>Well, clicks, pops, and other artifacts may sound similar but methods used to detect them can vary widely. For a microphone hitting something, I usually do a high-pass filter at around 20-50 Hz. It doesn&#8217;t get rid of the sound, but it gets rid of the peak in the waveform. For speech, I&#8217;d probably do a highpass to the whole thing. For dealing manually with big peaks, it&#8217;s pretty easy to use Audacity&#8217;s interactive envelope function to scale it way down.</p>
<p>&#8220;what do you mean when you say you don’t think adjust-samp works on samples&#8221;</p>
<p>The value passed to adjust-samp isn&#8217;t an individual sample, but part of the envelope that gets interpolated over the waveform. adjust-samp gets called once for each thousand samples.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen McBride</title>
		<link>http://pdf23ds.net/software/dynamic-compressor/#comment-2074</link>
		<dc:creator>Allen McBride</dc:creator>
		<pubDate>Thu, 25 Sep 2008 17:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://pdf23ds.net/chriss-dynamic-compressor/#comment-2074</guid>
		<description>Thanks, Chris!  This is helpful.  I will play with noise gates, and with the adjust-samp function once I learn enough Nyquist to understand what's going on.  So do you think we're crazy to use your compressor on speech?  The conventional compressors may have some advantages, but the thing I like about yours is that it doesn't miss any spikes.  The Audacity compressor misses spikes (like mic hits or cassette tape artifacts) during compression, but then the spikes keep the normalizer from bringing up the volume, so I end up having to remove the spikes by hand.  (Click removal doesn't really seem to work; I'm not sure why.)  Also, what do you mean when you say you don't think adjust-samp works on samples? 

Allen</description>
		<content:encoded><![CDATA[<p>Thanks, Chris!  This is helpful.  I will play with noise gates, and with the adjust-samp function once I learn enough Nyquist to understand what&#8217;s going on.  So do you think we&#8217;re crazy to use your compressor on speech?  The conventional compressors may have some advantages, but the thing I like about yours is that it doesn&#8217;t miss any spikes.  The Audacity compressor misses spikes (like mic hits or cassette tape artifacts) during compression, but then the spikes keep the normalizer from bringing up the volume, so I end up having to remove the spikes by hand.  (Click removal doesn&#8217;t really seem to work; I&#8217;m not sure why.)  Also, what do you mean when you say you don&#8217;t think adjust-samp works on samples? </p>
<p>Allen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pdf23ds</title>
		<link>http://pdf23ds.net/software/dynamic-compressor/#comment-2073</link>
		<dc:creator>pdf23ds</dc:creator>
		<pubDate>Wed, 24 Sep 2008 04:33:44 +0000</pubDate>
		<guid isPermaLink="false">http://pdf23ds.net/chriss-dynamic-compressor/#comment-2073</guid>
		<description>Yeah, I think what you're looking for is a "noise gate". Lots of compressors have them built in, but I don't have one in mine because it's not really appropriate for most classical music recordings, which is what I wrote the plugin for. Alas, it seems that most people use it for speech instead. I'm not sure how I'd go about implementing a &lt;i&gt;good&lt;/i&gt; noise gate algorithm, because I haven't ever thought about it. The naive noise gate algorithm is just what your change consists of, and I'm not sure how much you can improve on that. But you might look for another plugin to apply in a separate pass (probably before compression).

The other thing I might do is decrease the compression ratio and attack/falloff speeds a bit. (Normalizing before compressing would help too.) That way the compression isn't much harsher overall, but noise isn't boosted as much.

I guess a more general solution would be to generalize the compression ratio parameter into a function with a domain of input dB and range of output dB, which is how SoundForge's compressor works. It would probably be relatively easy to implement, but Audacity doesn't offer a good GUI for that, or a way to create one, so you'd have to tweak the file itself every time you changed the function. The function would just replace "adjust-samp", and look something like this, I guess:

&lt;pre&gt;(defun adjust-samp (db)
  (db-to-linear
    (cond
      ((&#60; db -30) 0)
      (t db))))
&lt;/pre&gt;

"cond" is like a switch statement, with "t" being the default clause. The maximum amplitude and noise floor parameters would become superfluous. The sample function there silences everything below -30 dB and applies no change to everything else. But ideally if you graphed the "adjust-samp" function it would be continuous. I don't think adjust-samp actually works on samples, btw.</description>
		<content:encoded><![CDATA[<p>Yeah, I think what you&#8217;re looking for is a &#8220;noise gate&#8221;. Lots of compressors have them built in, but I don&#8217;t have one in mine because it&#8217;s not really appropriate for most classical music recordings, which is what I wrote the plugin for. Alas, it seems that most people use it for speech instead. I&#8217;m not sure how I&#8217;d go about implementing a <i>good</i> noise gate algorithm, because I haven&#8217;t ever thought about it. The naive noise gate algorithm is just what your change consists of, and I&#8217;m not sure how much you can improve on that. But you might look for another plugin to apply in a separate pass (probably before compression).</p>
<p>The other thing I might do is decrease the compression ratio and attack/falloff speeds a bit. (Normalizing before compressing would help too.) That way the compression isn&#8217;t much harsher overall, but noise isn&#8217;t boosted as much.</p>
<p>I guess a more general solution would be to generalize the compression ratio parameter into a function with a domain of input dB and range of output dB, which is how SoundForge&#8217;s compressor works. It would probably be relatively easy to implement, but Audacity doesn&#8217;t offer a good GUI for that, or a way to create one, so you&#8217;d have to tweak the file itself every time you changed the function. The function would just replace &#8220;adjust-samp&#8221;, and look something like this, I guess:</p>
<pre>(defun adjust-samp (db)
  (db-to-linear
    (cond
      ((&lt; db -30) 0)
      (t db))))
</pre>
<p>&#8220;cond&#8221; is like a switch statement, with &#8220;t&#8221; being the default clause. The maximum amplitude and noise floor parameters would become superfluous. The sample function there silences everything below -30 dB and applies no change to everything else. But ideally if you graphed the &#8220;adjust-samp&#8221; function it would be continuous. I don&#8217;t think adjust-samp actually works on samples, btw.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen McBride</title>
		<link>http://pdf23ds.net/software/dynamic-compressor/#comment-2072</link>
		<dc:creator>Allen McBride</dc:creator>
		<pubDate>Wed, 24 Sep 2008 01:48:55 +0000</pubDate>
		<guid isPermaLink="false">http://pdf23ds.net/chriss-dynamic-compressor/#comment-2072</guid>
		<description>Hi Chris,

I'm still getting lots of milage from your compressor.  Thanks for the advice about changing the slider ranges; that lets me know for sure my settings are what I want them to be.  I have another question about the noise floor, though -- I've finally realized that it doesn't behave as I had assumed.  Sections of audio beneath the noise floor are still raised, just not quite as much as if you don't set a noise floor.  So if someone doesn't speak for a couple seconds, you get a little hill of background noise in the middle of the break in speech.  So I changed "(defun limit-amp (samp) (if (and (&#62; floor 0) (&#62; samp max-gain)) max-gain samp))" to "(defun limit-amp (samp) (if (and (&#62; floor 0) (&#62; samp max-gain)) 1 samp))".  This sort of does more like what I'd expect, though of course if something just barely breaks the noise floor, up it comes.  But I barely read Lisp, so I still don't know how most of the compressor works, and I thought I'd get your reaction to this, and see if you had any other thoughts.

Thanks,
Allen</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>I&#8217;m still getting lots of milage from your compressor.  Thanks for the advice about changing the slider ranges; that lets me know for sure my settings are what I want them to be.  I have another question about the noise floor, though &#8212; I&#8217;ve finally realized that it doesn&#8217;t behave as I had assumed.  Sections of audio beneath the noise floor are still raised, just not quite as much as if you don&#8217;t set a noise floor.  So if someone doesn&#8217;t speak for a couple seconds, you get a little hill of background noise in the middle of the break in speech.  So I changed &#8220;(defun limit-amp (samp) (if (and (&gt; floor 0) (&gt; samp max-gain)) max-gain samp))&#8221; to &#8220;(defun limit-amp (samp) (if (and (&gt; floor 0) (&gt; samp max-gain)) 1 samp))&#8221;.  This sort of does more like what I&#8217;d expect, though of course if something just barely breaks the noise floor, up it comes.  But I barely read Lisp, so I still don&#8217;t know how most of the compressor works, and I thought I&#8217;d get your reaction to this, and see if you had any other thoughts.</p>
<p>Thanks,<br />
Allen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pdf23ds</title>
		<link>http://pdf23ds.net/software/dynamic-compressor/#comment-2070</link>
		<dc:creator>pdf23ds</dc:creator>
		<pubDate>Sat, 30 Aug 2008 04:23:30 +0000</pubDate>
		<guid isPermaLink="false">http://pdf23ds.net/chriss-dynamic-compressor/#comment-2070</guid>
		<description>Huh. Well, if you're seeing odd behavior then you could always change the plugin source so that the range of the noise floor is smaller. That way the slider will be more detailed. It's the 10th or so line:

;control floor "Floor" real "linear" .02 0.0 1.0

Just lower that 1.0 to .25 or some such. Be warned that any changes to the .ny file will cause Audacity to forget the saved values of all the parameters and go back to the built-in defaults.

The Mono framework should allow programs such as mine to run on a Mac. It requires the 1.9 version, though, which is still prerelease and a quite large download---95 MB or so.</description>
		<content:encoded><![CDATA[<p>Huh. Well, if you&#8217;re seeing odd behavior then you could always change the plugin source so that the range of the noise floor is smaller. That way the slider will be more detailed. It&#8217;s the 10th or so line:</p>
<p>;control floor &#8220;Floor&#8221; real &#8220;linear&#8221; .02 0.0 1.0</p>
<p>Just lower that 1.0 to .25 or some such. Be warned that any changes to the .ny file will cause Audacity to forget the saved values of all the parameters and go back to the built-in defaults.</p>
<p>The Mono framework should allow programs such as mine to run on a Mac. It requires the 1.9 version, though, which is still prerelease and a quite large download&#8212;95 MB or so.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen McBride</title>
		<link>http://pdf23ds.net/software/dynamic-compressor/#comment-2069</link>
		<dc:creator>Allen McBride</dc:creator>
		<pubDate>Sat, 30 Aug 2008 02:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://pdf23ds.net/chriss-dynamic-compressor/#comment-2069</guid>
		<description>Thanks!  I had played around with some very small values like .002 and convinced myself that they were getting rounded to zero, partly because I couldn't hear a difference and partly because when I re-opened the effect dialogue after, that field said zero again even though usually the last values used are remembered.  But neither of those is conclusive.  (And as for values being remembered, there seems to be a difference in other Audacity effects as well between typing them in vs. using the sliders... sometimes it seems like only using the sliders works, but I haven't tested carefully yet.)

I'll look forward to your new version.  From my perspective, I think an Audacity plug-in would be useful.  To use a standalone tool I assume I'd need to export the audacity project to a single file and then re-import, right?  Plus I use a Mac... is my sense correct that it's hard to make C# programs run on Mac?

Thanks again,
Allen</description>
		<content:encoded><![CDATA[<p>Thanks!  I had played around with some very small values like .002 and convinced myself that they were getting rounded to zero, partly because I couldn&#8217;t hear a difference and partly because when I re-opened the effect dialogue after, that field said zero again even though usually the last values used are remembered.  But neither of those is conclusive.  (And as for values being remembered, there seems to be a difference in other Audacity effects as well between typing them in vs. using the sliders&#8230; sometimes it seems like only using the sliders works, but I haven&#8217;t tested carefully yet.)</p>
<p>I&#8217;ll look forward to your new version.  From my perspective, I think an Audacity plug-in would be useful.  To use a standalone tool I assume I&#8217;d need to export the audacity project to a single file and then re-import, right?  Plus I use a Mac&#8230; is my sense correct that it&#8217;s hard to make C# programs run on Mac?</p>
<p>Thanks again,<br />
Allen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pdf23ds</title>
		<link>http://pdf23ds.net/software/dynamic-compressor/#comment-2068</link>
		<dc:creator>pdf23ds</dc:creator>
		<pubDate>Fri, 29 Aug 2008 01:41:53 +0000</pubDate>
		<guid isPermaLink="false">http://pdf23ds.net/chriss-dynamic-compressor/#comment-2068</guid>
		<description>Heh. I think I had some overzealous spam protection there for a while.

I don't directly control how precisely you can set that parameter. If you just type in the values into the text box I bet it will let you be as precise as you wish, up to the limits of double-precision floating point.

Incidentally, I'm about to release a new version with a new, better algorithm. I have initially written it in C# but could make it work (somewhat more slowly) in Audacity. If you have a standalone tool, would you still want the audacity plug-in? (If I don't write a new audacity plug-in I'll leave the old plug-in.)</description>
		<content:encoded><![CDATA[<p>Heh. I think I had some overzealous spam protection there for a while.</p>
<p>I don&#8217;t directly control how precisely you can set that parameter. If you just type in the values into the text box I bet it will let you be as precise as you wish, up to the limits of double-precision floating point.</p>
<p>Incidentally, I&#8217;m about to release a new version with a new, better algorithm. I have initially written it in C# but could make it work (somewhat more slowly) in Audacity. If you have a standalone tool, would you still want the audacity plug-in? (If I don&#8217;t write a new audacity plug-in I&#8217;ll leave the old plug-in.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen McBride</title>
		<link>http://pdf23ds.net/software/dynamic-compressor/#comment-2067</link>
		<dc:creator>Allen McBride</dc:creator>
		<pubDate>Thu, 28 Aug 2008 08:49:16 +0000</pubDate>
		<guid isPermaLink="false">http://pdf23ds.net/chriss-dynamic-compressor/#comment-2067</guid>
		<description>Great plug-in!  It's weird no one has posted since last October.  Is there a way to make the settings more precise, so I can adjust the floor in increments of .001?  Thanks!  ---Allen</description>
		<content:encoded><![CDATA[<p>Great plug-in!  It&#8217;s weird no one has posted since last October.  Is there a way to make the settings more precise, so I can adjust the floor in increments of .001?  Thanks!  &#8212;Allen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2007-10-15 &#171; Where Is All This Leading To?</title>
		<link>http://pdf23ds.net/software/dynamic-compressor/#comment-2028</link>
		<dc:creator>links for 2007-10-15 &#171; Where Is All This Leading To?</dc:creator>
		<pubDate>Mon, 15 Oct 2007 00:20:50 +0000</pubDate>
		<guid isPermaLink="false">http://pdf23ds.net/chriss-dynamic-compressor/#comment-2028</guid>
		<description>[...] Metablog » Chris’s dynamic compressor (tags: compressor compression audio audacity nyquist plugins opensource freeware mac linux osx windows winxp) [...]</description>
		<content:encoded><![CDATA[<p>[...] Metablog » Chris’s dynamic compressor (tags: compressor compression audio audacity nyquist plugins opensource freeware mac linux osx windows winxp) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pdf23ds</title>
		<link>http://pdf23ds.net/software/dynamic-compressor/#comment-2027</link>
		<dc:creator>pdf23ds</dc:creator>
		<pubDate>Tue, 09 Oct 2007 03:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://pdf23ds.net/chriss-dynamic-compressor/#comment-2027</guid>
		<description>Oh my. I had Chopin's ballade in the sound clips at one point, but then I substituted them for Debussy's The Snow is Falling, from the Children's Corner suite. I guess I forgot to change the text.</description>
		<content:encoded><![CDATA[<p>Oh my. I had Chopin&#8217;s ballade in the sound clips at one point, but then I substituted them for Debussy&#8217;s The Snow is Falling, from the Children&#8217;s Corner suite. I guess I forgot to change the text.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
