Re: [LAD] Fwd: Re: How can an LV2 plugin UI get the value of a control port from the plugin?

From: Harry van Haaren <harryhaaren@email-addr-hidden>
Date: Mon Oct 20 2014 - 11:07:33 EEST

On Mon, Oct 20, 2014 at 1:39 AM, Philippe Coatmeur <philcm@email-addr-hidden> wrote:
<lots of emails>

Hi Philippe,

I can't follow the issue you're having here: you've sent 8 emails, most
with different questions with a layout that is hard to follow: please be
more careful in what text you reply to, and remove all the rest of the
email. Then make sure you're repling to the "linux-audio-dev" list, and not
(only) to the individual.

If you're struggling with code, take a step back, and write a single email,
with a direct question, that sums up what you're trying to learn.

Eg:
How does setValue() work to updated a widgets value in NTK, in the context
of an LV2 plugin?

To which I would answer:
Most NTK widgets that have a "value" like a slider or a dial, derive from a
base class that implements value() and value( float );

What this means for a widget, is that in order to change the value of a
widget called "wid", we do this:
wid->value( 0.0f ); // sets widget value to 0

What you will see here:
https://github.com/harryhaaren/openAV-ArtyFX/blob/master/ui/crusher.h#L156
Is the value() call, which returns the value stored in the base class, aka
0.0f in this case.

To connect an LV2 port to a widget, in port_event() have this type of code:
https://github.com/harryhaaren/openAV-ArtyFX/blob/master/bitta/gui/ui.cxx#L116
Which checks the port number, and assigns the incoming value to the widget,
using the value( float ); call.

Its pretty simple right? Cool.

RE: the other emails, Yes Sorcer uses NTK, NTK is in turn based on FLTK,
and to maintain backwards compatibility with existing code, the function
names weren't changed.

HTH, -Harry

-- 
http://www.openavproductions.com

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Oct 20 12:15:02 2014

This archive was generated by hypermail 2.1.8 : Mon Oct 20 2014 - 12:15:02 EEST