[Devel] assigning MIDI CCs to lv2:ControlPort

David Robillard d at drobilla.net
Mon Jan 16 17:27:54 PST 2012

On Tue, 2012-01-17 at 08:09 +0800, Ricardo Wurmus wrote:
> >> Does mapping MIDI CCs to plugin parameters actually belong to the
> >> host? If it should be done in the plugin, what is the preferred way to
> >> allow  users to modify the mapping? Could this be done in preset files
> >> for the plugin?
> >
> > Hm?  Plugins can't set their own input port values!
> "can't" meaning "should not"? Because my plugin does. (I'm currently
> using the C++ wrapper by Lars, but I'm planning to rewrite the plugin
> in plain C soonish.)

Well, it's C, you "can" do pretty much anything, but you can't do this,
inputs are set by the host, if you change these values the host will not
know about it which is why everything is not working for you.

> Is there a canonical approach to have a plugin listen to CCs? My
> plugin evaluates incoming MIDI messages and dispatches functions that
> modify input port values when it encounters CC messages.

> It obviously is not a good way to do that (e.g. because the
> host-generated GUI is totally oblivious to the changes) and I'd love
> to change it.

Never modify input port values, ever.  Making something like this
possible would basically mean an entirely new parameter system (which
may not be a bad thing, but isn't lv2:ControlPort).

I believe there is an old extension floating around somewhere that
specified MIDI bindings in data so the host could implement it, but I am
not sure what it is.  Anyone?


More information about the Devel mailing list