Re: [LAD] How can a LV2 plugin know on what host's MIDI Channel it's on?

2014-10-17 Thread Phil CM


On 16/10/14 20:39, Paul Davis wrote:



On Thu, Oct 16, 2014 at 2:21 PM, Phil CM phi...@gnu.org 
mailto:phi...@gnu.org wrote:



On 16/10/14 19:02, Bill Gribble wrote:

Here's a vote for anything (lv2 extension, OSC convention, or
something else) that makes information about how a host is
using a plugin available to the plugin.

This kind of introspection is useless for most plugins, but
those that need it can't get the information any other way.

Indeed, most plugins seem to get this in information as to what
track they are in (Calf MonoSynth, randomly) so how do I implement
that in my plugin? :)


what makes you think that Calf MonoSynth knows what track or channel 
it is in?
The fact that when I put it on a MIDI track (and the hosts decide witch 
MIDI channel this track sends messages on) I can hear it without telling 
him said channel (and I only hear it on that track)..?




___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] How can a LV2 plugin know on what host's MIDI Channel it's on?

2014-10-17 Thread Len Ovens

On Fri, 17 Oct 2014, Phil CM wrote:



On 16/10/14 20:39, Paul Davis wrote:



Indeed, most plugins seem to get this in
information as to what track they are in (Calf
MonoSynth, randomly) so how do I implement that in
my plugin? :)


what makes you think that Calf MonoSynth knows what track or channel
it is in?

The fact that when I put it on a MIDI track (and the hosts decide witch MIDI
channel this track sends messages on) I can hear it without telling him said
channel (and I only hear it on that track)..?


I would suggest that Calf Monosynth is channel agnostic. That is it 
ignores the channel information and uses midi events for any channel. 
However in this case it only plays midi info for one channel because that 
is all the host sends.


If I load The Calf Jack Host with the monosynth, it will respond to any 
channel from the keyboard. Calf jack host does no filtering. However if I 
run it through qmidiroute with only channel 1 enabled I get no sound 
when the keyboard is any channel but 1.


--
Len Ovens
www.ovenwerks.net

___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] Fwd: Re: How can a LV2 plugin know on what host's MIDI Channel it's on?

2014-10-17 Thread Ralf Mardorf
I agree with Len.

On Thu, 2014-10-16 at 12:29 -0700, Len Ovens wrote:
 That control could have an option to accept all channels too so that
 the host could do filtering.

JFTR accept all channels, as if they were one channel is named omni
mode :).


___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] [Bulk] Re: How can a LV2 plugin know on what host's MIDI Channel it's on?

2014-10-17 Thread Ralf Mardorf
On Fri, 2014-10-17 at 08:25 +0100, Phil CM wrote:
 The fact that when I put it on a MIDI track (and the hosts decide
 witch MIDI channel this track sends messages on) I can hear it without
 telling him said channel (and I only hear it on that track)..?

Len explained it ;). Omni mode:
http://lists.linuxaudio.org/pipermail/linux-audio-dev/2014-October/035575.html


___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] [Bulk] Re: How can a LV2 plugin know on what host's MIDI Channel it's on?

2014-10-17 Thread Ralf Mardorf
On Fri, 2014-10-17 at 01:12 -0700, Len Ovens wrote:
 I would suggest that Calf Monosynth is channel agnostic. That is it 
 ignores the channel information and uses midi events for any channel.

Len explained it ;). Omni mode:
http://lists.linuxaudio.org/pipermail/linux-audio-dev/2014-October/035575.html

It can be tested, if it is done that way, by recording or editing two or
more channels with one Qtractor MIDI track. Btw. Qtractor's track
properties dialog allows to select channel 1 to 16, while other
sequencers might provide to select from 1 to 16 + any or all, Qtractor
provides to check omni.


___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


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

2014-10-17 Thread Phil CM
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
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


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

2014-10-17 Thread Philippe Coatmeur

See, I know the value of each control port this way:

static void port_event(LV2UI_Handle ui,
   uint32_t port_index,
   uint32_t buffer_size,
   uint32_t format,
   const void * buffer)
{
KisGUI *self = (KisGUI *) ui;

if (port_index == 3)
  cout  Volume is   (*static_castconst float*(buffer))  
  Format is   format  endl;


cout  Port event on index   port_indexFormat is   
format  endl;


return;
}

It's call at session opening, so that would already solve the problem at 
/that/ time.

But how can I access the UI widget to pass it the value?

The problem is to find documentation on NTK... All plugin sources that I 
can find use Qt or GTK...
But either way, I need to uderstad te logic of it : How does the UI 
*read* values?



On 17/10/14 13:30, Phil CM wrote:
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


___
Linux-audio-dev mailing list
Linux-audio-dev@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/

___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


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

2014-10-17 Thread Harry van Haaren
On Fri, Oct 17, 2014 at 1:30 PM, Phil CM phi...@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 ;)

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@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev