What's new

Sfzformat - documenting SFZ and how to use it

DSmolken

Senior Member
For a couple of months now, I've been documenting the sfzformat.com wiki with information on all the listed opcodes, and also added a couple of guides on mapping basic drums and sustained instruments. I've collected the information published in other places, documented SFZ 2 and ARIA extensions opcodes, and tried to make the explanations and examples more meaningful to musicians instead of being dry and programmerly and forcing the reader to figure out what something might actually be useful for.

I'm gonna keep this going, planning to document the modeling I've done for things like vibrato, snare drum stirs, guitar feedback, Peter Jones' hierarchical hi-hat muting scheme etc. which should contain a lot of information that's applicable cross-format too.

So, if anybody would like to give making SFZ instruments a try, there's now one site that should document all the opcodes and hopefully serve as a one-stop information store. If any info's still missing, do let me know.
 
The resource looks nice, thanks! :cool:

Do you know if there any public information available for creating a GUI for Aria instruments? Based on this https://www.ewiusb.com/ariaEnhancedSkin (enhanced Aria skin for the EWI) I've got a pretty good idea of how to create a GUI using XML. But I'm not sure what the XML file should be called (my_instrument.xml, perhaps), or how the param and slot parameters might interact with the SFZ parameters.

For my purposes, that's overkill anyway. I'm mostly interested in being able to show which MIDI keys work as keyswitches.

Any clue how to do that?
 
The GUIs, that's not public, and the main XML for each instrument bank needs to be digitally signed by Plogue, but they'll do that for free for non-commercial instruments which are half-decent. You can contact them if you want the documentation and example files.

For keyswitches, though, sw_low, sw_high and sw_label are the opcodes.
 
The GUIs, that's not public, and the main XML for each instrument bank needs to be digitally signed by Plogue, but they'll do that for free for non-commercial instruments which are half-decent. You can contact them if you want the documentation and example files.

For keyswitches, though, sw_low, sw_high and sw_label are the opcodes.
Thanks! :thumbsup:
 
I have documented hierarchical hi-hat muting and limiting cymbal polyphony. It's pretty long and dense reading, but I go through simpler cases at first, so you don't have to implement everything at once. The principles will mostly apply to any sampler, not just ones that use SFZ.

Here's the article:


Edit: fixed the splash muting rules, so now it mutes everything else, too.
 
Last edited:
https://sfzformat.com/tutorials/legato and https://sfzformat.com/tutorials/vibrato added to the SFZformat page. Not much there yet, just the Meatbass settings for envelope legato and LFO vibrato. I'll expand those later, wiht all the stuff like different sax vibrato types, and also true sampled legato. But I figured that these, as simple as they are, are enough to be useful to people looking to do simple, basic stuff.

When it's done, the vibrato page is probably gonna be bigger and more complicated than the cymbal muting, but the simple stuff will still be simple, and I'll also add a proper explanation of what does what.
 
Last edited:
Major update to the https://sfzformat.com site - moved to Github pages which are more mobile-friendly, cleaned up a whole lot of small errors in the process, and also made the LinuxSampler opcode support information a whole lot more accurate. The page repository is at https://github.com/sfzformat/sfzformat.github.io and we also have a Discord server for page update and general SFZ discussions.

Also put my open-source instruments on Github at https://github.com/sfzinstruments and will upload other developers' open-source stuff there later.
 
Added some tutorials... the brush stirs one I mentioned in another post, which isn't really all that SFZ-specific just uses SFZ as an example, and these two explaining the modulations possible under the SFZ1 and SFZ2 specs:



The second includes a simple way to make sax vibrato that goes below the main note's pitch, and also using LFOs to modulate other LFOs and achieve humanization.

We could use more contributions, if somebody wants to help out. We could use someone who knows Jekyll plugins so we can reorganize the opcode info into a proper data structure and generate pages and tables from it. We could also use code examples of things we haven't posted yet. Examples of piano-specific stuff like release noises, pedal noises and half-pedaling would be great, as would true sampled legato, or a subtractive synth. I know all those things are possible but haven't really done them so I don't really have anything handy.
 
And an in-depth desription of implementing vibrato, including different ways to humanize it, asymmetrical vibrato for saxes and guitars, and filter wobble.


As usual, code examples are in SFZ, but the principles will apply anywhere. And, as this is an open-source project and hosted on Github as such, feel free to adapt this and port the code examples to Kontakt, HISE or whatever.
 
Legato in SFZ explained, with simulated legato code examples by me, and true sampled legato examples by a name familiar from this forum.


We got a few more active contributors recently who are working on new SFZ players of their own, so this might be slowly turning into something much bigger.
 
Got a new tutorial explaining how to do typical subtractive synth filters, envelopes, vibrato, unison, and some fancy variations thereof, basically using my recent Caveman Cosmonaut freebie as the example and explaining how I've done all the modulations there. I might later add things that aren't in that particular instrument, such as series highpass and lowpass filters, separate envelope for noise oscillator etc.

https://sfzformat.com/tutorials/subtractive_synths

Also various updates here and there. Devs working on new SFZ players and editors have been doing a lot of testing of how ARIA and Dimension Pro works, so now opcodes which were just sort of vaguely documented are being documented with a lot more precision. We've also "discovered" more extended ARIA CCs 150 and above, which we need to write down. So the documentation is very much constantly growing. For example, I learned that it's possible to have multiple global headers in an instrument, which sure does make a lot of things easier...
 
Got a new tutorial explaining the transposition trick, plus other ways of doing unison, including doubletracking guitars without transposition and humanizing each voice in your fake section separately.


Plus lots of minor updates to incorrect opcodes, missing aliases, effects controls in the old Cakewalk synths etc. We got people working on new sfz players who really need the spec to be specified specifically, so they've done a lot of very useful testing.

Edit: added round robin neighbor borrowing at the end. Not really unison, but as someone already proceeded to use this doc as a guide to fake some RRs, I figured I might as well describe it explicitly.
 
Last edited:
Thanks so much for all these, I'm familiar with synth programing, but am trying to dig into sampled instruments and this is a great help, thanks!
 
Thanks. Still making changes as people test stuff and SFZ player developers especially want things specified as much as possible. Just updated polyphony and note_polyphony today to explain how note_selfmask only applies to the latter.
 
Hi @DSmolken. You really seem like the guy to ask this question...

I'm working on some piano libraries and have successfully implemented half-pedaling in Kontakt. Do you have any clue about how to do this in SFZ format? I'm not asking for a comprehensive how-to, just some general strategies so I can have a try. If I'm successful I'll definitely share.
 
I do know Garritan CFX supposedly has half-pedaling and uses SFZ, so it seems it should be possible. But my understanding of piano-specific stuff is pretty vague. All I know is what it says under https://sfzformat.com/opcodes/sustain_lo.html, and also that you could map things (amplitude release time?) to the pedal CC if you set ampeg_dynamic=1, so the amp envelope durations will be recalculated live as the CC changes.
 
Top Bottom