<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <div class="moz-cite-prefix">On 06/02/2021 11:19, Edgar Aichinger
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:1772067.CepufGn3Ml@asus">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        I raised a query on the Fluidsynth list, and they suggested
        trying with </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        the command-line</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        version of fluidsynth. I tried that and it responded as it
        should - </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        which suggests the</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        problem is in the Calf Gui. I guess I should raise it with the
        Calf list </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        (if I can find it.)</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        I assume that LV2 uses either Alsa or Jack to communicate, but
        I've not </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        used LV2 at all.</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        Certainly Fluidsynth, and hence Calf, is quite happy using Jack.
        I don't </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        know about the</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">>
        other Calf plugins, as I've never used any, other than the
        synth.</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I
        think I found the cause, LV2 version indeed is fine...  it's a
        change in calfjackhost done in 2018:</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><a
href="https://github.com/calf-studio-gear/calf/commit/1b37e753876fdd104a906aed1e712ff28ec4611f#diff-3fc4abf5e55f800decb309a734fcd5b32b519c7a3a8e8c7b973759593bf67009"
          moz-do-not-send="true">https://github.com/calf-studio-gear/calf/commit/1b37e753876fdd104a906aed1e712ff28ec4611f#diff-3fc4abf5e55f800decb309a734fcd5b32b519c7a3a8e8c7b973759593bf67009</a></p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">To
        me it looks that this commit is just plain wrong in raising the
        channel number by one.</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">The
        intent (see issue #97 referenced in this commit msg) is to
        compensate the offset seen in calf monosynth and other synths,
        but apparently this change simply increases the input buffer
        channel by one...</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">So
        I changed line 197 in jackhost.cpp from:</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"> int
        channel = (buffer[0] & 0x0f) + 1;</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">to
        read:</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"> int
        channel = (buffer[0] & 0x0f);</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">and
        this fixes the off by one error in fluidsynth, and it seems the
        other synths still respond on correct channels, even if
        displaying 0-15 in their MIDI channel selectors.</p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br>
      </p>
      <p
        style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">(tried
        with Mamba virtual keyboard on my laptop, which also displays
        channels as 1 - 16)</p>
    </blockquote>
    Fine, I trust that will percolate through. For the moment I can live
    with it, I'd rather<br>
    not get into recompiling Calf, got enough on my plate...<br>
    <br>
    Bill<br>
    <pre class="moz-signature" cols="72">-- 
+----------------------------------------+
| Bill Purvis                            |
| email: <a class="moz-txt-link-abbreviated" href="mailto:bill@billp.org">bill@billp.org</a>                  |
+----------------------------------------+</pre>
  </body>
</html>