SFZ format documentation

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

Post

Turns out I already did it, just gave it... a weird name?

https://sfzformat.com/tutorials/subtractive_synths

Post

Cool! I'll look over that section again! Thanks!
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

Post

audiojunkie wrote: Mon Jul 03, 2023 4:04 am We need a tutorial on how to do midi cc control with SFZ. Is MIDI CC control change even possible? I would like to be able to control the following aspects of a SFZ instrument, and I haven’t figured out how:

MIDI CC messages I would like each sample player plugin to support:

Attack
Decay
Sustain
Release
Cut off (low pass filter)
Resonance
Pitch wheel
Modulation wheel
Volume
Pan position
Portamento on/off
Portamento Time


I would like to be able to use my hardware controller, or possibly through midi automation tracks, and be able to change these aspects of an instrument on the fly.

Is this even possible? Does something have to be written into the SFZ script to make this happen? If it can be done, can it be done on most of the SFZ players?

Experts on the subject, please reply. 🙂
SFZ 1 offers some control - http://www.drealm.info/sfz/plj-sfz.xhtml "The model in more detail" "Setting / Adjustment" table.

SFZ 2 extends the model significantly - http://sfzformat.com/extensions/midi_ccs / http://sfzformat.com/opcodes/?v=2 - with more in the ARIA extensions - http://sfzformat.com/opcodes/?v=aria - with things like "ampeg_attackccN" (v2) and (ARIA) "ampeg_decay_curveccN". The reason http://sfzformat.com/ is so much more comprehensive than my one-pager, is that SFZ 2 is much, much more flexible! :)

Post

audiojunkie wrote: Mon Jul 03, 2023 4:11 pm Cool! I'll look over that section again! Thanks!
And if it's confusing or incomplete, let us know. I'll ask somebody who's better at explaining stuff clearly to redo it, haha.

Post

I thought I read somewhere (link?) that the 'volume' opcode high limit of 6db is incorrect; it would appear values up to 48db? are honored (in sforzando) through testing. If this is indeed so, shouldn't the syntax table be updated to reflect the supported high limit?

Edit:
My bad... after thoroughly reading the 'Volume' description (https://sfzformat.com/opcodes/volume), the details discuss how the max volume can be bigger than 6db.

Post

Mmmh, could it be that Decent-Sampler is missing from the list of samplers
here? Decent-Sampler can import sfz-files.

A second point: One could also mention that sample packages in the Decent
Sampler format (e.g. on Pianobook) can easily be converted into the SFZ
format using "ConvertWithMoss".

:)
free mp3s + info: andy-enroe.de songs + weird stuff: enroe.de

Post

kinwie wrote: Sat Apr 11, 2020 8:57 amYeah, I can confirm 100% it works with both aftertouch in my host that i just test it and capture the screen (though the cc130 won't show up at sforzando ctrl tab)
(yes, yes, exhuming an old post :) )

Hey, did you get polyaftertouch working to mute a group? Is that what you're saying?

I've tried this in ARIA Player 1.977:

Code: Select all

<group>
  group=1 off_by=2
  locc130=0 hicc130=0
<region> key=1 sample=name1
<region> key=2 sample=name2
<group>
  group=2
  sample=*silence
  locc130=001 hicc130=127
<region> key=1
<region> key=2
<region> key=3
and the same with lo/hi polyaft, and also triggering the off by group with on_lo/hi cc130. None worked for me. Any ideas?

Post

Aha....

I thought I'd tried this combination...

Code: Select all

<group>
group=1 off_by=2
lopolyaft=0 hipolyaft=0
<region> key=1 sample=name1
<region> key=2 sample=name2
<group>
group=2
sample=*silence
lopolyaft=1 hipolyaft=127
<region> key=1
<region> key=2
<region> key=3
No "on_cc130" triggering -- but my controller sends a PA=127, NoteOn, PA=0, NoteOff. I'd be interested to hear if you got the on_cc130 triggering of the mute group to happen, still. :)

----
EDIT1
Though I'm not sure the lopolyaft=0 hipolyaft=0 is needed.

----
EDIT2
And, of course, in real life, it's much more complicated than my example and... it works for some triggers and not for others despite the MIDI messages being the same (different note number, of course) and the regions being "the same" to the best of my knowledge... Debugging is very hard (especially with undocumented features...).

Post

pljones wrote: Mon May 27, 2024 1:22 pm Aha....

I thought I'd tried this combination...

Code: Select all

<group>
group=1 off_by=2
lopolyaft=0 hipolyaft=0
<region> key=1 sample=name1
<region> key=2 sample=name2
<group>
group=2
sample=*silence
lopolyaft=1 hipolyaft=127
<region> key=1
<region> key=2
<region> key=3
No "on_cc130" triggering -- but my controller sends a PA=127, NoteOn, PA=0, NoteOff. I'd be interested to hear if you got the on_cc130 triggering of the mute group to happen, still. :)

----
EDIT1
Though I'm not sure the lopolyaft=0 hipolyaft=0 is needed.

