Conversion to sfz or gig files

You're new to the LinuxSampler world? You don't know where to start and nothing works? Here's the place to ask for help.
jsevi83
Newbie
Posts: 4
Joined: Fri Oct 07, 2011 1:19 pm

Re: Conversion to sfz or gig files

Post by jsevi83 » Sun Oct 09, 2011 12:30 am

Thanks, you were right. I got different results converting fxp and nkm files to the following formats:

- Gigasampler: they sound okay, but seems that something is missing.
- Gigastudio 3: most of the times they don't work, or have an endless sustain.
- SFZ: they sound very good, but the samples used for the release of the key (piano samples) are very loud.

I was using Extreme Sample Converter (is there any better option?). Some files didn't work when converting from nkm to sfz, but they worked converting from fxp to sfz. I guess I should learn more about the sfz format so I change the volume of the piano key releases in my own needs. Maybe someone can point me in the right direction..

Alex
Moderator
Posts: 316
Joined: Wed Jan 23, 2008 9:08 pm

Re: Conversion to sfz or gig files

Post by Alex » Mon Oct 10, 2011 1:22 pm

I'll assume here that the release samples are in their own group.

Because if this the case, you only need to add the volume opcode to the group, and tweak it accordingly.
Make sure the opcode isn't already added to each region.

If you have a multi-velocity layer SFZ, where you have release for each velocity layer, then you can use the opcode for "use last velocity value" in each release <group> , which is sw_vel=previous

for a list of opcodes, and brief explanation for each, go to:

http://www.cakewalk.com/DevXchange/article.aspx?aid=108

See the section AMPLIFIER, and the explanation for "volume"

See the section INPUT CONTROLS and the explanations for "sw_vel", and "trigger"


I recommend you build a test-sfz.lscp file and open that in Fantasia, or whatever front end you're using. Single channel, single midi port in, and default audio out.

Great for testing those SFZ masterpieces...

I'm still learning how to build SFZs, but i will say that for handling all those little bits and pieces of percussion, fragments of sound, etc, SFZ is a great format, and easy to build with, once you get your head around the opcode system, and have a working knowledge of what each one does.

I learnt to put whatever i could into <group> as editing all the regions, one at a time, was really time consuming.

Couple of tips, and this is done with linux as the OS:

Add a document called foo.sfz (foo being your choice of name) to the folder where the samples are.

open a terminal, cd to the same folder, and type:

ls > foo.sfz


This function will dump all the names of documents in the folder to the .sfz file. Remove the line called foo.sfz (ls will dump that one too), and you have a complete list of sample names in the .sfz, without having to type them all one at a time.

So a line might look like:

snare-drum -1.wav

and 4 of them might look like:

snare-drum -1.wav
snare-drum -2.wav
snare-drum -3.wav
snare-drum -4.wav


If you have 4 samples in the file all beginning with "snare" and you don't want to hack them one at a time (who does), then open the replace function in your text editor (i use leafpad for sfz building) to further cut down the admin, and type something like:

in the find text box: snare
in the replace text box: <region> sample=snare


select change all at once, and all your samples are now "regionalised", and will look something like:

<region> sample=snare-drum-1.wav
<region> sample=snare-drum-2.wav
<region> sample=snare-drum-3.wav
<region> sample=snare-drum-4.wav

If you're simply assigning a sound to a key, then using the replace function again:

in the find text box: wav
in the replace text box: wav key=

do them all at once, and your regions will look something like:

<region> sample=snare-drum-1.wav key=
<region> sample=snare-drum-2.wav key=
<region> sample=snare-drum-3.wav key=
<region> sample=snare-drum-4.wav key=

assign a key to each, using c3=60(midi number)=middle C, as your guide to where on the keyboard you want trigger the samples from. you can use midi numbers or midi names.

<region> sample=snare-drum-1.wav key=60
<region> sample=snare-drum-2.wav key=61
<region> sample=snare-drum-3.wav key=62
<region> sample=snare-drum-4.wav key=63

or:

<region> sample=snare-drum-1.wav key=c3
<region> sample=snare-drum-2.wav key=c#3
<region> sample=snare-drum-3.wav key=d3
<region> sample=snare-drum-4.wav key=d#3


Once you've done this, any control you want over the regions in a group can be added at group level. An sfz file reads from group down, until it hits the next group, and so on...

So our example sfz with a volume adjustment might look something like:

<group>
volume=-5

<region> sample=snare-drum-1.wav key=c3
<region> sample=snare-drum-2.wav key=c#3
<region> sample=snare-drum-3.wav key=d3
<region> sample=snare-drum-4.wav key=d#3


and if the samples cut off too abruptly when you release the midi key, then add a little release:

<group>
volume=-5
ampeg_release=0.3

<region> sample=snare-drum-1.wav key=c3
<region> sample=snare-drum-2.wav key=c#3
<region> sample=snare-drum-3.wav key=d3
<region> sample=snare-drum-4.wav key=d#3


Tweak values to suit.

Hope this helps,

Alex.

typewriter
Advanced User
Posts: 147
Joined: Fri Sep 26, 2008 9:04 am

Re: Conversion to sfz or gig files

Post by typewriter » Mon Oct 10, 2011 4:01 pm

jsevi83 wrote:I was using Extreme Sample Converter (is there any better option?).
ESC is by far the best sfz converter. You can't convert nkm (Kontakt multis).
Latest beta can open Kontakt 4 nki files and convert those.
In most cases sfz conversion is fine. Only the release samples are not handled correctly.
I tried to convert EWQL Symphonic Orchestra files once. It sounds like the release samples start at the wrong time.
But I am sure the programmer will fix this with the upcoming release that will also include an editor (the mapper).

jsevi83
Newbie
Posts: 4
Joined: Fri Oct 07, 2011 1:19 pm

Re: Conversion to sfz or gig files

Post by jsevi83 » Wed Oct 12, 2011 9:12 pm

Thanks for the detailed information, Alex. As "typewriter" said, it sounds like the release samples start at the wrong time (or maybe just too loud). I will try to fix the sfz after reading the link provided (too much new information).

jsevi83
Newbie
Posts: 4
Joined: Fri Oct 07, 2011 1:19 pm

Re: Conversion to sfz or gig files

Post by jsevi83 » Thu Oct 13, 2011 1:05 am

Wow, I solved it. As you said, the file was a multi-velocity layer SFZ, well ordered in groups. All I had to do was changing the volume in the groups containing the release notes, lowering it until I didn't hear the noise present at the end of the release samples. As they all had the same value (which wasn't present in the rest of the groups) I could easily change them all at once. I also modified the value of ampeg_release for the groups containing the high register of the piano, as they sounded too long. Now it sounds great, so thanks a lot again, Alex.

I've been checking the link with the SFZ specifications and saw that the opcode list is divided in sections, such as Amplifier, Amplifier EG, Amplifier LFO, Filter, Filter EG, Filter LFO ... so now the stupid question: what is the difference between these? What do EG and LFO stand for?

Post Reply