LV2 and multiple midi channels

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
witchspace
Established Member
Posts: 60
Joined: Sun Jul 13, 2014 7:14 pm
Location: Eindhoven

LV2 and multiple midi channels

Post by witchspace »

Hello,

I've been trying to port a few legacy hardware synth emulators (ADLMIDI, Munt) to LV2. However, these are of the "multi channel multi timbral" kind (a la fluidsynth).

With LV2 it seems to be preferred to have one MIDI input with one MIDI channel. I've not seen this specifically documented but for example Carla drops the channel information completely when sending events to LV2 plugins. Also, program changes (LV2_Programs) are supposed to be global to the synth and not restricted to a channel.

Does this mean that the right way forward would be to "break up the synths" into parts and get rid of multiple MIDI channels completely? This is only a bit of extra work and doesn't really worry me, although I do think running multiple instances (and thus polyphony per part, instead of globally) could result in more CPU and memory usage.
witchspace
Established Member
Posts: 60
Joined: Sun Jul 13, 2014 7:14 pm
Location: Eindhoven

Re: LV2 and multiple midi channels

Post by witchspace »

Thanks for the explanation!
falkTX wrote: Do not confuse plugin programs&presets with MIDI bank/program events, they are different things.
Ah! I was confusing them because Carla either maps program changes or drops them.

Would you be opposed to a "Send Program Changes" option (akin to Send Control Changes) that lets program change and bank change events through to the plugin?
You can use MIDI with the full channels in your synth if you want. Most LV2 synths I've used only support 1 channel, but there's nothing in LV2 restricting this (it's all MIDI events in the end).
Ok, good to hear!
One thing to note though: if you have control inputs you *cannot* change them yourself.
(If you do you'll break host<->plugin state because the host has no way to know about the change.)
Yup yup. I'm not sure whether to add any control inputs at all. On one hand it'd be nice to be able to configure the parameters through controls, as having it possible to change controls on the fly allows for nice effects and expression, but on the other hand these beasts have so damn many internal knobs... (I believe the same problem exists with zynaddsubfx? :D )
witchspace
Established Member
Posts: 60
Joined: Sun Jul 13, 2014 7:14 pm
Location: Eindhoven

Re: LV2 and multiple midi channels

Post by witchspace »

falkTX wrote: afaik this is already possible if you uncheck the "Map program changes" option.
That should allow the plugin to receive midi bank/program messages, skipping the mapping done by carla.
That didn't work for me. There was no MIDI event delivered to the LV2 plugin for program and bank changes when "Map program changes" is unchecked. I send the events from my MIDI controller, and I've verified that the events do reach Carla.

Possibly that changed after today's commit, I haven't tested yet.
Post Reply