I think amp_follower came out that way because a unit-sample delay
was needed in the comparison of y[n] to x[n] in the computation of
y[n] (at least the way I approached it). When x is rising, it is
larger than both y[n] and y[n-1] and there is no difference. When it
is falling, it will normally be smaller than both y[n] and y[n-1],
and again there's no difference. However, it could be falling slower
than the release, i.e., y[n] > x[n] > y[n-1] in which case there is a
(normally small) difference: a*y[n-1]+(1-a)*x[n] versus x[n] which is
slightly larger. Since releases are relatively slow, I cannot
imagine a case where it would be audible. That said, I think
comparing x[n] to the would-be y[n] makes more sense conceptually,
and matches the analog case better. I'll think about it again when I
have time to test, etc., but feel free to beat me to it. :-)
Also, thanks for the reference, and please feel free to type up any
gems you encounter either there or elsewhere for effect.lib.
Cheers,
Julius
At 01:05 PM 1/20/2015, Jonatan Liljedahl wrote:
Hi!
Looking at the peak detector described in
http://www.eecs.qmul.ac.uk/~josh/documents/GiannoulisMassbergReiss-dynamicrangecompression-JAES2012.pdf
It has the formula:
y[n] = max(x[n], a * y[n-1] + (1-a) * x[n])
Which looks exactly like in amp_follower in effect.lib, except that
the above formula takes output and feedback from the max operator,
while the one in amp_follower does it at the + operator:
y[n] = a * max(x[n], y[n-1]) + (1-a) * x[n] // (if I read the source
correctly...)
I'm just curious, what difference does this make, if any?
Cheers
--
/Jonatan
http://kymatica.com
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel
Julius O. Smith III <j...@ccrma.stanford.edu>
Professor of Music and, by courtesy, Electrical Engineering
CCRMA, Stanford University
http://ccrma.stanford.edu/~jos/
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel