On 02/06/2012 12:04 PM, Fons Adriaensen wrote:
On Mon, Feb 06, 2012 at 10:33:31AM +0100, Jörn
Nettingsmeier wrote:
what i want to avoid is a ramp from default or
previous values whenever
the plugin is run for the first time. in that case, i want to have no
ramp and start cold with the control port value.
For general purpose processing (as opposed to synthesis) that doesn't
matter in practice. Certainly not if the ramp is just one period.
it might if a DAW deactivates plugins on transport stop, then locates,
then re-activates on play - can i be sure this won't happen with any host?
i certainly don't want my first note to go through a sweep of all plugin
controls each time i press "play".
can i rely on
control port data being available during activate() so
that i can initialize my current values to the control port values?
now i could set the current values to NULL during instantiate and
deactivate, but then i'd have an extra conditional in run(), which i'd
like to avoid.
This would be outside the main loop, so harmless. You may want something
similar to switch between interpolated or constant runs as well, so it
would just add one boolean.
true.
Note that making parameter smoothing dependent on the
period size
is not really recommended, except again for synthesis. For the zita
series it is Verboten.
well, i've considered carrying loads of state with me and maybe even do
cubic interpolation, but that's for later. the problem is i don't know
in advance how many control points i need to cache for constant
smoothing over time, because LV2 doesn't guarantee a constant number of
samples per run().
best,
jörn