[LAD] LV2 Synths & Hosts : MIDI binding

David Robillard d at drobilla.net
Sun Feb 10 03:35:32 UTC 2013

On Sun, 2013-02-10 at 01:01 +0000, Harry van Haaren wrote:
> Hey all!
> I have a simple enough question, but I don't know the best practice for
> solving it, so figured I'd ask.
> There's an LV2 synth running in a LV2 host. The synth exposes its operation
> trough control ports.
> Option 1:
> The plugin can bind incoming MIDI events to these control ports values,
> allowing "standard" MIDI maps to be made for the synth.
> Use cases include using the synth on another machine with the same
> hardware: easy operation, layout identical to before.
> Downside: these MIDI binding values are hard coded in the plugin, and can't
> be changed. Also the host may update the control port (which has been
> effected by the MIDI stream) and causes a parameter jump.
> Option 2:
> The host has to implement its own form of binding the MIDI events to the
> control ports.
> Downsides: the plugin has no control over what causes what effect, so no
> standardized maps can be made.
> Application specific MIDI mapping... which is nasty.

Both are possible depending on the details of the plugin.  Plugins can
not change their own control inputs, so if you have ControlPorts then
the host must do it.  As things move to event-based control this will go
away, but that's perhaps a discussion for another time.

Note that in a plugin that supports CC directly it's not necessarily
true that the CC numbers are hard coded.  You could use other events to
configure them dynamically.

With this stuff, unfortunately, the answer is almost always "both", and
then some.  Some plugins are dumb, some are pretty clever, and some are
even a full-blown host with its own dynamic MIDI binding implementation.

> I think the "safe option" is number 2, each application sorts this thing
> out itself, and the user has to map the same synth per host.
> The MIDI mapping situation on Windows and MacOS is terrible (IMO), with
> various different "software re-map" features like Novation Automap, and
> Bores midi translator just getting in the way even more.
> Can anybody see a solution to using the same MIDI map for the same
> instrument in different software, without hard-coding it in the plugin?

The LV2 midi extension includes a vocabulary that can be used to
describe MIDI bindings in a standard way.  For this we may need a new
Bindings class or something, but the guts of describing controllers and
associating ports with bindings are already there.

No particularly deep problems here that I can see if you're just
interested in the MIDI bindings for control ports case, it just needs
establishing, which would indeed be a nice thing to do.  An idiot-proof
API in lilv would probably make it much nicer for hosts to implement.
(Interestingly this is very preset-like in many ways)

I'm assuming you mean just for LV2, if you mean broader scope then of
course there are a whole slew of additional questions.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20130209/2f42ca11/attachment.pgp>

More information about the Linux-audio-dev mailing list