soundfontInstrument#
- csoundengine.csoundlib.soundfontInstrument(sfpath, name)[source]#
Get the instrument number from a preset
The returned instrument number can be used with csound opcodes like sfinstr or sfinstr3
- Parameters:
sfpath (
str) – the path to a .sf2 file. “?” to open a file-browser dialogname (
str) – the instrument name
- Return type:
int|None- Returns:
the instrument index, if exists