Saturday, April 19, 2008

EQ Magazine: Managing Multisamples With SFZ

Key Issues: Managing Multisamples With SFZ

| April, 2008

The following may seem techy, and, frankly, that techy aspect inhibited me from checking out the SFZ file format. But once I finally wrapped my head around the concept, I was glad I did.
The SFZ file format—a license-free spec, even for commercial purposes—was created by synth designer Rene Ceballos, and it defines how multisamples should be handled within an SFZ-compatible instrument. The format is compatible with several Cakewalk instruments, including Dimension, Session Drummer 2, Rapture, and DropZone. But it’s also compatible with the free, VST-compatible SFZ Player that works in any VSTi-compatible host (download the Player at www.project5.com/products/instruments/sfzplayer/default.asp), so the format’s usefulness extends far beyond Cakewalk instruments.

For example, suppose you work with Samplitude, you’re collaborating with a friend who uses Cubase, and you have a bunch of “found sound” samples you want to use as rhythmic elements. If you create an SFZ file of these sounds, and you both download the free SFZ Player, you can exchange keyboard parts that trigger these samples in the SFZ Player. What’s more, the SFZ format accommodates Ogg Vorbis (compressed) files, so you can use really big files, but compress them for faster file transfers over the net. When it’s time to mix down, simply change the SFZ file to reference the original WAV files instead of the compressed ones.


You can think of the SFZ format as being similar to SoundFonts, but an SFZ file has two components instead of one: a collection of samples (typically stored in a folder), and a text-based definition file that describes what to do with that collection of samples. You can create an SFZ definition file in any simple word processor such as Notepad.

For example, suppose you sampled a Minimoog at the F key for every octave over a five-octave range (F1, F2, F3, F4, and F5). You can then create an SFZ file that references these waveforms, and describes the root key of each waveform, as well as the keyboard range each waveform should cover.

But those are just the basics. The SFZ format can also specify detuning, transposition, filtering, envelopes, sample start time, looping, and many other characteristics. Waveforms can overlap, and you can define as many waveforms as you want in an SFZ file. It’s therefore possible to specify a complete instrument using SFZ, and if you load that SFZ file into an SFZ-compatible instrument, it will play back exactly as you intended.


Creating an SFZ definition file requires some programming chops, but, fortunately, the commands are pretty simple and musician friendly. To elaborate further on the Minimoog example mentioned above, I recently created a multi-sampled set of Minimoog waveforms suitable for loading into SFZ-compatible synths. I sampled the notes at consistent notes for the various waveforms, and gave them consistent names (SawF1.WAV, SawF2.WAV, TriangleF1.WAV, and so on). I stored all the samples in a folder titled Minimoog Waveforms, then created an SFZ definition file for the sawtooth wave samples that defined the note range covered by each sample. Once I created that file, creating another SFZ file for the triangle wave samples simply involved doing a find on “Saw,” replacing each instance with “Triangle,” and then saving the file under a different name (MinimoogTriangle.sfz). I did the same thing for the Pulse, Square, and other waveforms.

Once these SFZ files were done, I could load one into Rapture. The multisampled collection of waveforms then became a single “element” within Rapture (think of an element as roughly equivalent to a voice). I’ve also created multisamples with guitar notes, drum sounds, effects, and various other sounds.

The main “unit” of an SFZ definition file is the region. Here’s the syntax for creating a simple region:

pitch_keycenter=F1 lowkey=C0 hikey=C2 Sample=Minimoog Waveforms\SawF1.wav

This says that the sample being used has a root key of F1, and should cover the key range of C0 up to and including C2. To reference where the sample comes from, an added “Sample” designation points to the “Minimoog Waveforms” folder and after a backslash, specifies the file name within the folder.

Creating regions for the other samples simply involves substituting some different names, root notes, and key-range values. You can also add comments, as long as the line starts with two slashes. Figure 1 shows a file that defines a complete Minimoog sawtooth wave multisample with five samples.

For more information on the SFZ format, including a complete list of commands (opcodes), surf to www.cakewalk.com/DevXchange/sfz.asp, or check out the book Cakewalk Synthesizers by Simon Cann [Thomson Course Technology]. Granted, not everyone will get into programming SFZ files, but I’ve found it to be a tremendously useful format for creating sophisticated multisample collections that can play back in a variety of instruments.

No comments:

My Music - The Phos

#Google Analytics