Custom Soundfonts

Load SF2 and SF3 files

Glowing blue and purple audio waveforms behind bold SF2 and SF3 SoundFont lettering

SoundFonts explained: how MIDI becomes music

MIDI can tell a piano to play middle C, how firmly to strike the key, and when to release it. But a MIDI file does not normally contain a recording of middle C - or any other note. Something has to turn those instructions into sound.

That is where SoundFonts come in. A SoundFont combines recordings of instruments with the information a synthesiser needs to turn those recordings into playable, expressive sounds. Some contain one carefully sampled piano; others provide a complete orchestra, drum kits, and electronic instruments.

The difference matters: a SoundFont is more than a folder of audio samples. It describes which samples to use and how to shape and control them during a performance.

On this page

What is a SoundFont?↑ Contents

A SoundFont is a structured sound bank for a sample-based synthesiser. It commonly contains:

When MIDI requests a note, the synthesiser uses the selected preset to find suitable samples, adjusts their pitch and volume, applies envelopes and other synthesis controls, then generates the audio.

Diagram showing MIDI performance instructions and SoundFont samples feeding a synthesiser to produce audio

Changing the SoundFont can radically change the result without changing a single MIDI note.

A short history↑ Contents

Early computer music often relied on simple oscillator-based sounds or fixed instrument banks built into hardware. Sample-based synthesis offered a different approach: record real instruments and play those recordings back at the pitches and intensities requested by the musician.

E-mu Systems and Creative Technology developed SoundFont technology for sound cards in the 1990s. The Sound Blaster AWE32 era introduced early SoundFont banks, including the older .sbk format. SoundFont 2 (SF2) followed in the mid-1990s, providing a more capable, documented way to package samples, instruments and presets.

As software synthesis became more common, SoundFonts stopped depending on particular sound cards. Applications could render them directly using a software synthesiser. SF3 later emerged as a practical variation using compressed sample audio, particularly useful where download size matters.

That portability helps explain why SoundFonts remain relevant to MIDI players, notation applications, games and browser-based music tools.

Why not just use audio samples?↑ Contents

Imagine making a sampled piano by recording only middle C. You could change the playback rate to make that recording play every other note, but the result would not sound like a real piano across its full range. Low strings and high strings have different timbres, attacks and resonances.

Now imagine using the same middle-C recording for both a delicate touch and a forceful strike. Increasing the volume cannot reproduce the brighter, harder attack of a genuinely loud piano note.

A folder of WAV files does not tell a synthesiser which recordings belong to which keys, which samples represent soft versus loud playing, or what should happen when a note is released.

A SoundFont supplies those relationships. It transforms recordings into an instrument that responds to MIDI performance data.

Inside a SoundFont↑ Contents

Key zones: matching recordings to pitches

An instrument can divide the keyboard into key ranges, sometimes called zones. Each range can use a different sample or set of samples. Instead of pitch-shifting a single recording over several octaves, a synthesiser can select material recorded near the requested note.

A compact piano might use a handful of recordings spread across the keyboard. A richer one might sample many more notes individually. Closely spaced samples can better retain the natural character of each register.

Velocity layers: more than louder and quieter

In standard MIDI, note-on velocity is usually between 1 and 127. Velocity often represents how firmly a key or pad was struck. A sample instrument can select different recordings at different velocities.

The following is an illustrative five-layer mapping, not a rule that every SoundFont follows:

MIDI velocity Example sampled playing strength
1–35 Very soft (pp)
36–65 Soft (p)
66–90 Medium (mf)
91–110 Loud (f)
111–127 Very loud (ff)

A piano's tone changes as its strings are struck harder, not merely its loudness. Separate recordings of soft and hard strikes can capture those differences. A richer SoundFont may include multiple velocity layers for many notes, though the transitions between layers also need careful programming.

Envelopes: shaping a note over time

A sample does not have to play at a constant volume. Envelopes determine how its sound develops. A common simplification is ADSR:

SoundFont envelopes can also define delay and hold stages. These distinctions help a piano, organ, flute and string instrument behave differently, even when driven by similar MIDI note events.

Loops: sustaining notes without enormous recordings

Some instruments can sustain a note for much longer than an individual sample needs to last. A SoundFont can mark a section of the audio to loop while the note continues. Good loop points prevent clicks and obvious repetition, allowing a relatively short recording to produce a long, stable tone.

Filters and modulation: expressive control

SoundFont instruments can use filters, low-frequency oscillators (LFOs), tuning controls and modulation rules. These may influence timbre, pitch and amplitude in response to MIDI controllers or internal modulation signals.

Exactly how much expression you hear depends on both the SoundFont's programming and the synthesiser's support for those features.

