Description:
Dear all,
I’m new to SCAMP and to this forum, but I already see me using this tool extensively and I’m glad someone put in so much effort to build and keep on scaling it.
Premise: I work on Windows 11, SCAMP Version: 0.9.2.post3
Newby problem: even if I do have sf2utils installed, my code throws errors whenever I try to pass in instrument name arguments to new_part()
. Instead, leaving the arguments empty make it work normally both in score xml output and in playback, with the default piano sound.
Errors also happen when I try to Session().print_default_soundfont_presets()
, as in the example I’m reporting here.
Apparently there is something going on with soundfont configurations in my computer, but I’m really not able to tackle the issue.
Error printout:
WARNING:root:sf2utils was not found; info about soundfont presets will not be available.
PRESETS FOR default (general_midi)
Traceback (most recent call last):
File "C:\Users\giuli\Coding\scampExp\app.py", line 10, in <module>
S.print_default_soundfont_presets()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\giuli\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\scamp\instruments.py", line 288, in print_default_soundfont_presets
print_soundfont_presets(self.default_soundfont)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\giuli\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\scamp\_soundfont_host.py", line 379, in print_soundfont_presets
for preset in get_soundfont_presets(which_soundfont):
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "C:\Users\giuli\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\scamp\_soundfont_host.py", line 368, in get_soundfont_presets
raise ModuleNotFoundError("Cannot inspect soundfont presets; please install sf2utils.")
ModuleNotFoundError: Cannot inspect soundfont presets; please install sf2utils.
PS C:\Users\giuli\Coding\scampExp>
The full code that resulted in the error:
from scamp import *
S = Session()
S.print_default_soundfont_presets()
piano = S.new_part()
S.start_transcribing(piano)
piano.play_note(60, 0.1, 2)