Any good tutorial to make Sfz?
- KVRAF
- 4314 posts since 31 Oct, 2004
So far, the Sfz I've made have compatibility issues with some Sfz players (not all). I've settle for compatibility with Zampler RX, as I really like it. But otherwise they won't play with in other Sfz compatible plugins (Sforzando, TW16x, Grace Sampler won't even load them, etc.).
Is there any good tutorials out there on how to make Sfz that has a compatible mapping and amp ADSR envelopes with most players? I guess that would be the Sfz v1 specs.
I'm looking for something complete, as most of the information I've found so far is scattered on various sites and on different posts.
Is there any good tutorials out there on how to make Sfz that has a compatible mapping and amp ADSR envelopes with most players? I guess that would be the Sfz v1 specs.
I'm looking for something complete, as most of the information I've found so far is scattered on various sites and on different posts.
- KVRAF
- Topic Starter
- 4314 posts since 31 Oct, 2004
Ok, I've managed to create an Sfz instrument using the template available on the sfzformat.com website. Here's how it looks:
Now, it sounds good in Sforzando, but it doesn't load anymore in Zampler RX. The original plain Sfz I created using Translator and Kontakt 4 loaded fine in Zampler RX, but had strange unwanted behavior in Sforzando.
Any idea how I could clean my code to make it work in both software?
Here's a list of what works and what doesn't:
Sforzando=works
Alchemy=works
TX16Wx=works
Zampler RX=doesn't find the wav file
DirectWave=stuck on "translating Sfz instrument, cleaning up"
Kontakt 5=doesn't find the wav file
Grace Sampler="Error: EConvertError Can not convert SFZ opcode. [loop_mode=continuous]
rgc:audio Sfz=no sound (!)
Moving the wav file in the same folder as the sfz fix the problem for Kontakt, Zampler RX & rgc:audio Sfz. It does even though the file path is clearly indicated in the Sfz code.
Code: Select all
//-------------------------------------------------------------------------------------------------
// Cinematika - A New Dawn
//-------------------------------------------------------------------------------------------------
<control>
default_path=Samples (24 bit)\ //relative path of your samples
<global>
//parameters that affect the whole instrument go here.
amplitude=100 //Master volume and pan
pan=0
pan_oncc10=200
loop_start=164392
loop_end=656591
ampeg_attack=0.900
ampeg_decay=0
ampeg_hold=0
ampeg_sustain=100
ampeg_release=15
// **********************************************************************
// Your mapping starts here
// **********************************************************************
<group> //1
//Parameters that affect multiple regions go here
trigger=attack // or release or first or legato
loop_mode=continuous // or loop_continuous or one_shot or loop_sustain
<region> sample=01 - A New Dawn_C5.wav lokey=0 hikey=127 pitch_keycenter=60 pan_oncc107=100Any idea how I could clean my code to make it work in both software?
Here's a list of what works and what doesn't:
Sforzando=works
Alchemy=works
TX16Wx=works
Zampler RX=doesn't find the wav file
DirectWave=stuck on "translating Sfz instrument, cleaning up"
Kontakt 5=doesn't find the wav file
Grace Sampler="Error: EConvertError Can not convert SFZ opcode. [loop_mode=continuous]
rgc:audio Sfz=no sound (!)
Moving the wav file in the same folder as the sfz fix the problem for Kontakt, Zampler RX & rgc:audio Sfz. It does even though the file path is clearly indicated in the Sfz code.
-
- KVRAF
- 2437 posts since 5 Jan, 2006
According to Zampler's website Zampler only supports these opcodes:SampleScience wrote:Ok, I've managed to create an Sfz instrument using the template available on the sfzformat.com website. Here's how it looks:
<region>, sample=, pitch_keycenter=, lokey=, hikey=, lovel=, hivel=, loop_start=, loop_end= and volume=
Since it can't read the "default_path" opcode, you should place the path of your sample under "sample="
So instead of:
<region> sample=01 - A New Dawn_C5.wav
it should be:
<region> sample=Samples (24 bit)\01 - A New Dawn_C5.wav
Another suggestion is to the make the sfz file as simple as possible, clean any unnecessary stuff from the text.
Here's an simplified version that should work in any player:
Code: Select all
<group> ampeg_attack=0.900 ampeg_release=15
<region> sample=Samples (24 bit)\01 - A New Dawn_C5.wav lokey=0 hikey=127 pitch_keycenter=60 loop_mode=loop_continuous loop_start=164392 loop_end=656591
- KVRAF
- Topic Starter
- 4314 posts since 31 Oct, 2004
I've cleaned the code from any Sforzando specific codes and now I have this:
It works in all the Sfz player except Kontakt that searches for the wav file (no big deal as I offer Kontakt instruments too) and Grace Sampler who seems to have a problem with the continuous loop mode. What's cool is that DirectWave will even read the ADSR!
Feel free to use my code as a template for "universal" compatible Sfz files, it will load without any problems in Alchemy, DirectWave, Zampler RX, Sforzando, TX16Wx and the basic rgc:audio sfz player.

