Reply by robert bristow-johnson●June 1, 20062006-06-01
Rich Fife wrote:
>
> I can kind of wing it, but I'd like to do it right
> (When should I be in log scale and when in linear?)
if you like implementing power functions, you can do it in the linear
amplitude world. but i think doing the gain calculation in the log
world is conceptually easier. and there are fast approximations to
log() and exp() that can make it work efficiently.
> and I can't find any good documentation
> online. C code is best, but an algorithm is plenty.
Does anyone have a functioning example of how to apply DRC to a PCM
stream on the fly? This is the stuff you might see on your stereo
labeled "Night Mode" that reduces peak volumes while leaving passages
that are at normal volume alone.
I can kind of wing it, but I'd like to do it right (When should I be in
log scale and when in linear?) and I can't find any good documentation
online. C code is best, but an algorithm is plenty.
Thanks!
-- Rich Fife --