sfztools / sfizz

SFZ parser and synth c++ library, providing a JACK standalone client
https://sfz.tools/sfizz/
BSD 2-Clause "Simplified" License
418 stars 57 forks source link

Second set of Choke groups #1078

Closed kinwie closed 1 year ago

kinwie commented 2 years ago

I know I seems greedy for opcode request, but really... we need a second set of Choke opcodes for drums and percussion stuff (especially cymbals) to simulate closer to the real instrument. So, they are :

choke_group=
choke_by=
choke_mode=
choke_time=
choke_shape=
choke_curve=

Why we need two sets? Because we are using one_shot mode and we need two different offtime (release time)_ to define two different choke events :

  1. Self-Choke : when the region choke itself, to prevent build-up sound effect. Usually longer off_time
  2. Choked-By : when it choked by other region, like for hihat and crash choke. Usually very short off_time.

In this simple example :

<region>
sample=crash.wav
loop_mode=one_shot
key=60
group=1
note_polyphony=1
off_time=5
choke_group=10
choke_by=11
choke_time=0.3
choke_shape=-3

<region>
sample=*silence
key=62
choke_group=11

The crash is set to 1 polyphony, group id No. 1 and with off_time 5 seconds, so it will self-choke and every previous hits will be decaying in 5 seconds.

Then it has choke_group id No.10 and will be choked by key 62 which has choke_group id No.11. The off_time (choke_time) is quick, in 0.3 seconds.

kinwie commented 2 years ago

I link this issue for monitoring : https://github.com/redtide/test/issues/3

kinwie commented 2 years ago

I break down the opcode details :

kinwie commented 2 years ago

Using ampeg_dynamic=1 can offer a workaround for this, by modulating ampeg_release with off_mode=normal But still there are some issues involved in the practical usage :