< Back to IRCAM Forum

Fluidsynth audio configuration (linux)

Hello,

I’m trying OM 7.7 in Linux Mint 22.2 and I would like to know if it’s possible to change FluidSynth’s audio settings when it runs inside OpenMusic. In particular, I’m interested in increasing the audio period size, similar to using fluidsynth -z 256 in the terminal, which seems to improve playback smoothness in my case.

I would also like to adjust the default gain of fluidsynth at startup, like with the -g flag in the terminal.

Is there a way to change these settings directly in OpenMusic at startup, or is there a recommended workaround?

Thank you for your help! :slight_smile:
rc

Dear RC,

Yes it is possible. Here is a patch:
fluid_period.lisp (2.0 KB)

Of course it would be nice to put this in the fluid preferences?

I am not very sure about the period-size if it is taken into account.

Tell me.

Best
K

Dear K,

Thanks for the quick reply and patch!
I tested it on a new workspace and it seems that it doesn’t make any difference, for example if I reduce the gain to 0.1 or if I change the bufsize between 64 and 512, it all sounds the same (crackling noises).

OTOH i continue testing fluidsynth settings outside om. In my case I get the same result if I open it with fluidsynth -a alsa -z 256 and fluidsynth -a jack -z 64. In both cases the noises are gone.

So i returned to om, created a new workspace without the fluid_period patch and loaded fluidsynth with jack driver. It worked fine with clean sound.

Now, if I reopen the same workspace with the autoload synth option checked, the noises are back, even if the fluid driver appears as jack in the om preferences. If i manually delete the synth and load it again (without touching the fluid driver jack) it sounds fine. To my eyes it seems that the autoload occurs with alsa, despite having jack saved as driver, but I’m just assuming this since I have no way to prove it.

Is there a way to check which fluid driver is loaded with the autoload synth option checked after restarting om?

best
rc

Dear rc

This patch sorry works WITHOUT autoload synth option. And only on startup BEFORE any synth is loaded. And yes sorry, forgot to integrate jack driver (it was only for alsa) since it is a test patch and not definitive.

Ok so here one with both, jack and alsa
fluid_period1.lisp (1.9 KB)

In order to get the values correct once change, evaluate the patch before loading any synth.
Then test.
Unload synth
Change values if needed
Evaluate patch
load synth
test
etc.

Of course if this works for you, (on my side it is working), i can put the variables (gain and period) as parameters in the fluid preferences Meaning these values will be taken in account BEFORE lodaing any synth.

Keep me informed.

Best
K

PS: sorry forgot. To know which driver fluid is using evaluate this expression:

om::*jack-alsa*