Re: [LAD] LV2 plugin host MIDI channel number detection

2016-03-16 Thread Christopher Arndt
Am 16.03.2016 um 04:03 schrieb Robin Gareus:
> Please have a look at http://lv2plug.in/book/

And maybe some MIDI basics will help too:

http://www.somascape.org/midi/tech/spec.html
http://www.blitter.com/~russtopia/MIDI/~jglatt/tech/midispec.htm


Chris



signature.asc
Description: OpenPGP digital signature
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] LV2 plugin host MIDI channel number detection

2016-03-16 Thread Rui Nuno Capela

On 2016-03-16 02:03, Yassin Philip wrote:

On 03/16/2016 01:49 AM, Robin Gareus wrote:

On 03/16/2016 02:45 AM, Yassin Philip wrote:


But... How do other plugins do?


most listen to all channels.

 I meant, how do they do that? I suppose it's in the LV2 ttl file [5],
I'd like to know where to look in the LV2 docs, but I somehow confuse
terms, port index, channel number..?



by listening to all channels Robin meant they *ignore* midi channel 
number altogether aka. omni mode.
that is to say, they respond to all midi channel messages the same way. 
most probably you're facing a mono-timbral/single instrument plugin.


otoh. multi-timbral instruments *do* discriminate midi channel messages 
by assigning one instrument patch/synth per
midi channel address and often they present a pool of 16 slots per midi 
input port.


the lv2 spec has nothing to do with this, so don't look there for 
clues--it's all genuine midi implementation related and applies to all 
midi sound generator modules, hardware or software.


hth.
cheers
--
rncbc aka. Rui Nuno Capela

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


Re: [LAD] LV2 plugin host MIDI channel number detection

2016-03-15 Thread Robin Gareus
On 03/16/2016 03:03 AM, Yassin Philip wrote:
> 
> 
> On 03/16/2016 01:49 AM, Robin Gareus wrote:
>> On 03/16/2016 02:45 AM, Yassin Philip wrote:
>>
>>> But... How do other plugins do?
>> most listen to all channels.
> I meant, how do they do that? I suppose it's in the LV2 ttl file
> ,
> I'd like to know where to look in the LV2 docs, but I somehow confuse
> terms, port index, channel number..?

a lv2:InputPort, ev:EventPort;

uhm. Event Ports have been deprecated since years and were pronounced
End of Live over 2 years ago:
http://lists.lv2plug.in/pipermail/devel-lv2plug.in/2014-January/000642.html

Please have a look at http://lv2plug.in/book/

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


Re: [LAD] LV2 plugin host MIDI channel number detection

2016-03-15 Thread Len Ovens

On Tue, March 15, 2016 7:03 pm, Yassin Philip wrote:
>
>
> On 03/16/2016 01:49 AM, Robin Gareus wrote:
>> On 03/16/2016 02:45 AM, Yassin Philip wrote:
>>
>>> But... How do other plugins do?
>> most listen to all channels.
> I meant, how do they do that? I suppose it's in the LV2 ttl file
> ,
> I'd like to know where to look in the LV2 docs, but I somehow confuse
> terms, port index, channel number..?

Are you kidding? MIDI is a single data stream... two wires to form the
circuit. Channels are just different data. So the plugin receives 16
channels (if it wants them or not). The plugin has to filter the data to
get the channel(s) it wants to play with. The plugin can decide to deal
with only one channel and throw the rest of the data away, or it can
assign each channel to do different things such as a different sound for
each channel. I suppose a plugin could be made that treated all 16
channels as if they were the same, but most people would call that broken.
On the other hand, the controlling keyboard can decide to only send one
channel (Like my DX7 BTW) or more than one. Keyboards with auto
accompaniment would use other channels for drums, bass and chording and
leave the keyboard input it's own channel or channels. A single keyboard
might split the keyboard to send potions of the keyboard with different
channel data but in the end it all goes over the same wire.


-- 
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] LV2 plugin host MIDI channel number detection

2016-03-15 Thread Paul Davis
MIDI Channel number is part of a MIDI message. There are 16 possible
channels on a given MIDI port. You look at the channel number inside each
(channel) message (Note on, Note off, CC message mostly).

On Tue, Mar 15, 2016 at 10:03 PM, Yassin Philip  wrote:

>
>
> On 03/16/2016 01:49 AM, Robin Gareus wrote:
>
> On 03/16/2016 02:45 AM, Yassin Philip wrote:
>
>
> But... How do other plugins do?
>
> most listen to all channels.
>
> I meant, how do they do that? I suppose it's in the LV2 ttl file
> ,
> I'd like to know where to look in the LV2 docs, but I somehow confuse
> terms, port index, channel number..?
>
>
> 2c,
> robin
> ___
> Linux-audio-dev mailing 
> listLinux-audio-dev@lists.linuxaudio.orghttp://lists.linuxaudio.org/listinfo/linux-audio-dev
>
>
> --
> Philippe "xaccrocheur" 
> Yassinhttp://manyrecords.comhttp://bitbucket.org/xaccrocheur / 
> https://github.com/xaccrocheur
>
>
> ___
> 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] LV2 plugin host MIDI channel number detection

2016-03-15 Thread Yassin Philip



