-
Notifications
You must be signed in to change notification settings - Fork 260
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
Add support for loop mode release #1400
Conversation
Convince dependabot to ignore SonarScanner version 3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disclaimer: This is only my personal static code analysis - I haven't tested this yet.
IMO, the change is inaccurate because for two reasons:
- You're not implementing the 0.02s attack phase.
- Polyphone claims that the "playback begins with the release phase". But you implemented it in such a way that the voice plays back silently until the release phase begins (because of the
dsp
updates happening just before that). This behavior would be pretty equivalent to the delay phase, but I don't think this is the intended behavior by Polyphone.
And that's exactly what this patch does. It only delays the wavetable oscillator. The volenv works normally. Feel free to test it in Polyphone 2.4. Put an attack time of 1 and hold the key for 1 second then release, then try instantly releasing it after the keypress. You can hear that the attack phase advances while the key is pressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so I've created a soundfont and it does indeed sound just like in Polyphone because I overlooked that the actual dsp update will happen in the interpolation functions below. I'm providing the test soundfont I've used:
polyphone-release-test.zip
noteon 0 23 127
noteoff 0 23
Will start playing the at its beginning sample with no attack and no hold.
noteon 0 24 127
noteoff 0 24
Will use 1s attack and 1s hold. When executed quickly consecutively, one can hear the attack phase. I find that behavior a bit strange. I mean we are already in release phase, so why do we hear attack and hold?
Yet, I would buy it. Pls. remove the extra space in if( voice....)
Done!
It makes sense IMO. Loop modes only affect wavetable, never envelope. And for example if we want an instrument with long attack time and then some sort of release noise at the end, this approach will make the noise play at the same volume as the main sample if the voice is released during the attack phase. |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, LGTM. Thanks!
Adds support for the new "sample mode release" introduced by Polyphone 2.4
Resolves #1398