SFZ legato mode

Sampler and Sampling discussion (techniques, tips and tricks, etc.)
Post Reply New Topic
RELATED
PRODUCTS

Post

Legato is not too difficult. All your initial "attack" (non-legato) waveforms must be marked trigger=first. All the legato waveforms must be marked trigger=legato.

And it's best to use the group and off_by opcodes so that only 1 note plays at a time. Otherwise as you play various notes, some will trigger legato, and others may not.

Assume you have the following 2 non-legato waveforms mapped across the keyboard:

Code: Select all

sample=highnote.wav lokey=c3 pitch_keycenter=c3
sample=lownote.wav hikey=b2 pitch_keycenter=b2
Mark them trigger first, and put them in a group that cuts off itself (so only 1 note sounds at a time). The easiest way is to use a group header:

Code: Select all

<group> trigger=first group=1 off_by=1
sample=highnote.wav lokey=c3 pitch_keycenter=c3
sample=lownote.wav hikey=b2 pitch_keycenter=b2
Now take your legato waveforms, mark them trigger legato, and put them in the same (monophonic) group:

Code: Select all

<group> trigger=legato group=1 off_by=1
sample=highlegato.wav lokey=c3 pitch_keycenter=c3
sample=lowlegato.wav hikey=b2 pitch_keycenter=b2
If you don't have legato waveforms, you can make facsimiles using your nonlegato waveforms. Load your waveform in a wave editor (ie Waveosaur) and visually skip over the attack portion of the waveform. Find the nearest zero-crossing, and notice the sample offset (from the beginning of the wave). Use this offset with the offset opcode. For example, for my legato waveforms, here i use the nonlegato waveforms, skipping over the first 10,000 samples:

Code: Select all

<group> trigger=legato group=1 off_by=1
sample=highnote.wav lokey=c3 pitch_keycenter=c3 offset=10000
sample=lownote.wav hikey=b2 pitch_keycenter=b2 offset=10000
Now the tricky part. As one note cuts off the previous note, you have to set the amp release and attack times so the notes "slur" (ie, the previous note blends into the next note). Through trial-and-error, I've found the following values to be a good starting point for both Sforzando and LinuxSampler. You may have to tweak the values for different instruments.

For nonlegato, add ampeg_release=0.2 off_mode=normal
For legato, add ampeg_attack=.05 ampeg_release=0.2 off_mode=normal

Here's the final sfz:

Code: Select all

<group> trigger=first group=1 off_by=1 ampeg_release=0.2 off_mode=normal
sample=highnote.wav lokey=c3 pitch_keycenter=c3
sample=lownote.wav hikey=b2 pitch_keycenter=b2

<group> trigger=legato group=1 off_by=1 ampeg_attack=.05 ampeg_release=0.2 off_mode=normal
sample=highlegato.wav lokey=c3 pitch_keycenter=c3
sample=lowlegato.wav hikey=b2 pitch_keycenter=b2

Post

just to add,

if you encounter 'click' artifact sounds using legato mode in sforzando, you can add : off_shape=0 to the <global> section to smooth it out.


here's some sfz files (only/no samples included) that i've made (recreated) and used in some of my backing tracks music, that used various great free samples. The bass presets have legato with cc68 to trigger it on/off. Hope they are useful to others.

https://www.dropbox.com/sh/73snhv4lf8p3 ... eSwGa?dl=0

cheers...

Post

I'm pretty sure off_shape doesn't work with LinuxSampler, but the above gives very similiar results in both players.

LinuxSampler also doesn't do polyphony=1, which is why I went with off_by.

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
Hi!

I use sforzando player.
Is there a way to avoid keyswitches to mess with legato?

Code: Select all (#)

<global> sw_lokey=19 sw_hikey=21 sw_default=19
<region> sw_last=19 lokey=25 hikey=127 trigger=first sample=*sine
In case keyswitch is down at the moment of playing first note of legato phrase, region with trigger=first just won't play.
trigger=legato region is played instead.
Is there a way to isolate keyswitches?

Thanks!

Post Reply

Return to “Samplers, Sampling & Sample Libraries”