sfz / opcode-suggestions

Experimental sfz opcode requests via issue tracker
3 stars 1 forks source link

New opcode suggestion: soundfont 2 style ---eg_key2decay, ---eg_key2hold #31

Closed asikwus closed 10 months ago

asikwus commented 1 year ago

Applies a key-scaling effect, that makes increasing key-value subtract from decay/hold time, in other words high notes sound shorter than low notes. Negative values flips the scale. Doesn't have to be limited to decay/hold like in sf2. Useful with short looped samples to make them more dynamically realistic, while keeping instrument-size on disk low (for the disk-space corncerned).

I have no idea if this was possible in sfz? maybe not in the most convenient way of being an actual parameter like in .sf2. This is what would make me give up sf2 for good, to be replaced with sfz, if it starts getting implemented into sfz-synths.

christophe-hall commented 1 year ago

Something like ampeg_decay_oncc133=-0.01 maybe?

asikwus commented 1 year ago

Yes, but the problem is that ampeg_decay_oncc133 is global and not key-isolated, resulting in a monophonic effect where a new note would change the decay rate of other held notes, according to what's described in the following quote from https://sfzformat.com/extensions/midi_ccs:

Values such as note on velocity and MIDI note number, when used as CCs, do not behave exactly the same as note number or velocity of the note itself, in some contexts. This is because once a note is played, its MIDI note number and note on velocity remain the same for that note. MIDI CC, however, is shared across the entire instrument, and this means another note on or note off event will change CC 131, 132 and 133. This can give unexpected results when using these CCs to adjust keytracking or velocity tracking of various parameters, especially in polyphonic instruments with long-sustaining sounds.

christophe-hall commented 1 year ago

Ok I didn't really think about that, though with ampeg_dynamic set to default 0, in my tests you have to hit note-ons at exactly the same time to hear the monophonic effect, otherwise they're fine.

asikwus commented 1 year ago

I tried it myself in sforzando: true - can though be a problem for those who quantize (I do that pretty often). I also noticed the scaling sounds multiplying in the shorter decays, each note up is a larger subtract than previous notes. Maybe because time rolls off quickly in small values and needs to be countered with an exponential curve?