SFZ instruments in SampleStack: what SFZ is and how to build one

Guide

SampleStack can turn a folder of samples into a playable instrument and export it as SFZ. If you’ve recorded or collected a set of pitched samples and want them mapped across a keyboard, with velocity layers and an amp envelope, SFZ is one of the most portable ways to save the result.

This guide covers what SFZ is, why it’s a sensible default, and how to build one in SampleStack from start to finish. There’s a plain-language FAQ at the end for the common questions.

What is SFZ?

SFZ is an open file format for sampled instruments. An SFZ instrument is two things: a text file with the .sfz extension that describes how samples map to the keyboard, and the audio files (usually WAV) that it points to. Open the .sfz in any text editor and you can read it. It’s a list of regions, each one saying which samples play, over which notes, at which velocities, with settings for looping and the amp envelope.

A short SFZ region looks like this:

<region>
sample=samples/piano_C3.wav
lokey=60 hikey=64 pitch_keycenter=60
lovel=0 hivel=63

That says: use piano_C3.wav for notes 60 to 64, tuned so note 60 is its natural pitch, and only when the note is played softly (velocity 0 to 63). A full instrument is many regions like this, covering the whole keyboard and, where you have them, several velocity layers per note.

Because the format is open and text-based, it isn’t tied to any one company or plugin. That’s the main reason to reach for it.

Why SFZ is a good default

A few things make SFZ a safe first choice when you export an instrument:

  • It’s open. No license, no lock-in. The specification is public and anyone can read or write it.
  • It’s widely supported. The free sforzando plugin is the common reference player, and many other samplers load SFZ too. An SFZ made today will still open years from now.
  • It’s readable. Because the mapping is plain text, you can open it, understand it, and tweak it by hand if you ever need to.
  • It’s capable. SFZ handles key zones, multiple velocity layers, round-robin, loop points, and envelopes, so it can represent a detailed instrument rather than a quick one-note-per-key map.

If you aren’t sure where an instrument will end up, SFZ travels almost anywhere. Other formats have their place (a single self-contained SoundFont, a Decent Sampler preset with its own interface, a native Ableton instrument), but SFZ is the one that keeps the most doors open.

How to create an SFZ in SampleStack

The workflow goes from a folder of samples to a finished, exported SFZ without leaving the app. Multisample support shipped in SampleStack 1.2, so it’s in the current release.

1. Start a new instrument. Create a new instrument in the sidebar and drop in your samples. These are usually pitched one-shots: individual notes of a piano, a synth, a plucked string, or anything with a clear fundamental pitch.

2. Let SampleStack map them. SampleStack detects the pitch of each sample and assigns it a zone on the keyboard automatically. The more samples you add across the range, the narrower each zone becomes and the more natural the instrument sounds, since each key is closer to a sample recorded at that pitch.

3. Stack velocity layers. If you have several samples for the same note recorded at different strengths, SampleStack assigns them to velocity ranges so a soft hit and a hard hit use different recordings. You can adjust the ranges to taste.

4. Tune the zones. Check the root notes and zone boundaries, and nudge anything the auto-detection didn’t get right. A clear visualization shows which sample covers which part of the keyboard.

5. Shape the amp envelope. Set the instrument’s ADSR envelope (attack, decay, sustain, release) and preview it as you play.

6. Preview it. Play the instrument over MIDI, your computer keyboard, or the mouse before you commit. There’s a virtual pitch bend wheel, and preview is polyphonic, so you can hear chords and releases the way they’ll sound in a player.

7. Export as SFZ. When it sounds right, export and choose SFZ. SampleStack writes the .sfz text file with a region for each zone (key range, root note, velocity range, and envelope) and places it alongside the samples it references. A built-in matrix shows what each export format carries, so before you export you can see exactly what SFZ keeps from your instrument.

The result is a folder containing the .sfz file and its samples, ready to load in sforzando or any other SFZ player.

Helpful tips

A few things that make the process smoother:

  • Give the pitch detector clean material. Pitched one-shots with a clear, steady fundamental map most accurately. Percussive or noisy samples without a definite pitch are better suited to a drum-style layout than a chromatic instrument.
  • More samples, better mapping. An instrument sampled every few semitones sounds more natural than one with a single sample stretched across two octaves. If you can record more points across the range, do.
  • Mind your loop points for sustained sounds. If your instrument needs to hold indefinitely (pads, strings, organs), clean loop points in the sustaining part of each sample make for smooth held notes.
  • Keep the .sfz with its samples. SFZ references its audio by relative path, so move the whole folder together. If you separate the .sfz from its samples, the instrument won’t find them.
  • Test in a free player. sforzando is free and a good reference for checking that your exported SFZ loads and plays as expected.

FAQ

What is an SFZ file?

An SFZ file is a text file that defines a sampled instrument. It lists which audio samples play across which notes and velocities, along with loop and envelope settings. It works together with the audio files (usually WAV) that it references. The pair, the .sfz plus its samples, make up one instrument.

What opens or plays SFZ files?

Any SFZ-compatible sampler. The free sforzando plugin is the most common one, and it runs in most DAWs as a VST, AU, or AAX plugin. Several other samplers read SFZ as well. You load the .sfz file into the player and it pulls in the referenced samples.

Is SFZ free and open?

Yes. SFZ is an open format with a public specification, and it isn’t owned or controlled by a single company. The most popular player, sforzando, is also free.

What’s the difference between SFZ and SoundFont (SF2)?

Both describe sampled instruments, but they package things differently. SFZ is a text file plus separate audio files, which keeps it readable and easy to edit. SoundFont (.sf2) bundles everything, samples included, into a single binary file, which is more portable but not human-readable and more limited in its layering and modulation. SFZ is the more flexible and editable of the two; SF2 is the more self-contained.

Can I edit an SFZ by hand?

Yes. Because it’s plain text, you can open an .sfz in any text editor and change note ranges, tuning, velocity splits, or envelope settings directly. That’s one of the format’s strengths.

Does SampleStack keep velocity layers when it exports SFZ?

SFZ supports velocity layers, and SampleStack maps samples into velocity ranges as part of building the instrument. Before you export, the app’s built-in format matrix shows exactly what SFZ carries from your instrument, so you can confirm what’s included.

Where do the samples go when I export?

SampleStack writes the .sfz file alongside the samples it references, so you get a self-contained folder. Move that folder as a unit and the instrument keeps working, since the SFZ points at its samples by relative path.

Multisample support, including SFZ export, is available now in SampleStack on the Mac App Store.