我无法导入fluidsynth。[也许有更好的模块?]
我正在尝试从python或pygame合成midi。我可以从pygame发送midi事件。 我在用mingus,看起来pyfluidsynth很好/很简单。
我认为这意味着pyfluidsynth已经安装,但是一个单独的fluidsynth没有安装。我不知道它是否需要一个“fluidsynth”安装程序才能工作?
测试.py:
import fluidsynth
print ":("
错误:
Traceback (most recent call last):
File "test.py", line 1, in <module>
import fluidsynth
File "C:\Users\jake\AppData\Roaming\Python\Python27\site-packages\fluidsynth.py", line 34, in <module>
raise ImportError, "Couldn't find the FluidSynth library."
ImportError: Couldn't find the FluidSynth library.
使用:python 2.7-win32
看看
fluidsynth.py
,你的猜测可能是对的。 您应该尝试将fluidsynth.dll
放在系统的库搜索路径中的某个位置(最简单的可能是与脚本或fluidsynth.py
相同的目录)。我认为这个档案(通过google找到)包含了必要的win32二进制文件:http://svn.drdteam.org/zdoom/fluidsynth.7z
python fluidsynth模块正在查找fluidsynth二进制库文件(ie fluidsynth.dll)。
要获得这个,您可以下载、编译并安装http://sourceforge.net/projects/fluidsynth/files/fluidsynth-1.1.3/
或者
您可能可以使用fluidsynth(即QSynth)找到包含.dll文件的预编译副本的项目。
是的,您还需要FuildSynth库(windows的dll)。
要使其工作:
我把所有东西都放在同一个目录中(fluidsynth dll、PyFluidSynth模块、python脚本)。
并更改pyFluidSynth模块中的以下行(从第30行开始):
这个装置很好用。
相关问题 更多 >
编程相关推荐