DSPRelated.com
Forums

Audio Compressor/AGC in C or C++

Started by __GG December 9, 2005
<robert.w.adams@verizon.net> wrote in message 
news:1134264573.722591.286330@g47g2000cwa.googlegroups.com...
>I have done lots of digital compressors. RMS detection is a good way to > go because of the following; > > RMS detectors have strange transient behavior because they look like a > 1st-order lowpass filter fed by the square of the input signal. That > means the attack time-constant is dependant on the size of the > amplitude step you are making, since it gets squared before being > applied to the filter. But there is a workable compromise for the time > constant that is fast enough for most normal applications, without > causing too much distortion on steady sine-waves (RMS detectors produce > a ripple on their outputs at 2X the input frequency, causing > 3rd-harmonic distortion).
Bob, would you mind elaborating on that a bit, i.e. the time constant compromise stuff?
Jon Harris wrote:

> "Vladimir Vassilevsky" <antispam_bogus@hotmail.com> wrote in message > news:ICEmf.35582$Zv5.15048@newssvr25.news.prodigy.net... > >> >>Jerry Avins wrote: >> >> >>>I wish car radios had compressors so I could ride over road noise with open >>>windows without blasting myself on louder passages. It's not a great way to >>>listen to music, but it's better than not listening. >> >>...The FM broadcast is usually heavily compressed too. > > > Almost always true for pop music stations, but much less so for classical > stations. > >
I once was a studio engineer for a student operated full commercial license FM station that was a member of the QXR network (rebroadcasting WQXR out of NYC). You would have been drawn, quartered, salted, boiled in oil and *THEN* tortured for even thinking compressors etc ;!
Richard Owlet wrote:
> Jon Harris wrote: > >> "Vladimir Vassilevsky" <antispam_bogus@hotmail.com> wrote in message >> news:ICEmf.35582$Zv5.15048@newssvr25.news.prodigy.net... >> >>> >>> Jerry Avins wrote: >>> >>> >>>> I wish car radios had compressors so I could ride over road noise >>>> with open windows without blasting myself on louder passages. It's >>>> not a great way to listen to music, but it's better than not listening. >>> >>> >>> ...The FM broadcast is usually heavily compressed too. >> >> >> >> Almost always true for pop music stations, but much less so for >> classical stations. >> > > I once was a studio engineer for a student operated full commercial > license FM station that was a member of the QXR network (rebroadcasting > WQXR out of NYC). > > You would have been drawn, quartered, salted, boiled in oil and *THEN* > tortured for even thinking compressors etc ;!
Not at the transmitter, but in the (car) receiver. Or did you miss that? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
"Richard Owlett" <rowlett@atlascomm.net> wrote in message 
news:11pucfacghtsa88@corp.supernews.com...
> Jon Harris wrote: > >> "Vladimir Vassilevsky" <antispam_bogus@hotmail.com> wrote in message >> news:ICEmf.35582$Zv5.15048@newssvr25.news.prodigy.net... >> >>> >>>Jerry Avins wrote: >>> >>> >>>>I wish car radios had compressors so I could ride over road noise with open >>>>windows without blasting myself on louder passages. It's not a great way to >>>>listen to music, but it's better than not listening. >>> >>>...The FM broadcast is usually heavily compressed too. >> >> >> Almost always true for pop music stations, but much less so for classical >> stations. > > I once was a studio engineer for a student operated full commercial license FM > station that was a member of the QXR network (rebroadcasting WQXR out of NYC). > > You would have been drawn, quartered, salted, boiled in oil and *THEN* > tortured for even thinking compressors etc ;!
OK, but since you were just re-broadcasting other content, it would presumably already have been squeezed where it originated. Nowadays, many stations use a "broadcast processor", which is basically a multi-band (like 5) compressor, plus other bells and whistles to squeeze the heck out of the audio. Examples can be found at http://www.orban.com/ and http://www.omniaaudio.com/.
Jerry Avins wrote:

> Richard Owlet wrote: > >> Jon Harris wrote: >> >>> "Vladimir Vassilevsky" <antispam_bogus@hotmail.com> wrote in message >>> news:ICEmf.35582$Zv5.15048@newssvr25.news.prodigy.net... >>> >>>> >>>> Jerry Avins wrote: >>>> >>>> >>>>> I wish car radios had compressors so I could ride over road noise >>>>> with open windows without blasting myself on louder passages. It's >>>>> not a great way to listen to music, but it's better than not >>>>> listening. >>>> >>>> >>>> >>>> ...The FM broadcast is usually heavily compressed too. >>> >>> >>> >>> >>> Almost always true for pop music stations, but much less so for >>> classical stations. >>> >> >> I once was a studio engineer for a student operated full commercial >> license FM station that was a member of the QXR network >> (rebroadcasting WQXR out of NYC). >> >> You would have been drawn, quartered, salted, boiled in oil and *THEN* >> tortured for even thinking compressors etc ;! > > > Not at the transmitter, but in the (car) receiver. Or did you miss that? > > Jerry
yes