<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>The idea is that input ports can never be modified by the plugin.<br>
    </p>
    <p>If you want your plugin to be able to change its own parameters,
      you can already use the patch and parameter APIs together to
      achieve this.<br>
      It was a bit painful before, but host support for this is
      improving.<br>
      Qtractor, Carla, mod-host, jalv and synthpod support this. While
      Ardour has some level of support but not complete afaik.</p>
    <p>Now, if you really want to keep using control ports and have a
      way to change parameters, see discussion at
      <a class="moz-txt-link-freetext" href="https://github.com/lv2/lv2/pull/42">https://github.com/lv2/lv2/pull/42</a></p>
    <p>Rui started a proposal already implemented in Qtractor and his v1
      instruments.<br>
      I dislike his approach because it requires the plugin to use an
      Atom port for notifications, which is overkill for simple plugins
      that do not need it for anything else.</p>
    <p>I made my own extension which is just a feature with a function,
      but it is only a request that the host is allowed to say no to
      (this is quite important, as there might be parameter automation
      lines for the parameter in question, or being modified by some
      external source, or locked by the host for some reason)<br>
      See the spec of it
<a class="moz-txt-link-freetext" href="https://github.com/KXStudio/LV2-Extensions/tree/master/kx-control-input-port-change-request.lv2">https://github.com/KXStudio/LV2-Extensions/tree/master/kx-control-input-port-change-request.lv2</a><br>
      Currently only implemented in mod-host, but I will add it in Carla
      before the next v2.3 release</p>
    <p>For surge, the best is very likely to continue the work on the
      lv2-parameters target branch. We started some little work, but it
      is not finished.</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 20/12/20 10:49, Sven Jaehnichen
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:01e334e7-c7df-fada-a932-0cb9c1ff0b50@jahnichen.de">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>Hi,</p>
      <p>the old problem: control ports are READ_ONLY in LV2. Me and
        other plugin programmers struggle about it. I know it has been
        discussed here before and I know the workarounds (like
        parameters) and their limitations.</p>
      <p>Actually I read in unfa's software chat that the Surge
        programmers team are struggling about this problem too:<br>
      </p>
      <p> </p>
      <blockquote type="cite"><span><code class="code-colors inline">We
            made this choice because parts of the current LV2 spec and
            Surge are incompatible in a couple of ways, most importantly
            in the LV2 assumption that plugins never modify their
            control input port. Actions like ‘changing parameter types
            when an effect changes’ or ‘patch changes’ are not
            compatible with this design constraint. As a result, the LV2
            - especially in Ardour - unreliably saves and restores
            state. The solution - which we are working on - is to use
            new LV2 APIs that allow current Surge behavior (and match
            what other plugin specs like AU and VST do).</code></span><code></code><br>
      </blockquote>
      <p><br>
      </p>
      <p>My request: LV2 UI can call the host to change control port via
        the write_function(). I don't see such an option for the DSP
        instance. Why? It would be nice to have it. Or are there
        restrictions why it's impossible or problematic to implement?</p>
      <p>Best wishes<br>
        Sven<br>
      </p>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.lv2plug.in">Devel@lists.lv2plug.in</a>
<a class="moz-txt-link-freetext" href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in">http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in</a>
</pre>
    </blockquote>
  </body>
</html>