Gold said:
JohnRoberts said:
This crest factor compression or limiting, would be independent of actual signal level, but track loud and soft signals equally being only responsive to their ratio of peaks to average.
Yes, this is exactly what I want to do. Thanks John. Now it's time to pour over the app notes. And I don't feel lucky. This would be by far the most elaborate thing I've attempted. I think this will roll around in my brain for a year or so before I try it. I have plenty of other things to do while this ferments.
Don't be scared away by the log math... The THAT detector chips do the heavy lifting to convert the audio level into a simple +/- X mV, that directly corresponds to +/- X dB. To make a simple compressor you compare the level in dB to a fixed threshold and multiply it by a scale factor to make a compression ratio.
By subtracting the difference between a fast and slow detector that are both going up and down with signal level, we get a X mV dB signal that corresponds to the crest factor. I will ASSume you don't want to expand signals that are less than your target crest factor, so you will want to use a steering diode circuit similar to that used in THAT's above threshold compression examples. So instead of telling the VCA to reduce gain when the signal is above the voltage equivalent to X dB threshold, you instead tell it to reduce gain when the fast detector output, minus the slow detector output is above your X db crest factor.
[EDIT/ leaving out the clamp diode does not turn it into an expander but "full-range" instead of an "above threshold" crest factor compressor. This means peak or fast signals with less than threshold crest factor would get boost instead of cut. To make it actually expand crest factor we need to change the polarity of the side chain so cut becomes boost and boost becomes cut. /edit]
RE: time constants. Since by definition the peak needs to be >> faster than ave to extract useful crest factor measurements, This will automatically give you a relatively fast attack/fast release response, which if you think about it is mostly what you want, since high crest factor is related to transient information.
Thinking about my fast and slow detector advice the other day, perhaps we don't want to only make the peak >> faster, but perhaps split the difference, making the fast detector a little faster and the slow detector a little slower, to split the difference. Another alternative is to keep the peak detector very fast, and add some smoothing (lag) to the VCA control after we crunch the data.
Like I said be prepared to experiment with all associated time constants for best effect.
=======
OK, looking at figure 1. from their most basic app note http://www.thatcorp.com/datashts/dn00A.pdf You can get started by adding a second 2252 chip identical except for the value of CT (note: RT also affects the time constants, but needs to be the same value in both chips so the nominal 0dB levels track each other.). For the fast peak detector make CT smaller, for the slow ave detector make it bigger (you will want to experiment with this too, but I would start with a 5:1 or 10:1 ratio between fast and slow caps)..
Take the voltage output from this slow detector and run it through a simple unity gain inverter. (Note: when controlling the VCA 0dB or unity gain is 0V or ground, so unity inverter that mirrors the voltage output of slow detector around ground.) Then feed this inverted voltage through another resistor the same vale as R14 into OA2. Now the threshold pot will correspond to X dB crest factor. You don't need the full range of threshold adjustment, but it can be adjusted to work using the stock values to get you started.
See, Log domain processing isn't that hard, maybe you are lucky. ;D
JR