soundfontIndex#
- csoundengine.csoundlib.soundfontIndex(sfpath)[source]#
Make a SoundFontIndex for the given soundfont
- Parameters:
sfpath (
str
) – the path to a soundfont (.sf2) file- Return type:
- Returns:
a SoundFontIndex
Example
>>> from csoundengine import csoundlib >>> idx = csoundlib.soundfontIndex("/path/to/piano.sf2") >>> idx.nameToPreset {'piano': (0, 0)} >>> idx.nameToIndex {'piano': 0}