[LAD] How can an LV2 plugin UI get the value of a control port from the plugin?
Philippe Coatmeur
philcm at gnu.org
Fri Oct 17 19:51:33 UTC 2014
On 17/10/14 15:56, Harry van Haaren wrote:
> On Fri, Oct 17, 2014 at 1:30 PM, Phil CM <philcm at gnu.org
> <mailto:philcm at gnu.org>> wrote:
>
> Also each time the UI is opened, the widgets are reset at maximum
> (not the values).
>
> Hi Phil,
>
> Glad to see you're excited and working hard on learning LV2! Checkout
> the example plugins: they show how things work.
>
> In the UI, there is a port_event() function. It tells the UI what
> port changed, and what its current value is. Use this to do
> widget->setValue( newValue ); and you're done ;)
No matter what I try, I always end up with a error: ‘class Widget’ has
no member named ‘setValue’. But I declare Widget quite exactly how you
do BittaWidget, I require the same files, I don't know *where is your
setValue member declared*..?
Also, in your example you are really doing
self->widget->graph->value(value);
(But I dont seem to have a "value" method either).
-Phil
>
> Eg (from OpenAV's ArtyFX, Bitta plugin)
> https://github.com/harryhaaren/openAV-ArtyFX/blob/master/bitta/gui/ui.cxx#L131
>
> How can I /get/ the control ports values from the UI perspective?
>
> In answer to your Q, how to "get", you don't: you're told when there's
> a new value.
>
> HTH, Cheers, -Harry
>
> --
>
> http://www.openavproductions.com
>
>
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
> http://lists.linuxaudio.org/listinfo/linux-audio-dev
--
Philippe "xaccrocheur" Coatmeur
http://bitbucket.org/xaccrocheur /https://github.com/xaccrocheur
http://opensimo.org/play/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20141017/0c591818/attachment.html>
More information about the Linux-audio-dev
mailing list