[music-dsp] Adaptive (auto) release
Citizen Chunk
citizenchunk at nyc.rr.com
Sat Jan 17 21:33:00 EST 2004
hi all. i've been making great progress on my compressor project
(thanks in part to this group), and i'm trying to tackle adaptive
release control. here's the deal:
i'm monitoring peak and RMS (via a simulated RMS equation) on a per
sample basis. i plan to have the envelope detector monitor the peak
value, but use the ratio of peak:RMS to control the release timing.
short transients (larger peak:RMS ratios) are tracked using a "fast
release" time. longer sustained waves (smaller peak:RMS ratios) are
tracked using the "slow release" time. the release could simply
cross-fade from fast to slow based on the current ratio.
the problem (unless i'm looking at this wrong) is that, while the RMS
remains fairly constant, the peak will fluctuate between being above
and below the RMS, even though the signal is rectified. isn't this the
case? as such, that would throw off my equation. here's what i was
thinking:
relFast = fast release time
relSlow = slow release time
peak = fabs (input)
RMS = well, you know what that is...
release = relFast + ( (relSlow - relFast) * (RMS/Peak) )
assuming that the peak level is always above the RMS (and never = 0, so
as to avoid divide-by-zero), this would be a nice little equation to
cross-fade between the fast and slow release timings,
program-dependent, of course. when the ratio approaches zero, the
release approaches relFast. as the RMS approaches Peak (and the ratio
approaches 1), the release approaches the relSlow. the problems are
those pesky conditions i just mentioned.
any thoughts of how to remedy this? or am i looking at the whole
adaptive release control issue the wrong way?
btw, i know that this is one of the things that separates competing
software, so i'm not asking for people to give me their top-secret
algorithms. just a kick in the right direction.
More information about the music-dsp
mailing list