【问题标题】:PyGame change preset soundfontPyGame 更改预设声音字体
【发布时间】:2020-12-25 15:14:56
【问题描述】:

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

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

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 中更改流体合成器的预设声音字体?

【问题讨论】:

    标签: python pygame midi fluidsynth


    【解决方案1】:

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

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

    apt-get install timgm6mb-soundfont 为TimGM6mb.sf2

    【讨论】:

      【解决方案2】:

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

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

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

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

      如果您通过邮件列表获得了很好的答案,也许您也可以将其发布在这里。以防其他人正在搜索相同的内容。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-02-25
        • 1970-01-01
        相关资源
        最近更新 更多