| 1 | |
| 2 | <appendix id="MiscSf2"> |
| 3 | <title>SoundFont2 File Format</title> |
| 4 | |
| 5 | <para> |
| 6 | Beginning with Csound Version 4.07, <link linkend="sfload"><citetitle>Csound supports the SoundFont2 sample file format</citetitle></link>. SoundFont2 (or SF2) is a widespread standard which allows encoding banks of wavetable-based sounds into a binary file. 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 follows. |
| 7 | </para> |
| 8 | |
| 9 | <para> |
| 10 | The SF2 format is made by generator and modulator objects. All current Csound opcodes regarding SF2 support the generator function only. |
| 11 | </para> |
| 12 | |
| 13 | <para> |
| 14 | There are several levels of generators having a hierarchical structure. The most basic kind of generator object is a sample. Samples may or may not be be looped, and are associated with a MIDI note number, called the base-key. When a sample is associated with a range of MIDI note numbers, a range of velocities, a transposition (coarse and fine tuning), a scale tuning, and a level scaling factor, the sample and its associations make up a <quote>split.</quote> A set of splits, together with a name, make up an <quote>instrument.</quote> When an instrument is associated with a key range, a velocity range, a level scaling factor, and a transposition, the instrument and its associations make up a <quote>layer.</quote> A set of layers, together with a name, makes up a <quote>preset.</quote> Presets are normally the final sound-generating structures ready for the user. They generate sound according to the settings of their lower-level components. |
| 15 | </para> |
| 16 | |
| 17 | <para> |
| 18 | Both sample data and structure data is embedded in the same SF2 binary file. A single SF2 file can contain up to a maximum of 128 banks of 128 preset programs, for a total of 16384 presets in one SF2 file. The maximum number of layers, instruments, splits, and samples is not defined, and probably is only limited by the computer's memory. |
| 19 | </para> |
| 20 | </appendix> |