Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Trigger adjustment #372

Closed
kinwie opened this issue Aug 17, 2020 · 10 comments · Fixed by #393
Closed

Release Trigger adjustment #372

kinwie opened this issue Aug 17, 2020 · 10 comments · Fixed by #393

Comments

@kinwie
Copy link

kinwie commented Aug 17, 2020

Current sfizz release trigger have some disadvantages.
These are what I think may need to be adjusted :

  1. Sfz specs default behavior: By setting trigger to release or release_key will automatically set the region into one-shot mode.
    *Current state in sfizz : It is not and we need to put ampeg_hold= or ampeg_release= with high value to make the release region play, which is no needed if it automatically put into loop_mode=one_shot.

  2. Playing notes with sustain pedal down (especially repeated notes) then release the pedal, need note_polyphony=1 to limit each released notes to 1 voice per key.
    *Current state in sfizz :

  • note_polyphony not yet recognized by the release regions, so for example, with sustain pedal down, playing fast 10 notes of the same key, then release the pedal, all 10 released notes will play. It should be limited follow the note_polyphony value.
  • off_time not yet working properly. Sfizz default to off_mode=normal and depends on the ampeg_release value for the attack region's fade-out time, so we can't set different fade-out time independently. This can be an issue for the high undampened piano keys which have long release time, but to have a shorter off_time (In Aria, this is set to off_mode=time by default).
  1. Adding note_polyphony=1 will also cause both the attack and release regions of the same key, muting each other (bi-directional). This is the default behavior with no group= set (both attack and release regions are in the same group=)
    *Current state in sfizz : release region can't get muted by the attack region because the use of long ampeg_release value for it to play

Point #3 could be just gone if #2 fixed

@kinwie
Copy link
Author

kinwie commented Aug 18, 2020

This simply will just works in both DropZone and sforzando :

<group> note_polyphony=1
<region> sample=sine.wav
<region> sample=saw.wav trigger=release

Both will mute each other (per key) in both pedal up and pedal down

@paulfd
Copy link
Member

paulfd commented Aug 18, 2020

I have yet to consolidate the polyphony logic to note-off and cc-triggered values, so points 2 and 3 are expected in a way ;-)

For the first point it's a valid remark. We do take into account the amplitude envelop for release voices, so you can actually do

<region> trigger=release_key sample=*sine ampeg_attack=0.02 ampeg_release=0.1

In sforzando afair this generates an inifinite sine wave.

@paulfd paulfd added this to the 0.4.1 milestone Aug 18, 2020
@kinwie
Copy link
Author

kinwie commented Aug 18, 2020

Yes, as the note_polyphony was just fixed last week, I'm also guessing that not yet put into release trigger.

Yes, ampeg_attack ampeg_hold ampeg_decay ampeg_sustain should works for release trigger. Only ampeg_release is ignored.

@paulfd
Copy link
Member

paulfd commented Aug 18, 2020

For 1., do you have a reference? If yes, is it somewhere on sfzformat?

@paulfd
Copy link
Member

paulfd commented Aug 18, 2020

1. __

2. Playing notes with sustain pedal down (especially repeated notes) then release the pedal, need `note_polyphony=1` to limit each released notes to 1 voice per key.
   _*Current state in sfizz :_

Yes, this was changed because it seemed to me that sforzando actually stacked the release samples. Can you check the volume of the sine wave on release when using and playing multiple notes?

<region> sample=*saw
<region> trigger=release sample=*sine 
* note_polyphony not yet recognized by the release regions, so for example, with sustain pedal down, playing fast 10 notes of the same key, then release the pedal, all 10 released notes will play. It should be limited follow the note_polyphony value.

* off_time not yet working properly. Sfizz default to off_mode=normal and depends on the ampeg_release value for the attack region's fade-out time, so we can't set different fade-out time independently. This can be an issue for the high undampened piano keys which have long release time, but to have a shorter off_time (In Aria, this is set to off_mode=time by default).

off_mode actually defaults to fast, which should be the same as the default off_time in ARIA. If you set off_time explicitely it will also switch the region to off_mode=time. I changed this in the last PR but maybe it doesn't work properly?

1. Adding `note_polyphony=1` will also cause both the attack and release regions of the same key, muting each other (bi-directional). This is the default behavior with no `group=` set (both attack and release regions are in the same `group=`)
   _*Current state in sfizz : release region can't get muted by the attack region because the use of long ampeg_release value for it to play_

Your example here would be

<group> note_polyphony=1
<region> key=60 sample=*saw
<region> key=60 trigger=release sample=*sine

?

Also, which may explain the behavior you experience, sfizz does not steal released voices, nor do they count in the note polyphony.

@kinwie
Copy link
Author

kinwie commented Aug 19, 2020

For 1., do you have a reference? If yes, is it somewhere on sfzformat?
Yes, it is documented in here :
https://sfzformat.com/opcodes/loop_mode

@paulfd
Copy link
Member

paulfd commented Aug 19, 2020

Ok this one (1.) is fixed in #379

For the rest we can tweak it, I'll wait for your feedback on the number of release voices triggering, but I guess a core issue is just that there is no polyphony checks on note-off and cc events yet.

@kinwie
Copy link
Author

kinwie commented Aug 19, 2020

Yes, this was changed because it seemed to me that sforzando actually stacked the release samples. Can you check the volume of the sine wave on release when using and playing multiple notes?
The volume of sine wave will get louder because it keep stacked. Same behavior in both sforzando and DropZone

off_mode actually defaults to fast, which should be the same as the default off_time in ARIA. If you set off_time explicitely it will also switch the region to off_mode=time. I changed this in the last PR but maybe it doesn't work properly?
*edited : off_time works

@kinwie
Copy link
Author

kinwie commented Aug 19, 2020

Another test prove that off_time works by default.
Sorry, too many tests drained my brain :))

@kinwie
Copy link
Author

kinwie commented Aug 19, 2020

For the rest we can tweak it, I'll wait for your feedback on the number of release voices triggering, but I guess a core issue is just that there is no polyphony checks on note-off and cc events yet.

All players behave the same including sfizz. with pedal down, all release triggered voices will be hold and then released when pedal up, as long as its correspond attack note is still active (behavior of rt_dead=off). So, note_polyphony will solved this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants