The inst sub-chunk lists all instruments in the file. It is always a multiple of 22 bytes and holds a minimum of two records: one for each instrument and a terminal record (spec 7.6). An instrument is a collection of zones that represents the sound of a single musical instrument or sound-effect set (spec 2.1).
The record
| Offset | Size | Field | Type | Meaning |
|---|---|---|---|---|
| 0 | 20 | achInstName | CHAR[20] | The name of the instrument in ASCII, unused terminal characters zero. Names are case sensitive |
| 20 | 2 | wInstBagNdx | WORD | The index of the instrument’s first zone in the ibag sub-chunk |
(Spec 4.4 and 7.6.)
Rules
- Names. A unique name should be given to each instrument. A bank read with identical names must not have instruments discarded: they are preserved or, preferably, renamed.
- The bag index.
wInstBagNdxincreases monotonically with the instruments, because the zones are in the same order. The size ofibagin bytes is four greater than four times the terminal instrument’swInstBagNdx. If the indexes are not monotonic or the terminal’s does not match the size ofibag, the file is structurally defective and should be rejected at load time. Every instrument except the terminal must have at least one zone. - The terminal record. It is never accessed and exists only to give the terminal bag index. All its other values are conventionally zero, and its name should be “EOI”, end of instruments.
- Rejection. If the sub-chunk is missing, has fewer than two records, or is not a multiple of 22 bytes, the file is rejected as structurally unsound.
- Orphans. All instruments are typically referenced by a preset zone, but a file with orphaned instruments (not referenced by any preset zone) need not be rejected; applications may ignore or filter them out.
(Spec 7.6.)
In the explorer
The Instruments tab lists each instrument with its zone count, the samples its zones use and how many preset zones use it; Show opens its zones, generators and modulators. The explorer reports the problems of the rules above, and the Overview says how many instruments no preset uses. It reports a terminal instrument not named “EOI”.
Source: SoundFont Technical Specification 2.04, sections 2.1, 4.4 and 7.6.