Passing settings to FluidSynth

Is there a way of passing settings to FluidSynth on layer startup? I would normally do that with something on the command line, or via a config file, but how do I do it through Zynthian?

The thing I’m after at the moment is the synth.gain. It is lower than I’d like.



OK, here’s the answer…

You need to edit the file:

In the section below the line
def __init__(self, zyngui=None):

there is a line:
self.fs_options = "-o synth.midi-bank-select=mma -o synth.cpu-cores=3 -o synth.polyphony=64 -o synth.gain=5.0 -o'{}' ........

I added the -o synth.gain=5.0

The default gain is 1.0, and the max is 10.0 , so there is a bit to play with.

My addition will probably be overwritten on the next update however, so a suggestion is to have a user-adjustable config file somewhere that doesn’t get overwritten. In this way, if the standard Zynth config for FluidSynth is not what the user wants, they can add stuff.

Another option for that line is to add --server
This enables the running Fluidsynth to be accessed by Telnet to adjust settings in real time.