in my python script i am using fluidSynth to convert .mid files to .wav files
fs = FluidSynth()
fs.midi_to_audio('myfile.mid', 'myfile.wav')
fluidSynth successfully converts myfile.mid to myfile.wav and saves the output, everything goes well.
the problem is the output volume is too low
i saw in fluidSynth documentation is that i can insert option -g or --gain to fluildSynth to increase the default volume of 0.2
so in the FluidSynth() instance, in the python script, how can i pass the -g option to increace output volume?!
any help would be much appreciated.
It looks like you're using midi2audio, I'm not sure you're able to pass fluidsynth options in that. Since you have fluidsynth installed you could call it directly using the subprocess module and then you have access to all the options including gain.
Example setting the gain to 5:
subprocess.run(['fluidsynth', '-ni', '-g', '5', 'path to soundfont', 'myfile.mid', '-F', 'myfile.wav'])
This will make it louder. Gain isn't necessarily the same as volume but I don't understand enough about sound engineering to tell the difference.