Most polyphonic synths are designed on the assumption that the performer will never need to play every note on the keyboard at once; they therefore have fewer sets of voice circuits than there are keys. This assumption has played a major part in reducing the cost, power consumption, and weight of polyphonic synths over the years, and allowed for more sophisticated voice circuits to be designed. However, it also means that the voices cannot simply be permanantly connected to particular keys; some procedure for dynamically assigning voices to played notes has to exist, and this is referred to as the voice allocation algorithm. Usually this procedure is under the control of a microprocessor in the synth.
Two common algorithms are the "last in, first out" and the "round robin". Consider a synth with voiced numbered 1, 2, 3, etc. In the last-in-first-out method, when a voice is needed to sound a note, the lowest-numbered available voice is always selected. Say a three-note chord is played, and the notes are assigned voices 1, 2, and 3. Then the note assigned to voice 2 is released. If the other two notes continue to be held, the next note to be played will be assigned to voice 2. In the round-robin algorithm, the next available voice in sequence is always selected, so in the example above, after the note assigned to voice 2 is released, the next note played is assigned to voice 4. Voice 2 isn't assigned again until the assignment has gone through all of the available voices and wrapped back around to the beginning.
In assigning voices, it must be remembered that a voice is not finished with its job until the note it is playing has completed its release phase. Depending on the patch, this may be some time after the key is let up. All voice allocation algorithms must take into account how to handle the situation where there are no voices available to play a new note. There are really only two choices: either ignore the new note, or steal a voice from a note that is sounding. If voice stealing is used, there is often a preference to steal from a voice that is in the release phase. How to choose voices to be stolen is one of the most important considerations in designing a voice allocation algorithm.
The problem becomes more complex when considering a synth that is multitimbral and/or allows multiple voices to be layered on a note. The synth must decide how to allocate voices to the different patches being played; some synths will dynamically allocate voices across all patches, while others may allow groups of voices to be assigned to specific patches. When different patches layer different numbers of voices on a note, some bizarre situations may come up; for example, if only two voices remain, a new note on a three-layer patch requires a voice to be stolen, while a note on a single-layer patch does not. If the algorithm does not use voice stealing, it may not be possible to play another note with some patches even though voices remain.
Most polyphonic synths contain only one voice allocation algorithm, which is not directly visible to the player. However, a few provide a choice of two or more algorithms. Some synths also allow for voices that are malfunctioning to be disabled by the performer, or else their auto tune routines do so automatically, so that the voices are never assigned to a note.
Digital synthesizers which use a pool of digital signal processor ICs to do their processing face an additional problem: to make maximum use of the DSPs, they reconfigure the DSP pool according to the selected patch (so-called DSP flex). This means that the maximum number of voices available can vary depending on the patch, and on-the-fly patch editing may make it necessary to steal notes. Some digital synths try to avoid this problem by not allowing patch parameter changes on notes that are already sounding.