sfload — Loads an entire SoundFont2 (SF2) sample file into memory.


Loads an entire SoundFont2 (SF2) sample file into memory. These opcodes allow management the sample-structure of SF2 files. In order to understand the usage of these opcodes, the user must have some knowledge of the SF2 format, so a brief description of this format can be found in the SoundFont2 File Format Appendix.

sfload should be placed in the header section of a Csound orchestra.


ir sfload "filename"


ir -- output to be used by other SF2 opcodes. For sfload, ir is ifilhandle.

filename -- name of the SF2 file, with its complete path. It must be a string typed within double-quotes with “/” to separate directories (this applies to DOS and Windows as well, where using a backslash will generate an error), or an integer that has been the subject of a strset operation


sfload loads an entire SF2 file into memory. It returns a file handle to be used by other opcodes. Several instances of sfload can placed in the header section of an orchestra, allowing use of more than one SF2 file in a single orchestra.

These opcodes only support the sample structure of SF2 files. The modulator structure of the SoundFont2 format is not supported in Csound. Any modulation or processing to the sample data is left to the Csound user, bypassing all restrictions forced by the SF2 standard.

See Also

sfilist, sfinstr, sfinstrm, sfpassign, sfplay, sfplaym, sfplist, sfpreset


Author: Gabriel Maldonado
May 2000

New in Csound Version 4.07