SoundFont 3 does not change the preset tables: the FluidSynth RFC describes only the differences from SF2, and none concerns phdr. The sub-chunk lists all presets, is always a multiple of 38 bytes and holds at least two records, one for each preset and a terminal record (SF2 spec 7.2).
The record
| Offset | Size | Field | Type | Meaning |
|---|---|---|---|---|
| 0 | 20 | achPresetName | CHAR[20] | The name of the preset, ASCII, zero-filled |
| 20 | 2 | wPreset | WORD | The MIDI preset number |
| 22 | 2 | wBank | WORD | The MIDI bank number; 128 is conventionally percussion |
| 24 | 2 | wPresetBagNdx | WORD | The index of the preset’s first zone in pbag |
| 26 | 4 | dwLibrary | DWORD | Reserved: preserved as read, created as zero |
| 30 | 4 | dwGenre | DWORD | Reserved: preserved as read, created as zero |
| 34 | 4 | dwMorphology | DWORD | Reserved: preserved as read, created as zero |
Rules
- Names should be unique; presets with the same name are kept, preserved or renamed. If two presets have the same bank and preset, the first in the chunk is active and the others are kept.
- A bank or preset number that is not a MIDI value (0 to 127, or 128 for the bank) makes the preset unplayable, but it is kept.
wPresetBagNdxincreases monotonically; the size ofpbagin bytes is four times the terminal’s index plus four; otherwise the file is structurally defective. A preset with no zones is ignored.- The terminal record is never accessed; its other values are conventionally zero and its name may be “EOP”. If the sub-chunk is missing, has fewer than two records or is not a multiple of 38 bytes, the file is rejected as structurally unsound.
(SF2 spec 7.2.) In the files read here (VintageDreamsWaves-v2.sf3 and FluidR3Mono_GM.sf3) some presets have non-zero dwLibrary, dwGenre or dwMorphology; the explorer reports them, as the specification asks for them to be created as zero.
In the explorer
The preset table of the SoundFont tab lists each preset; Show opens its zones, generators and modulators. The problems reported are those of SF2: a short or ragged table, bag indexes that go down or end differently from the size of pbag, a preset with no zones, duplicate names and bank/preset pairs, numbers out of range and non-zero reserved fields.
Source: FluidSynth’s SoundFont3 RFC (scope statement); SoundFont Technical Specification 2.04, sections 4.4 and 7.2.