[LV2] Usual way for UI to access sample rate
Hanspeter Portner
dev at open-music-kontrollers.ch
Fri Jul 28 03:08:47 PDT 2017
On Fri, Jul 28, 2017, at 01:27 AM, Filipe Coelho wrote:
> On 28.07.2017 10:15, Hermann Meyer wrote:
> > Usually all hosts I know do it right.
> > Samplerate is given in init.
>
> Only for plugins, not the UI.
> Do you know a host which passes the samplerate to the UIs?
> (I do it in Carla, but I think I might be doing it the wrong way...)
This should be done via the options extensions. The corresponding
parameter is [1].
[1] http://lv2plug.in/ns/ext/parameters/parameters.html#sampleRate
The value in the UI can then be read via the options feature like in
[2].
[2]
https://gitlab.com/OpenMusicKontrollers/synthpod/blob/master/plugins/synthpod_common_nk.c#L6144
> > You could set the value then on a outputport and read it in the UI.
>
> Seems like a workaround for something that is rather important.
> We want separation of DSP and UI objects, so the UI needs to know the
> sample rate.
> Using an output port means waiting for the value, delaying full UI
> creation.
>
> _______________________________________________
> Devel mailing list
> Devel at lists.lv2plug.in
> http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in
More information about the Devel
mailing list