SFZ has no version number inside the file: nothing in an .sfz file says whether it is SFZ 1, SFZ 2 or uses ARIA extensions. The versions are labels the documentation puts on each header and opcode, to say where it comes from. These notes are in our words, from docs/versions.md and the opcode table of the sfz-format repository (sfzformat.com), the original rgc:audio page of 2007, the LinuxSampler SFZ page and the sfizz source.
The versions
| Label | What it is | Table entries |
|---|---|---|
| SFZ v1 | “The first version of the format was originally published on the rgc:audio website, which is the most supported by sfz related software.” (versions.md.) The page, captured by the Internet Archive on 20 October 2007, describes the headers <region> and <group>, the sample opcode, the input controls and the performance parameters. It names the sample formats as WAV of any sample rate and Ogg Vorbis (opcodes/sample.md). | 192 |
| SFZ v2 | “The SFZ v2 standard has never been clearly set down anywhere.” For the purpose of sfzformat.com, anything in Simon Cann’s book Cakewalk Synthesizers counts as SFZ 2, “regardless of which SFZ players it might or might not be actually implemented in”. The book is a manual for users of Cakewalk products, not a standard, and “if you are developing a new SFZ player, do not feel obligated to support all opcodes, headers etc.”. It adds the <control>, <global>, <curve>, <effect> and <sample> headers, controller modulation with oncc, the flexible envelope generators and LFOs, AIFF sample files and the controller numbers 128 to 137. | 471 |
| ARIA | The engine of Plogue’s sforzando, “a free, highly SFZ 2.0 compliant sample player” that “supports almost all SFZ v1 and v2 opcodes, plus ARIA extensions” (the sfz-format software list). “If something works in ARIA but not in any Cakewalk products, that’s considered an ARIA extension.” ARIA adds the <master> header, more controller numbers (140 to 155), XML instrument banks, and many opcodes. | 181 |
| sfizz | Opcodes the table credits to the sfizz player. | 1 |
| LinuxSampler | Extensions of the LinuxSampler engine; the only one in the table is script, which loads a real-time instrument script (Other opcodes). Its own SFZ page is unfinished; it lists <global> as SFZ v1 and says so with “TODO” for most opcodes. | 1 |
| Calfbox | Extensions of the Calfbox library (Krzysztof Foltman); the one entry in the table is label_outputN. | 1 |
The table has 848 entries in all: 433 opcodes, 117 aliases and 298 modulation names. An entry carries one label (one alias, amplitude_ccN, has none in the table). Where it carries none of its own, as for most modulation names, the viewer uses its parent’s and says so.
The viewer’s Overview tab counts, for the file it shows, how many different opcodes and headers come from each label, and says what the file needs at least (SFZ 1, SFZ 2 or an engine with extensions). Because some sources disagree about a label (the LinuxSampler page against the table for <global>), the label is the table’s, and the opcode’s node in the tree shows it.
Where the versions differ in practice
- Value ranges. The ranges in the table are those of the specifications, and engines may accept more: for
tune“the SFZ1 spec is ±1 semitone, from -100 to 100, though at least in ARIA, it seems a broader range is supported, at least -2400 to 2400 cents” (opcodes/tune.md). The viewer reports a value outside the table’s range as such and says that some engines accept more. - Defaults. “Although the spec default is 0.001, ARIA uses a default of 0.03 for smoother default cutoffs. Cakewalk products use 0.001” (
opcodes/ampeg_release.md). The table’s defaults are documentation strings, not always values to compute with (a note insyntax.ymlsays so). - Several
<global>headers. One per file in the specifications; several “at least under ARIA”. - A new
<control>. Resetsdefault_pathin ARIA and sfizz, not in Cakewalk products. - Paths. Cakewalk products allow only relative sample paths; ARIA, Bassmidi and sfizz also absolute ones.
- Unknown opcodes. sfizz skips them. The Cakewalk suite expects a player to log them.
- Where a name is documented only for ARIA (the
_onccand_ccspellings of one modulation, for instance) the table lists the alias with its own label.
Sample formats by engine
“At the SFZ1 specification level, the supported sample formats are WAV of any sample rate and Ogg Vorbis compressed samples. For SFZ2, the Cakewalk book specifies the following sample types in addition of the above: AIFF of any sample rate. FLAC support is not specified as mandatory, though FLAC was supported by Cakewalk Session Drummer, and is supported by ARIA” (opcodes/sample.md). The engine table (data/sfz/engines.yml, formats.yml):
| Engine | AIFF | FLAC | MP3 | Ogg | WAV | WavPack |
|---|---|---|---|---|---|---|
| ARIA | yes | yes | no | yes | yes | no |
| Calfbox | yes | yes | no | yes | yes | no |
| sfizz | yes | yes | yes | yes | yes | yes |
MP3 and WavPack are marked lossy in formats.yml, as is Ogg. The page says WAV is the usual first choice (or AIFF on macOS) and FLAC the second.
ARIA XML banks
ARIA can also read an XML file that collects several SFZ instruments in one bank and describes their user interface. It is “technically not part of the SFZ format”, has no SFZ in it, and “must be digitally signed by Plogue” (extensions/aria/xml_instrument_bank.md). Its #define directive may be used at the bank level. The format of these banks is not described by any source we read, and the viewer does not read them.