----
EDIT2
And, of course, in real life, it's much more complicated than my example and... it works for some triggers and not for others despite the MIDI messages being the same (different note number, of course) and the regions being "the same" to the best of my knowledge... Debugging is very hard (especially with undocumented features...).
Hi,
Yes, I think I've got PolyAft worked for e-drums cymbals choke. I published few kits here featured PA choking, https://github.com/sfzinstruments/Wilki ... NakedDrums

Iirc, it worked just fine for choking with *silence region. Only when using cymbal tail samples have unpleasant issue because when you just grab the cymbal pad without hitting it first, the tail sample will also triggered and sounded.

The code is like this :
https://github.com/sfzinstruments/Wilki ... olyaft.txt

Code: Select all

trigger=release
rt_decay=$RT_DECAY
locc130=127
hicc130=127
on_locc130=127
on_hicc130=127
sw_vel=previous
[code]

Post

Thanks.

In the end using the lo/hi polyaft with a note trigger was easier (as that's what's sent) and ignore the on_lo/on_hi cc130 triggering.

(My main problem was that I'd not understood quite what the TrapKAT does in terms of when it'll send poly aftertouch. Only GM percussion set cymbals. That's seven specific note numbers...)

Post

Extended MIDI CC implementation isn't always complete for every CC... so if 130 doesn't support locc/hicc, that would be good to verify and document. I think I found slightly weird behavior with... one of them... where it'll work fine if I put it in as a hdcc with decimals. So maybe try that, just to see.

Post

pljones wrote: Mon Jun 03, 2024 6:23 pm Thanks.

In the end using the lo/hi polyaft with a note trigger was easier (as that's what's sent) and ignore the on_lo/on_hi cc130 triggering.

(My main problem was that I'd not understood quite what the TrapKAT does in terms of when it'll send poly aftertouch. Only GM percussion set cymbals. That's seven specific note numbers...)
Afaik, using only lo/hipolyaft can't trigger the choke note while receiving PA message in sforzando.
lo/hipolyaft only functioning as the boundary for the PA values. So, that's why needed on_lo/hicc130 to activate the triggering for the choke note.

I just tried this simplest example and it works ok :

<region>
sample=crash.wav
loop_mode=one_shot
key=49
group=1
off_by=2

<region>
sample=*silence
key=49
group=2
locc130=127
hicc130=127
on_locc130=127
on_hicc130=127

Polyaft.png
PA message usually (in Roland TD) 127 then 0 with the note number
You do not have the required permissions to view the files attached to this post.

Post

kinwie wrote: Tue Jun 04, 2024 3:49 pmAfaik, using only lo/hipolyaft can't trigger the choke note while receiving PA message in sforzando.
No, the lo/hi polyaft is to use the note message. When polyaft is zero, act normally. For any other value, choke when that note arrives. This depends on the controller sending a note trigger between the two polyaft messages, of course (which my TrapKAT does).

If you don't get the note message, then yes - you'd need choke using the polyaft message. (lo/hi polyaft default to 0/127 - i.e. there's no need to set them unless you want to restrict the range your region gets triggered.)

I'd have expected the number given in on_lo/hi cc130 to be a note number, rather than a polyaft number. Otherwise, there's no way to specify the note number for the message. Then lo/ho polyaft makes sense to separate "on" triggers and "off" triggers. Is that how you see it working? (Having key as well doesn't make sense to me.)

Post

DSmolken wrote: Mon Jun 03, 2024 6:46 pm Extended MIDI CC implementation isn't always complete for every CC... so if 130 doesn't support locc/hicc, that would be good to verify and document. I think I found slightly weird behavior with... one of them... where it'll work fine if I put it in as a hdcc with decimals. So maybe try that, just to see.
Which ext cc number that is weird? I've tested all and seems they are okay in sforzando.

Post

pljones wrote: Tue Jun 04, 2024 4:47 pm
kinwie wrote: Tue Jun 04, 2024 3:49 pmAfaik, using only lo/hipolyaft can't trigger the choke note while receiving PA message in sforzando.
No, the lo/hi polyaft is to use the note message. When polyaft is zero, act normally. For any other value, choke when that note arrives. This depends on the controller sending a note trigger between the two polyaft messages, of course (which my TrapKAT does).

If you don't get the note message, then yes - you'd need choke using the polyaft message. (lo/hi polyaft default to 0/127 - i.e. there's no need to set them unless you want to restrict the range your region gets triggered.)

I'd have expected the number given in on_lo/hi cc130 to be a note number, rather than a polyaft number. Otherwise, there's no way to specify the note number for the message. Then lo/ho polyaft makes sense to separate "on" triggers and "off" triggers. Is that how you see it working? (Having key as well doesn't make sense to me.)
Ok, let me check the original rgc sfz player for how it behaves with cc130 and lo/hipolyaft and also the midi file i recorded with TD-1KV to makr sure the polyaft message has note-on/offor not.

Post Reply

Return to “Samplers, Sampling & Sample Libraries”