<p>Yes. I was thinking the same thing. The plugin "touch myself" feature would solve this as well as my "import external preset" usecase.</p>
<div class="gmail_quote">On Jun 8, 2012 8:27 PM, "David Robillard" <<a href="mailto:d@drobilla.net">d@drobilla.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, 2012-06-08 at 09:45 +0000, Jeremy Salwen wrote:<br>
> Currently, a plugin writer is in a bit of a sticky situation: if the<br>
> plugin supports MIDI CC events, then the internal parameters are<br>
> hidden from the host. You can do something where you have a switch<br>
> which toggles between MIDI CC control, and Control Port control, but<br>
> this is not a fun thing to do, and I think it is additionally<br>
> confusing for the user.<br>
><br>
> I was thinking about the ideal behavior from the user's point of view,<br>
> and a realize that a knob which sends midi CC events to the plugin<br>
> would be ideal. It would be bonus if this knob listened to the MIDI<br>
> stream and adjusted its value to match. If there were an extension<br>
> which specifies "virtual ports" in the .ttl which are actually just<br>
> refences to a midi port + a CC index, and the host just displays a<br>
> knob which generates events for the MIDI port, then the plugin would<br>
> be relieved of the duty of having "duplicate" inputs. I think this is<br>
> simple enough that it could be easily be transparently implemented in<br>
> lilv or whatever successor library.<br>
><br>
> On top of the nice behavior for CC controls, this sort of extension<br>
> could easily use the atom:sequence extension to allow control ports<br>
> which are event based (again transparent to the host application if<br>
> desired). I know some people on the mailing list consider such a<br>
> mechanism superior, and this could be a stepping stone towards<br>
> widespread LV2 support for this sort of control (with plugins getting<br>
> parameter changes before they happen, etc), while still providing<br>
> perfect backwards compatibility for hosts who don't want that fine<br>
> level of control.<br>
><br>
> As always, I may be far off track, so let me know where I'm wrong.<br>
> I'm happy to help with code, etc, and I'm currently working on a host<br>
> and synthesizer in tandem, so they could easily become a<br>
> proof-of-concept for this sort of extension.<br>
<br>
We definitely need a dynamic event-based control mechanism, but I don't<br>
think I'd base it on MIDI. MIDI sucks, and 127 steps really just<br>
doesn't cut it.<br>
<br>
I think we need a modern control event, with facilities for announcing<br>
controls and such, and binding to MIDI would be the host's job.<br>
<br>
There was some discussion vaguely about this recently. I was thinking<br>
of making dynamic parameters much like ports in that they're identified<br>
by symbol and index, in the same namespace as ports, so a change event<br>
would look something like:<br>
<br>
/* This is event payload so the time stamp is in the header */<br>
struct LV2_Control_Change_Event {<br>
uint32_t param; ///< Parameter ID<br>
float value; ///< New value<br>
uint32_t next_offset; ///< Time to next (optional, for interp)<br>
float next_value; ///< Next value (optional, for interp)<br>
};<br>
<br>
Probably with generic values instead of float, but you get the idea.<br>
The big question here is how to announce and configure such things.<br>
Globally, doing this via ports as well is by far the most flexible<br>
solution, but it might be a bit odd to implement vs API for this. I<br>
don't know, but if it's possible to cleanly do things via ports, it's<br>
always better to do so.<br>
<br>
For just static parameters like this, they can be listed in the ttl<br>
easily. Perhaps we should just start with this and leave dynamic along<br>
for now?<br>
<br>
Cheers,<br>
<br>
-dr<br>
<br>
<br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.lv2plug.in">Devel@lists.lv2plug.in</a><br>
<a href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in" target="_blank">http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in</a><br>
</blockquote></div>