[LV2] Feature request: DSP write_function() ?

David Robillard d at drobilla.net
Tue Jan 12 02:49:36 PST 2021


On Tue, 2020-12-22 at 00:55 +0100, Hanspeter Portner wrote:
> On 21.12.20 20:55, Filipe Coelho wrote:
> > 
> > On 21/12/20 19:44, Hanspeter Portner wrote:
> > > On 21.12.20 19:43, Hermann Meyer wrote> Synthpod have it own
> > > issues as well,
> > > so for example it create controls
> > > > for patch:writable and patch:readable separately (Means it
> > > > double
> > > > controls and only sync the readable ones to the plugin GUi,
> > > > while you
> > > > could only change the writable ones, which are basically the
> > > > same, but
> > > > threaded different). This do as well not allow to sync the
> > > > plugin GUI
> > > > with host provided UI, and easily lead to a overflow in the
> > > > atom ring
> > > > buffer.
> > > 
> > > Can you show your *.ttl, please?
> > > 
> > > I think you've misinterpreted something there. An lv2:Parameter
> > > either
> > > is patch:writable (read-write) OR patch:readable (read-only), but
> > > not
> > > both, if I'm not totally mistaken, that is.
> > > 
> > > If you list the same parameter both as patch:writable AND
> > > patch:readable,
> > > then indeed synthpod may show two generic UI elements with only
> > > one being
> > > active.
> > 
> > I think you are mistaken, the LV2 parameter example plugin includes
> > such a case,
> > see the spring parameter
> > in 
> > https://github.com/lv2/lv2/blob/master/plugins/eg-params.lv2/params.ttl#L100
> 
> Interesting. I hope it's just a typo.
> 
> from https://lv2plug.in/ns/ext/patch#readable:
> 
> > A property that can be read with a patch:Get message.
> 
> from https://lv2plug.in/ns/ext/patch#writable:
> 
> > A property that can be set with a patch:Set or patch:Patch message.
> 
> If patch:writable indeed does *not* include patch:readable, e.g. is
> only
> writable (not read-write), then the whole rest of the eg-params
> plugin is wrong,
>  because all of its parameters listed as patch:writable *do* respond
> to
> patch:Get messages and should thus be listed as patch:readable, too.
> 
> A write-only parameter makes no sense to me as there's no way to
> query its value.
> 
> ... or I'm totally confused about it, indeed.

It's intentional that parameters can be both (which is indeed what that
spring parameter is intended as an example of), but I guess I never
really considered whether patch:writable implies patch:readable or not.
As you say, truly write-only parameters seems a bit odd, though I guess
I could imagine something that only sets coefficients for other
(possibly changing) things, where storing the value of the parameter
itself afterwards is either a burden or outright impossible (because
the calculation is not reversible).  Bit esoteric perhaps.

I think it's conceptually the most sound for them to mean just what
they say, but listing both for all outputs would be pretty annoying.

Given that this stuff is still relatively new in terms of people
actually using it, we can always tinker the definitions a bit, but I'm
not sure what's best here.

-- 
dr




More information about the Devel mailing list