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.
Depending on the version of pyFluidSynth you can set the gain in different ways. I´m using this
fl = fluidsynth.Synth(20.0,44100) where 20.0 is the gain level. It's minimum level is 0.5.
This code plays a chord. You can set the gain level: