You’re going to want to use the
default_soundfont_preset keyword argument when creating the
s = Session(default_soundfont_preset="path/to/soundfont.sf2")
If you’re using the most recent version of SCAMP, one of the places it should look is in the same folder as the Python script.
You can also add a folder for scamp to search for soundfonts in by running:
You only have to run this code once, because the call to
make_persistent() saves the new search path to a JSON file that stores SCAMP’s playback settings. (When you import scamp, it loads up those settings.) In general, if there’s a way that you always want some setting in SCAMP to be, changing that setting and then running
make_persistent() will make that happen.
Oh, when loading a soundfont, it can be useful to call
s.print_default_soundfont_presets(), which will print a list of what’s available.