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
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
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
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
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
