There was a minor but breaking change in the FluidSynth API with version 2. The difference is shown in this code from opcodes/fluidOpcodes.cpp:
#if (FLUIDSYNTH_VERSION_MAJOR >= 2)
// TODO: Change -1 to a configurable FX group?
fluid_synth_chorus_on(fluidSynth, -1, chorusEnabled);
fluid_synth_reverb_on(fluidSynth, -1, reverbEnabled); #else
fluid_synth_set_chorus_on(fluidSynth, chorusEnabled);
fluid_synth_set_reverb_on(fluidSynth, reverbEnabled); #endif
I have not been able to figure out how to get the Csound build to detect the FluidSynth version. Perhaps somebody else can do that. In the meantime, you can do a local build with the correct function for your version of FluidSynth. Just edit fluidOpcodes to use the correct FluidSynth API or version, for example if you have version 2:
#define FLUIDSYNTH_VERSION_MAJOR 2 #if (FLUIDSYNTH_VERSION_MAJOR >= 2)
// TODO: Change -1 to a configurable FX group?
fluid_synth_chorus_on(fluidSynth, -1, chorusEnabled);
fluid_synth_reverb_on(fluidSynth, -1, reverbEnabled); #else
fluid_synth_set_chorus_on(fluidSynth, chorusEnabled);
fluid_synth_set_reverb_on(fluidSynth, reverbEnabled); #endif
If you don’t want to build Csound yourself, then uninstall FluidSynth and find an earlier version of FluidSynth to reinstall.
at Menno:
thanks for confirming i'm not a total idiot!
(and for your work on manual).
at Michael:
i tried your suggestion but bulding Csound i get this:
/home/fra/csound/Opcodes/fluidOpcodes/fluidOpcodes.cpp: In member function 'int32_t FluidEngine::init(CSOUND*)':
/home/fra/csound/Opcodes/fluidOpcodes/fluidOpcodes.cpp:123:3: error: 'fluid_synth_chorus_on' was not declared in this scope; did you mean 'fluid_synth_set_chorus_on'?
123 | fluid_synth_chorus_on(fluidSynth, -1, chorusEnabled);
> ^~~~~~~~~~~~~~~~~~~~~
> fluid_synth_set_chorus_on
/home/fra/csound/Opcodes/fluidOpcodes/fluidOpcodes.cpp:124:3: error: 'fluid_synth_reverb_on' was not declared in this scope; did you mean 'fluid_synth_set_reverb_on'?
124 | fluid_synth_reverb_on(fluidSynth, -1, reverbEnabled);
> ^~~~~~~~~~~~~~~~~~~~~
> fluid_synth_set_reverb_on
at John:
--Csound version 6.15 (double samples) Feb 1 2021
[commit: d6a7e152488cb42dab47eb31396fa917d5af2f81]
so i have installed fluidsynth version 1.1.11 from source (changing library path to /usr/local/lib instead of /usr/local/lib64) and then rebuild Csound and it seems that fluidsynth opcodes are working.
Now i have to verify if i have broken some other software using libfluidsynth ...