[linux-audio-dev] how vst handles parameter updates

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] how vst handles parameter updates
From: Paul Davis (pbd_AT_Op.Net)
Date: Fri Dec 07 2001 - 18:40:24 EET


Direct from the man himself (karl steinberg):

----------------------------------------------------------------------
>1) does VST envision that the actions of setParameter and/or
> setParameterAutomated are carried out synchronously or asynchronously
> with respect to process()/processReplacing()? should a plugin expect
> that a given parameter remain at a constant value throughout the
> duration of a call to process(), or that it could change at any time?

the latter is true. the current model allows to pre-empt on either side
(parameter changes may happen during the audio process, and vice versa).
timestamped parameters are another solution which we'd like to promote for
the next iteration of this API.

you may consider to latch 'fragile' parameters for now (means to stuff them
into local variables and use only those within the sample-loop).

>2) how do VST plugin+editor combinations handle moving non-scalar data
> into the plugin in an atomic fashion? if i write a parametric EQ
> whose editor features a shapeable curve, and i represent the curve
> with 200 data points, how do i set the values of these points in a
> way that is guaranteed not to interfere with
> process()/processReplacing() ?
>

you have to solve that yourself. there was recently a very interesting
thread here about 'lock-less' multithreaded data access.

you might use a class or structure or array and access it
via a pointer (or a 'double-pointer'). changing the pointer can be assumed
to be atomic, you can even sync the pointer change at the beginning of
either process. semaphores and mutexes are tricky, as they (may) block the
audio thread.
----------------------------------------------------------------------

so, to put this back in context:

    1) for parameter (control port) changes, VST does not require what
       LADSPA implicitly requires, but might do in the future.

    2) because VST editors have direct access to the plugin objects,
       they can play various tricks to reset parameters that a
       "disconnected" protocol-based system cannot.

you can guess who initiated the "very interesting thread here about
"lock-less" multithreaded data access" :))

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Dec 07 2001 - 18:37:35 EET