-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Improve the note stealing #214
Conversation
I added the envelope/power tracker as a simple The heuristic now is to sort voices by age, set a threshold of the envelope (now set at "average envelope value over the voices / 4"), try to find a voice which fits the bill to kill. If we go beyond "max voice age / 2", we just pick the oldest one. I also kill all "sister voices" now, which are started at the same time and with the same trigger. Writing this down I realize that this can be a problem if one of the sister voice is super strong, so we still need to refine all of this. Maybe consider the average envelope over all sister voices, or just do not kill sister voices? |
The more I think about this the more I think we need an opcode so instrument makers can set a voice stealing that is adapted to their instrument behavior... |
Perhaps consider the max of all of them? |
Used for ramping out voice data
This data is ramped out before the main rendering loop, to smooth the voice killings
Did that, and I also added that killed voices pre-render their block in all relevant effect busses. This data is "ramped out" at the beginning of the block before the rendering of active voices. It's a linear ramp now, it could be an exponential ramp. The behavior seems good, on hardcore piano stuff (like say Chopin or Liszt) with relatively low polyphony you don't "hear" dropped notes, and if you're way crazy on the polyphony you can sometimes distinguish something going wrong. I was bitten by the fact that the voice kills itself btw. Maybe flagging ended voices and letting the synth clean them up is a better idea in the end.
|
Looking good. Another thing, you may consider as heuristic to check if there exists already other voices using the same instrument, and increase the killability score if this is the case. |
I'll merge the current state and listed possible improvements for the next release based on our discussions. Thanks all! |
So the previous note stealing was very conservative. Now, we make use of the average power computed by all voices after each block to steal the voice that had the lowest mean-squared score in the last 10 blocks, without further checks. The reasoning is that most of the time under such pressure a new note will always trump an old one, and we might as well take the lowest.
Also, I put the default polyphony to 256 and increased the max to 512.
Close #187