Introduction
A SoundFont is a bank of sampled instruments. It was created by E-mu Systems and Creative Labs for the wavetable synthesisers of Sound Blaster cards, and version 2 of the format became a common way to share instrument sounds. A SoundFont holds the samples, the instruments that map them across the keyboard, and the presets a player selects by bank and program number.
Software synthesisers use SoundFonts to play MIDI files, so the same bank can make a MIDI song sound alike on any computer.
Structure
An SF2 file is a RIFF file with the form type sfbk, so its numbers are
little-endian. It holds three LIST chunks. INFO gives the
format version, the target sound engine, the bank name and other text.
sdta holds the sample data as 16-bit samples in a smpl chunk,
with an optional sm24 chunk carrying extra low bytes for 24-bit samples.
pdta holds the instrument and preset data as nine tables of fixed-size
records.
The nine tables build a hierarchy. Presets (phdr) are made of zones
(pbag) with modulators (pmod) and generators
(pgen) that point to instruments. Instruments (inst) are made
of zones (ibag, imod, igen) that point to
samples. Sample headers (shdr) give each sample’s start, end, loop points,
rate and original pitch inside smpl.
0RIFF chunk ID, length, form type sfbk12 bytesLIST INFO version, sound engine, bank name, notesvariesLIST sdta smpl 16-bit samples, optional sm24variesLIST pdta phdr, pbag, pmod, pgen, inst, ibag, imod, igen, shdrvaries
Links
Software
- FluidSynth – free software synthesiser that plays MIDI with SoundFonts (Windows, macOS, Linux)
- Polyphone – free SoundFont editor (Windows, macOS, Linux)
- MuseScore – free notation program that uses SoundFonts for playback (Windows, macOS, Linux)
- FL Studio – Image-Line’s music production software, which loads SoundFonts in its Fruity SoundFont Player (Windows, macOS)
Developers
- libfluidsynth – synthesiser library that loads SoundFonts (C)
- TinySoundFont – single-header SoundFont synthesiser (C)