[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sc-devel] Amplitude.kr problem
2007/12/14, Julian Rohrhuber <rohrhuber@xxxxxxxxxxxxxx>:
> >A while ago Julian reworked the Amplitude UGen slightly to allow the
> >coefficients to be modulated. Julian, you left some old calc-func code
> >in there, deactivated using some "#if" macros. Is it OK to remove the
> >old code? Would make it easier to work on fixing the current code...
>
> I don't know which of the two are to be the better one. Well the
> first is being used, so maybe it is supposed to be the one.
"supposed"? Wasn't it you that made this change? Or am I misreading
the svn logs?
The two versions actually behave differently. I would argue that the
active one is better: for audio-rate input and output, it "ignores"
control block boundaries and updates the amplitude curve in the same
manner at every sample.
The inactive version simply calculates a maximum for each control
block and then applies the smoothing at audio-rate, which I'm sure is
more efficient but less "proper". For example if an impulsive attack
happens towards the *end* of the control block, the output starts to
rise at the *beginning* of the block, "before" the attack has
happened!
So I'm personally quite happy that removing the inactive versions is
not a bad thing. Any objections, let me know.
Dan