-------- Forwarded Message --------
Subject: Re: [LAD] How can an LV2 plugin UI get the value of a control
port from the plugin?
Date: Mon, 20 Oct 2014 01:27:10 +0100
From: Philippe Coatmeur <philcm(a)gnu.org>
Organisation: GNU
To: Harry van Haaren <harryhaaren(a)gmail.com>
On 17/10/14 15:56, Harry van Haaren wrote:
On Fri, Oct 17, 2014 at 1:30 PM, Phil CM
<philcm(a)gnu.org
<mailto:philcm@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 ;)
For this I had to write my own
int setValue(int value) {
// this->scrollvalue(value);
cout << "Called with value " << value << endl;
}
And it does get called by port_event() now
* what do I put in this setValue() in order to /actually//update/ the
widget value?
There is a int scrollvalue(int pos,int size,int first,int total); in
Fl_Slider.H but can't call it from the class, witch is not explicitely
extending Fl_Slider
<https://bitbucket.org/xaccrocheur/kis/src/8c3a85a9899f117d2fa273b6c7948402d780fb46/widget.h?at=master>
from what I can see... Is it?
Thanks everybody
--Phil
PS - Apparently Sorcer is using AvTK on top of FLTK, I was under the
impression that Sorcer's UI was using NTK, am I mistaking?
Eg (from OpenAV's ArtyFX, Bitta plugin)
https://github.com/harryhaaren/openAV-ArtyFX/blob/master/bitta/gui/ui.cxx#L…
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
--
Philippe "xaccrocheur" Coatmeur
http://bitbucket.org/xaccrocheur /https://github.com/xaccrocheur
http://opensimo.org/play/