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

Paul Davis paul at linuxaudiosystems.com
Thu Oct 16 17:51:39 UTC 2014

On Thu, Oct 16, 2014 at 1:44 PM, Phil CM <philcm at gnu.org> wrote:

> 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.
> Wow, not even the very channel it's broadcasting on in readable? Does that
> mean that I *have* to implement a MIDI channel selection in my synth?
> There is no way to go around this?

Again, you're confused. The host doesn't control what the plugin does when
it generates MIDI. The host *might* filter messages from the plugin based
on some user preference, or it might not. It sounds as if you need an LV2
extension so that the host and plugin can exchange information on preferred
MIDI channel(s). This isn't part of the core LV2 specification. The host is
free to deliver zero, one or more MIDI channels to the plugin; the plugin
can use any channels it wants, but the host might throw away zero, one or
more channels.

Sounds as if you want the host to allow the user to select a channel and
then have the plugin know about that choice. Not part LV2, and also not
part of AudioUnits or the VST plugin APIs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20141016/482f2208/attachment-0001.html>

More information about the Linux-audio-dev mailing list