Presets: assembling playable instruments

The samples and rules ultimately appear as presets - the sounds selected by a MIDI track. A preset can combine underlying instruments and samples, and a single SoundFont can contain many presets.

That is why one General MIDI SoundFont can provide sounds for an entire arrangement instead of only one instrument.

What makes a SoundFont sound realistic?↑ Contents

The most important factors include:

Two banks made from recordings of the same instrument can sound very different because the sound design is different. The SoundFont's programming is as important as its raw samples.

SF2, SF3 and other formats↑ Contents

SF2 is the established SoundFont 2 format. It generally stores instrument samples as uncompressed PCM audio, alongside the rules needed to play them.

SF3 follows a similar instrument structure but stores sample data in compressed form, commonly using Ogg Vorbis. That can greatly reduce file size, making an SF3 attractive for web delivery.

Question SF2 SF3
How are samples generally stored? Uncompressed PCM Compressed, usually Ogg Vorbis
Typical file size Larger Smaller
Download and storage requirements Higher Lower
Is the sample audio lossless? Generally yes, at the stored PCM resolution Usually no; compression may be lossy
Playback memory Depends on the synthesiser Can still require decoded sample memory
Compatibility Broad Requires SF3-aware software

SF3 does not automatically load faster or use less playback memory. A smaller file usually downloads faster, but compressed samples must be decoded. The actual loading time and memory footprint depend on the synthesiser's implementation.

You may also encounter DLS (Downloadable Sounds), another structured sample-bank format, or packed formats such as .sf2pack and .sfogg. These are not simply alternative extensions for universally interchangeable files; compatibility depends on the reader and on how the data was encoded.

Does a larger SoundFont sound better?↑ Contents

Often it can, but size alone is not a reliable measure of quality.

A larger piano SoundFont might contain samples of nearly every key, several velocity layers, longer recordings, more detailed releases and carefully tuned stereo recordings. That extra material can help a synthesiser recreate subtleties that a small bank cannot provide.

But a poorly recorded or mapped 2 GB instrument may sound worse than a thoughtfully designed 100 MB instrument. The synthesiser also matters: it has to support and interpret the SoundFont's features accurately.

There are further limitations. MIDI note and controller data may not describe every nuance of a live performance, and the SF2 synthesis model cannot express every technique available in advanced modern sampling instruments.

A more accurate principle is:

The richness of a SoundFont can raise the quality ceiling enormously, but the final result depends on the samples, instrument programming, MIDI performance and synthesiser together.

This is precisely what makes experimenting with different sound banks worthwhile: the same MIDI can produce dramatically different results.

General MIDI and instrument compatibility↑ Contents

General MIDI (GM) specifies a standard arrangement of 128 melodic instrument programs plus percussion conventions. A GM-compatible MIDI track requesting Acoustic Grand Piano or Violin can select the corresponding preset in a suitably mapped GM SoundFont.

Not every SoundFont is a complete General MIDI bank. Some contain only one sampled piano or another specialised instrument. Such a bank may be ideal for a solo performance but unable to supply every instrument requested by a multitrack orchestral file.

For general-purpose MIDI playback, a GM-compatible bank is usually the simplest choice. For a particular instrument, a specialised bank may offer a more detailed sound.

Using custom SoundFonts in Midi2Vidi↑ Contents

With Audio enabled, Midi2Vidi uses a SoundFont synthesiser for the sounds you hear during playback and for the audio included in an exported video.

The default sound bank

Midi2Vidi ships with GeneralUser GS, a compact General MIDI SoundFont. It is downloaded when audio is first enabled and then cached by the browser. You can play MIDI without hunting for a suitable sound bank first.

Loading your own bank

The bundled SoundFont is the default, not the only option. In Settings, use the Soundfont control to choose a file from your computer.

Midi2Vidi supports SF2 and SF3 files, as well as compatible DLS banks and .sf2pack and .sfogg variants. You can change SoundFonts during playback to compare how different instrument collections interpret the same MIDI.

Screenshot showing location of the Soundfont selector on the main index screen

Your selected bank drives both the live preview and the audio in an export. Export settings are held consistent for the duration of an export, so selecting a different bank partway through does not change the exported soundtrack halfway through.

Why it matters↑ Contents

Perhaps the most powerful aspect of SoundFonts is that a musical performance and the instruments playing it remain separate.

You can keep the notes, timing and expression of a MIDI composition while exchanging the sonic character of its instruments. A piano piece can take on the character of another piano, a vintage keyboard or something entirely synthetic - without editing the composition itself.

MIDI tells the instruments what to play. A SoundFont gives them their voices.

Back to Midi2Vidi