How do I change the preset soundfonts for pygame or fluidsynth?
Im using Python 3.7.3, pygame 2.0.1, fluidsynth 1.1.11 to play Midi files. When I call pygame.mixer.music.load(<midi_filepath>), I receive a few fluidsynth errors:
fluidsynth: error: Unable to open file "/usr/share/sounds/sf3/FluidR3Mono_GM.sf3" fluidsynth: error: Couldn't load soundfont file fluidsynth: error: Failed to load SoundFont "/usr/share/sounds/sf3/FluidR3Mono_GM.sf3" fluidsynth: error: Unable to open file "/usr/share/sounds/sf2/TimGM6mb.sf2" fluidsynth: error: Couldn't load soundfont file fluidsynth: error: Failed to load SoundFont "/usr/share/sounds/sf2/TimGM6mb.sf2"
These soundfont files are not on my device. So I'd like to point fluidsynth to another soundfont. How do I change the preset soundfonts for fluidsynth inside PyGame?
I wasn't able to change the preset soundsfonts, but I was able to install the missing soundfonts.
apt-get install fluidr3mono-gm-soundfontforFluidR3Mono_GM.sf3apt-get install timgm6mb-soundfontforTimGM6mb.sf2