On 03/16/2016 01:49 AM, Robin Gareus wrote:

On 03/16/2016 02:45 AM, Yassin Philip wrote:


But... How do other plugins do?

most listen to all channels.
I meant, how do they do that? I suppose it's in the LV2 ttl file 
, 
I'd like to know where to look in the LV2 docs, but I somehow confuse 
terms, port index, channel number..?


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


--
Philippe "xaccrocheur" Yassin
http://manyrecords.com
http://bitbucket.org/xaccrocheur / https://github.com/xaccrocheur

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


Re: [LAD] LV2 plugin host MIDI channel number detection

2016-03-15 Thread Robin Gareus
On 03/16/2016 02:45 AM, Yassin Philip wrote:

> But... How do other plugins do? 

most listen to all channels.

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


Re: [LAD] LV2 plugin host MIDI channel number detection

2016-03-15 Thread Yassin Philip




Can somebody point me towards the light? I'd like my plugin to
only listen to one channel: The one of the host track it's
inserted into.


Given that there is no such thing, there's nothing you can do inside a 
plugin to make it do this precise thing. You could make it listen to 
just one MIDI channel, but that's not the same thing.


But... How do other plugins do? Thanks for your quick answer BTW ; Say, 
Calf MonoSynth, it always listen to "the right" channel, as far as I 
know there isn't even a channel number select control in the UI..? So 
what is it doing that I should do too?


yPhil

--
Philippe "xaccrocheur" Yassin
http://manyrecords.com
http://bitbucket.org/xaccrocheur / https://github.com/xaccrocheur

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


Re: [LAD] LV2 plugin host MIDI channel number detection

2016-03-15 Thread Paul Davis
On Tue, Mar 15, 2016 at 9:26 PM, Yassin Philip  wrote:

> Hello!
>
> Some LV2 plugins seem to now the MIDI channel # of the track on which they
> are inserted, and some don't.
>

There is no such concept in LV2.

The idea of a track "having" "a" MIDI channel is entirely host specific and
isn't covered by any part of LV2 that i'm aware of.


> If I had to guess I'd say that nobody knows, only some plugins can receive
> data from several MIDI channels, and some only work with one, so they never
> mistake ; Am I right?
>

As with all other plugin APIs, yes.


>
> Last year I made a GUI around so-404 to learn about LV2 (and C, C++, DSP
> code, etc. :)) ; And it has the same problem, just sightly different:
> Worse: It starts numbering at 0, so if it's inserted on a track w/ MIDI
> #4, you have to select 3
> Better: It remembers said channel # on session reload (ZynAddSubFx
> doesn't. Yoshimi does)
>

MIDI channel numbering has always been a problem. Ardour has an option so
that the user can decide if MIDI channels start at zero or 1.


>
> Can somebody point me towards the light? I'd like my plugin to only listen
> to one channel: The one of the host track it's inserted into.
>

Given that there is no such thing, there's nothing you can do inside a
plugin to make it do this precise thing. You could make it listen to just
one MIDI channel, but that's not the same thing.
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] LV2 plugin host MIDI channel number detection

2016-03-15 Thread Yassin Philip

Sorry I forgot the link to my code :/

https://bitbucket.org/xaccrocheur/kis

On 03/16/2016 01:26 AM, Yassin Philip wrote:

Hello!

Some LV2 plugins seem to now the MIDI channel # of the track on which 
they are inserted, and some don't.
If I had to guess I'd say that nobody knows, only some plugins can 
receive data from several MIDI channels, and some only work with one, 
so they never mistake ; Am I right?


Last year I made a GUI around so-404 to learn about LV2 (and C, C++, 
DSP code, etc. :)) ; And it has the same problem, just sightly different:
Worse: It starts numbering at 0, so if it's inserted on a track w/ 
MIDI #4, you have to select 3
Better: It remembers said channel # on session reload (ZynAddSubFx 
doesn't. Yoshimi does)


Can somebody point me towards the light? I'd like my plugin to only 
listen to one channel: The one of the host track it's inserted into.


yPhil



--
Philippe "xaccrocheur" Yassin
http://manyrecords.com
http://bitbucket.org/xaccrocheur / https://github.com/xaccrocheur

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


[LAD] LV2 plugin host MIDI channel number detection

2016-03-15 Thread Yassin Philip

Hello!

Some LV2 plugins seem to now the MIDI channel # of the track on which 
they are inserted, and some don't.
If I had to guess I'd say that nobody knows, only some plugins can 
receive data from several MIDI channels, and some only work with one, so 
they never mistake ; Am I right?


Last year I made a GUI around so-404 to learn about LV2 (and C, C++, DSP 
code, etc. :)) ; And it has the same problem, just sightly different:
Worse: It starts numbering at 0, so if it's inserted on a track w/ MIDI 
#4, you have to select 3
Better: It remembers said channel # on session reload (ZynAddSubFx 
doesn't. Yoshimi does)


Can somebody point me towards the light? I'd like my plugin to only 
listen to one channel: The one of the host track it's inserted into.


yPhil

--
Philippe "xaccrocheur" Yassin
http://manyrecords.com
http://bitbucket.org/xaccrocheur / https://github.com/xaccrocheur

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