[LAU] Weird behaviour with Calf Fluidsynth

Edgar Aichinger edogawa at aon.at
Sat Feb 6 12:19:28 CET 2021

> I raised a query on the Fluidsynth list, and they suggested trying with 
> the command-line
> version of fluidsynth. I tried that and it responded as it should - 
> which suggests the
> problem is in the Calf Gui. I guess I should raise it with the Calf list 
> (if I can find it.)
> I assume that LV2 uses either Alsa or Jack to communicate, but I've not 
> used LV2 at all.
> Certainly Fluidsynth, and hence Calf, is quite happy using Jack. I don't 
> know about the
> other Calf plugins, as I've never used any, other than the synth.

I think I found the cause, LV2 version indeed is fine...  it's a change in calfjackhost done in 2018:


To me it looks that this commit is just plain wrong in raising the channel number by one.

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...

So I changed line 197 in jackhost.cpp from:

 int channel = (buffer[0] & 0x0f) + 1;

to read:

 int channel = (buffer[0] & 0x0f);

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.

(tried with Mamba virtual keyboard on my laptop, which also displays channels as 1 - 16)

> Bill

[1] https://github.com/calf-studio-gear/calf/commit/1b37e753876fdd104a906aed1e712ff28ec4611f#diff-3fc4abf5e55f800decb309a734fcd5b32b519c7a3a8e8c7b973759593bf67009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.linuxaudio.org/archives/linux-audio-user/attachments/20210206/76e413b7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.linuxaudio.org/archives/linux-audio-user/attachments/20210206/76e413b7/attachment.sig>

More information about the Linux-audio-user mailing list