-------- 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/8c3a85a9899f117d2fa273b6c7948402d…>
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/
Hi folks,
I'm trying to write a small utility in python that will help me
redirect and route midi and osc to various software through jack. I'm
finding that mididings, which I am a big fan of, doesn't quite fit for
this particular task, so I started to look for other midi manipulation
modules.
Though there seems to be a dizzying array of modules that are designed
for handling various midi tasks from python, I have settled on the two
separate rtmidi ports: python-rtmidi
(http://trac.chrisarndt.de/code/wiki/python-rtmidi) and rtmidi-python
(https://github.com/superquadratic/rtmidi-python).
My question is for those that have used either or both modules for
their software:
Can you recommend one over the other, and for what reasons?
So far in my experimentation I've had trouble running rtmidi-python in
a Python3 environment.
NOTE:
As these kinds of threads tend to digress here quite frequently, I'd
like to emphasize that I'm not interested in whether python is the
right language for this kind of thing, or whether midi on linux is
bad/good, etc. -- I really don't care. I'm just interested in whether
anyone has used the abovementioned modules and if they have pros/cons
for one or the other.
Many thanks.
When I turn the controls in my UI, the controls move in the hosts
generic UI ;
But when I turn the controls in the hosts generic UI, nothing moves in
the UI.
Also each time the UI is opened, the widgets are reset at maximum (not
the values).
How can I /get/ the control ports values from the UI perspective?
--Phil
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 ;)
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#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
>
>
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev(a)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/
-------- Forwarded Message --------
Subject: Re: [LAD] How can a LV2 plugin know on what host's MIDI
Channel it's on?
Date: Thu, 16 Oct 2014 13:16:38 -0400
From: Paul Davis <paul(a)linuxaudiosystems.com>
To: Phil CM <philcm(a)gnu.org>
On Thu, Oct 16, 2014 at 12:59 PM, Phil CM <philcm(a)gnu.org
<mailto:philcm@gnu.org>> wrote:
On 16/10/14 17:15, Paul Davis wrote:
>
>
> On Thu, Oct 16, 2014 at 11:42 AM, Phil CM <philcm(a)gnu.org
> <mailto:philcm@gnu.org>> wrote:
>
> Is there a way to retrieve this info (and others, ideally)
> from the host, thus removing the need for a "midi channel"
> control port?
>
>
> I think you're confused. The host doesn't put a plugin on a MIDI
> channel. It delivers MIDI events to the plugin which might be on
> any channel.
But in Qtractor I do have a choice of what MIDI channel (or
any/omni, for that matter) I'm sending signal to on that particular
track... So, no? No way for the plugin to retrieve any info from the
host (I mean specific info, not just instantiated, port enum et al)
I guess it makes sense since it would introduce a breaking point.
Sorry, I don't really speak english, I'm just persuaded I do.
That is a host-specific issue. The part of the LV2 specification and the
existing extensions don't describe that functionality. As far as the
plugin is concerned, it just gets MIDI events. If the host is filtering
some of them, the plugin has no way to determine this programmatically.
Hello LADs
I'm trying to make a GUI for a LV2 synth based on so-404. In fact, I'm
trying to learn C / C++.
I got everything to build OK, but I'm stuck on a hard to read execution
error ; when I load the plugin in jalv, it loads it OK, but fails to
load the UI and says :
suil error: Unable to open UI library
/usr/local/lib/lv2/kis.lv2/kis_gui.so
(/usr/local/lib/lv2/kis.lv2/kis_gui.so: undefined symbol:
_Z17instantiateSO_404PK15_LV2_DescriptordPKcPKPK12_LV2_Feature)
(The architecture is based on
https://github.com/harryhaaren/lv2/tree/master/plugins/eg-sinsynth.lv2
in fact it is exactly the same : synth.c/h, synth_gui.cpp, widget.cpp/h,
built as synth.so synth_gui.so synth.ttl and manifest.ttl using waf).
I must say I'm still to fully understand the concept of descriptors...
Can somebody see what I'm doing wrong?
Thanks
--Philippe "xaccrocheur" Coatmeur
I'm almost there:
âš¡ jalv.gtk https://bitbucket.org/xaccrocheur/kis
Plugin: https://bitbucket.org/xaccrocheur/kis
UI: https://bitbucket.org/xaccrocheur/kis#gui
UI Type: http://lv2plug.in/ns/extensions/ui#X11UI
JACK Name: Kis
Block length: 512 frames
MIDI buffers: 32768 bytes
Comm buffers: 524288 bytes
Update rate: 25.0 Hz
SO-404 v.1.2 by 50m30n3 2009-2011
controlmode = 1.000000
volume = 50.000000
cutoff = 50.000000
resonance = 100.000000
envelope = 80.000000
portamento = 64.000000
release = 100.000000
channel = 1.000000
frequency = 440.000000
suil error: Failed to find descriptor for
<https://bitbucket.org/xaccrocheur/kis#gui> in
/usr/local/lib/lv2/kis.lv2/kis_gui.so
Please, give me a pointer to a basic implementation of that descriptor
thing, somebody, please end my misery.
--Phil
On 15/10/14 20:17, Paul Davis wrote:
>
>
> On Wed, Oct 15, 2014 at 2:24 PM, Phil CM <philcm(a)gnu.org
> <mailto:philcm@gnu.org>> wrote:
>
> Hello LADs
>
> I'm trying to make a GUI for a LV2 synth based on so-404. In fact,
> I'm trying to learn C / C++.
>
> I got everything to build OK, but I'm stuck on a hard to read
> execution error ; when I load the plugin in jalv, it loads it OK,
> but fails to load the UI and says :
>
> suil error: Unable to open UI library
> /usr/local/lib/lv2/kis.lv2/kis_gui.so
> (/usr/local/lib/lv2/kis.lv2/kis_gui.so: undefined symbol:
> _Z17instantiateSO_404PK15_LV2_DescriptordPKcPKPK12_LV2_Feature)
>
>
>
> % echo _Z17instantiateSO_404PK15_LV2_DescriptordPKcPKPK12_LV2_Feature
> | c++filt
> instantiateSO_404(_LV2_Descriptor const*, double, char const*,
> _LV2_Feature const* const*)
> %
>
> your plugin is missing a symbol (instantiateSO_404(...)), apparently.
>
>
>
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev(a)lists.linuxaudio.org
> http://lists.linuxaudio.org/listinfo/linux-audio-dev