[LV2] Still Learning
d at drobilla.net
Wed Dec 25 07:11:43 PST 2013
On Wed, 2013-12-25 at 08:54 -0500, Warren Koontz wrote:
> Please check my understanding:
> In an activate-run-deactivate cycle (where run may be invoked more than
> once) do the control variables remain fixed or can they change from one
> invocation of run to the next? I now suspect the latter, which means I have
> to change my approach.
Yes, control inputs may change value while running. That is their main
> In my current version of Multiverb, the number of buffers and their sizes
> are determined from two user inputs: "order" and "maxDelay". I think it
> would be awkward to change these on the fly. Also, I calculate a number of
> parameters (e.g., inverse dB) from the control variables. These would have
> to be re-computed whenever run is invoked.
Yes, calculating things based on changing parameters is tricky.
> So I think I have to make the number of buffers and their sizes a "design
> decision" and determine a reasonably efficient way to use the remaining
> control variables. Also, I can use activate to clear the buffers, since the
> number and sizes will be fixed at build time.
This sound reasonable. If you want to be fancy and dynamic you can use
the worker extension (or, less ideally, a homebrew thread solution) to
allocate buffers and whatnot when the relevant controls change, but then
you have to deal with multi-threading.
Ah, holiday LAD hacking :)
More information about the Devel