A special directive, which allows using SFZ files as building blocks for creating larger, more complex SFZ files.
The file to which #include points is, in effect, pasted into the SFZ file at the point of the #include. This means that the file structure needs to be respected - after all #includes are processed, ‹control› header needs to be before the regions in the file, ‹curve› opcodes need to be at the bottom etc. This can be nested - #included files can contain more #includes of their own, though of course recursion must be avoided!
The included path must be surrounded by double quotes, similar to how include works in C/C++ files. Note that this is different from how the paths in the sample opcode works, which do not need quotes.
Either a filename or a path can be used. If the #included files are in another folder, the SFZ is interpreted as if it was in the main SFZ file's path, not the path where the #included files are. The #included files can either have the extension sfz or sfzh, which is functionally no different from sfz, just used for clarity when #including a header.
This is useful for creating large complex files, and also for simplifying the management of files which repeat similar regions with different opcodes. This is especially convenient in conjunction with the ‹master› header.
Here's an example of how #include and master can be used together:
tune=-1200 //Everything is tuned down an octave, then tuned back up with its own tune param
pan=-100 //Similar for pan - hard left, brought to proper position with param
pan_oncc10=0 //Disable master pan
Using #include with #define in the same instrument requires care, especially if the same value has to be #defined to have different settings at different points in an instrument. Using #define to set the same variable to different values at one point in the same SFZ file does not work well at least in ARIA/Sforzando when loading an instrument. However, a workaround there is to use #include to put each
define statement in a separate file. In simple tests, that has been successful.
Category: Instrument Settings