Code: Select all
//-------------------------------------------------------------------------------------------------
// Cinematika - A New Dawn
//-------------------------------------------------------------------------------------------------
<control>
<global>
//parameters that affect the whole instrument go here.
amplitude=100 //Master volume and pan
pan=0
loop_start=164392
loop_end=656591
ampeg_attack=0.900
ampeg_decay=0
ampeg_hold=0
ampeg_sustain=100
ampeg_release=15
// **********************************************************************
// Your mapping starts here
// **********************************************************************
<group> //1
//Parameters that affect multiple regions go here
trigger=attack // or release or first or legato
loop_mode=continuous // or loop_continuous or one_shot or loop_sustain
<region> sample=Samples (24 bit)\01 - A New Dawn_C5.wav lokey=0 hikey=127 pitch_keycenter=60Feel free to use my code as a template for "universal" compatible Sfz files, it will load without any problems in Alchemy, DirectWave, Zampler RX, Sforzando, TX16Wx and the basic rgc:audio sfz player.
-
- KVRist
- 498 posts since 22 Aug, 2013
A little help, similar to PTV's reply
Opcodes supported by Zampler that I know :
<region>
lokey=
pitch_keycenter=
hikey=
lovel=
hivel=
volume=
sample=
loopstart=
loopmode= - loop_continuous (only)
loopend= > inclusive
this basic ones :
pan= - not working
transpose= - not working
tune= - not working
The version I use to test is zampler with the red skin
Notice that not loop_start / loop_end that works in zampler
It's really a great sfz player
And hope that helps...
Opcodes supported by Zampler that I know :
<region>
lokey=
pitch_keycenter=
hikey=
lovel=
hivel=
volume=
sample=
loopstart=
loopmode= - loop_continuous (only)
loopend= > inclusive
this basic ones :
pan= - not working
transpose= - not working
tune= - not working
The version I use to test is zampler with the red skin
Notice that not loop_start / loop_end that works in zampler
It's really a great sfz player
And hope that helps...
- KVRAF
- Topic Starter
- 4314 posts since 31 Oct, 2004
It actually works better, TX16Wx now reads the ADSR and Grace Sampler can at least load the Sfz!Another suggestion is to the make the sfz file as simple as possible, clean any unnecessary stuff from the text.
Here's an simplified version that should work in any player:
Code: Select all
<group> ampeg_attack=0.900 ampeg_release=15 <region> sample=Samples (24 bit)\01 - A New Dawn_C5.wav lokey=0 hikey=127 pitch_keycenter=60 loop_mode=loop_continuous loop_start=164392 loop_end=656591
- KVRAF
- Topic Starter
- 4314 posts since 31 Oct, 2004
Here's something weird regarding Zampler RX. I have an Sfz file from the Noisefactory EDM Zampler Vol.1 called Hypersaw. It's one looped sample that is spread across the keyboard. It loops even though there's no loop opcodes in the code:
On the Zampler website they state that Zampler can read the loop_start and loop_end opcodes. Weird...
Code: Select all
//-----------------------------------------------------------------------------------
// sfz definition file
// Noisefactory EDM Zampler Vol. 1
// (c) 2013 Noisefactory - www.noisefactory.de
//-----------------------------------------------------------------------------------
<group>
<region> trigger=attack pitch_keycenter=60 lokey=1 hikey=127 lovel=1 hivel=127
sample=NEZ1 Hypesaw C2.wav- KVRAF
- Topic Starter
- 4314 posts since 31 Oct, 2004
What do you mean? Do the loop_start / loop_end works or not? Sorry if I'm misunderstanding you.kinwie wrote: Notice that not loop_start / loop_end that works in zampler
-
- KVRAF
- 2437 posts since 5 Jan, 2006
The loop points are probably defined in the wav file itself.SampleScience wrote:Here's something weird regarding Zampler RX. I have an Sfz file from the Noisefactory EDM Zampler Vol.1 called Hypersaw. It's one looped sample that is spread across the keyboard. It loops even though there's no loop opcodes in the code:
On the Zampler website they state that Zampler can read the loop_start and loop_end opcodes. Weird...Code: Select all
//----------------------------------------------------------------------------------- // sfz definition file // Noisefactory EDM Zampler Vol. 1 // (c) 2013 Noisefactory - www.noisefactory.de //----------------------------------------------------------------------------------- <group> <region> trigger=attack pitch_keycenter=60 lokey=1 hikey=127 lovel=1 hivel=127 sample=NEZ1 Hypesaw C2.wav
-
- KVRist
- 498 posts since 22 Aug, 2013
If the loop_start/end already embeded in the wav files, most sfz player will read it without the need to define their opcodes. That's what the sfz v1 specs said, IIRC.SampleScience wrote:Here's something weird regarding Zampler RX. I have an Sfz file from the Noisefactory EDM Zampler Vol.1 called Hypersaw. It's one looped sample that is spread across the keyboard. It loops even though there's no loop opcodes in the code:
On the Zampler website they state that Zampler can read the loop_start and loop_end opcodes. Weird...Code: Select all
//----------------------------------------------------------------------------------- // sfz definition file // Noisefactory EDM Zampler Vol. 1 // (c) 2013 Noisefactory - www.noisefactory.de //----------------------------------------------------------------------------------- <group> <region> trigger=attack pitch_keycenter=60 lokey=1 hikey=127 lovel=1 hivel=127 sample=NEZ1 Hypesaw C2.wav
Because i found it weird too, that's why I point that out to you.
loopstart, loopend and loopmode (without _) was Rene's very first loop opcodes i guess. And some player still use them. While Sforzando will read both, with or without _
- KVRAF
- Topic Starter
- 4314 posts since 31 Oct, 2004
Very good to know! So I guess that as a general manner it's safer to put the loop opcodes just to make sure most player will read them.
I've spotted my errors (thanks to PTV) about the loop opcode (I wrote continuous while I need to write loop_continuous).
What is the need for trigger=attack?
I've spotted my errors (thanks to PTV) about the loop opcode (I wrote continuous while I need to write loop_continuous).
What is the need for trigger=attack?
-
- KVRist
- 498 posts since 22 Aug, 2013
What I mean is loop_start, loop_end & loop_mode opcodes doesn't works in Zampler.SampleScience wrote:What do you mean? Do the loop_start / loop_end works or not? Sorry if I'm misunderstanding you.kinwie wrote: Notice that not loop_start / loop_end that works in zampler
You can give it a test if you curious :
Create a simple sfz file with a sample without any loop data inside the wave file.
Then define the loop within the sfz file with loop_start/end/mode > (with _)
It won't play looped...
Instead, use loopstart etc, (without _) then they will play correctly looped
Hope you get what I mean
-
- KVRist
- 498 posts since 22 Aug, 2013
If you want to put loop opcodes, please remember that loop end numbers used by sfz is inclusiveSampleScience wrote:Very good to know! So I guess that as a general manner it's safer to put the loop opcodes just to make sure most player will read them.
I've spotted my errors (thanks to PTV) about the loop opcode (I wrote continuous while I need to write loop_continuous).
What is the need for trigger=attack?
trigger=attack is the default trigger mode to play the sample on the note on message.
If you don't have other samples that use trigger=release, then you don't need to define that in the sfz file.
- KVRAF
- Topic Starter
- 4314 posts since 31 Oct, 2004
Thank you for your answers guys! I'm not capable of making fully functional Sfz instruments!
Another question, this time regarding Sforzando; I downloaded the Sfz instruments for Sforzando that have a GUI. Only TimeWarp 2 works, the other libraries from Karoryfer, the Estate Grand LE and SMDrums don't have any GUI when I load them and click on the controls tabs (or any other tabs for that matter). I have the latest version of Sforzando. Do I miss something?
Also, do the reverb works in Sforzando? When I turn it on and play with the controls I don't hear anything.
Another question, this time regarding Sforzando; I downloaded the Sfz instruments for Sforzando that have a GUI. Only TimeWarp 2 works, the other libraries from Karoryfer, the Estate Grand LE and SMDrums don't have any GUI when I load them and click on the controls tabs (or any other tabs for that matter). I have the latest version of Sforzando. Do I miss something?
Also, do the reverb works in Sforzando? When I turn it on and play with the controls I don't hear anything.
