我有以下样板代码
from scamp import *
s = Session()
s.tempo = 120
clarinet = s.new_part("clarinet")
当我运行它的时候,我得到了错误
Traceback (most recent call last):
File "/home/norhther/Descargas/music.py", line 6, in <module>
clarinet = s.new_part("clarinet")
File "/home/norhther/.local/lib/python3.9/site-packages/scamp/instruments.py", line 184, in new_part
instrument.add_soundfont_playback(preset=preset, soundfont=soundfont, num_channels=num_channels,
File "/home/norhther/.local/lib/python3.9/site-packages/scamp/instruments.py", line 984, in add_soundfont_playback
SoundfontPlaybackImplementation(bank_and_preset=preset, soundfont=soundfont, num_channels=num_channels,
File "/home/norhther/.local/lib/python3.9/site-packages/scamp/playback_implementations.py", line 327, in __init__
SoundfontHost(
File "/home/norhther/.local/lib/python3.9/site-packages/scamp/_soundfont_host.py", line 176, in __init__
raise ModuleNotFoundError("FluidSynth not available.")
ModuleNotFoundError: FluidSynth not available.
我在我的系统(Ubuntu)中安装了FluidSynth
,我可以毫无问题地执行它。我还使用了pip安装pyFluidSynth
和pip
1条答案
按热度按时间wribegjk1#
注:此答案早于OP编辑问题;这个问题确实包含了所引用的短语。
我还将pip install
fluidsynth
与pip
一起使用PyPI上的
fluidsynth
软件包最后一次更新是在2012年,SCAMP与FluidSynth连接时并不依赖该软件包。要安装的正确软件包名为pyFluidSynth
。要安装该软件包,请运行以下命令。您还必须卸载错误的
fluidsynth
包。