0

如何更改 pygame 或流体合成器的预设声音字体?

我使用 Python 3.7.3、pygame 2.0.1、fluidsynth 1.1.11 来播放 Midi 文件。当我调用 pygame.mixer.music.load(<midi_filepath>) 时,我收到一些流体合成错误:

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"

这些声音字体文件不在我的设备上。所以我想将流体合成器指向另一个声音字体。如何在 PyGame 中更改流体合成器的预设声音字体?

4

2 回答 2

0

我无法更改预设的声音字体,但我能够安装缺少的声音字体。

apt-get install fluidr3mono-gm-soundfont为了FluidR3Mono_GM.sf3

apt-get install timgm6mb-soundfont为了TimGM6mb.sf2

于 2020-12-25T19:04:35.253 回答
0

我在这里找到了你的问题,因为我也有。但不知何故,关于 Pygame 的问题似乎在这里没有得到回答(快速)。

但是有一个关于 Pygame 主题的非常活跃的邮件列表。

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

您必须先注册。但没过多久,我很快就为另一个问题得到了一个很好的答案!

如果你通过邮件列表得到了一个好的答案,也许你也可以在这里发布。以防万一其他人正在寻找相同的东西。

于 2020-12-31T15:59:23.067 回答