How does voice management/reassignment occur in JUCE Synthesiser? Can it be controlled?


#1

If you reach your voice limit, how does JUCE synthesiser reassign voices?

In Reaktor, you can dictate for example if voices are reassigned by oldest voice, by nearest voice, or by same pitch to same voice.

Ie. Oldest would cause the oldest triggered voice to be reassigned next if you reach your voice limit. Reassign mode would prevent it from having multiple voices of the same pitch, because if you press an “A3” twice, it will assign the second note to the same voice as the first.

How can this be controlled or managed in JUCE Synthesiser projects?

Thanks


#2

Did you check the docs or source?

findVoiceToSteal() && findFreeVoice()

https://docs.juce.com/master/classSynthesiser.html#a9e2681f24821206a0ea681cc72f5cffa

Rail


#3

Great! That’s exactly what I was looking for. If anyone has written any override code for it and they’re willing to share an example of how it would be written to learn from that would be great too… :slightly_smiling_face:

If not no worries, I can probably figure it out from the existing code…