Home > Software design >  FluidSynth not available using scamp
FluidSynth not available using scamp

Time:12-20

I have the following boilerplate code

from scamp import *

s = Session()
s.tempo = 120

clarinet = s.new_part("clarinet")

When I run it, I get the error

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.

I installed FluidSynth in my system (Ubuntu) and I can execute it with no problem. I also used pip install pyFluidSynth with pip

CodePudding user response:

Note: This answer predates OP editing the question; The question indeed contained the quoted phrase.


I also used pip install fluidsynth with pip

The fluidsynth package on PyPI was last updated in 2012, and is not what SCAMP depends on for interfacing with FluidSynth. The correct package to be installed is called pyFluidSynth. To install it, run the following command.

pip install pyFluidSynth

You'll also have to uninstall the wrong fluidsynth package.

pip uninstall fluidsynth
  • Related