0

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?

Aaron Elliot
  • 155
  • 9

2 Answers2

0

I wasn't able to change the preset soundsfonts, but I was able to install the missing soundfonts.

apt-get install fluidr3mono-gm-soundfont for FluidR3Mono_GM.sf3

apt-get install timgm6mb-soundfont for TimGM6mb.sf2

Aaron Elliot
  • 155
  • 9
0

I found your question here because I have it too. But somehow questions about Pygame do not seem to get answered (fast) here.

But there is a very active mail list on topics regarding Pygame.

http://pygame-users.25799.x6.nabble.com/

You have to register first. But it did not take me long and I got a pretty good answer for another question ridiculously fast!

If you get a good answer through the mail list maybe you could post it here, too. Just in case other people are searching for the same thing.

Leonhard Wolf
  • 93
  • 2
  • 10