[sdiy] Polyphonic voice allocation algorithm

Terry Shultz thx1138 at earthlink.net
Tue Jun 24 18:11:44 CEST 2014


Also look up n-Key rollover as a possible guide.

regards,

Terry

On 6/24/2014 1:04 AM, Paul Maddox wrote:
> Richie,
>
> I used a similar method in the PolyDAC, I have a stack (array) of 
> "free voices" and an array of "notes in use".
> the array of notes in use relates to the voice number, i.e. the value 
> NoteInUse[3] is the value of the note being played by voice 3.
> When a new note comes in, you grab the first value from "Free Voices", 
> and store the note number in "NotesInUse[]".
> This way, when you get a note off, you scan through the "NoteInUse" 
> array, when you find the matching note number, you add the '3' back to 
> the "Free Voices" :)
>
> FWIW, I used 255 to 'back fill' my 'free voices', so on the PolyDAC, 
> if you played 4 notes and then a fifth came in, you would go to the 
> FreeVoices buffer, and if it returned 255, you knew you'd run out of 
> voices.
>
> I did augment this with the option to note steal (based on oldest 
> note), but again that's just another array showing what order the 
> notes came in, which is only accessed when the "FreeVoices" returns 255.
>
> Paul
>
> On 23/06/2014 23:15, Tom Wiltshire wrote:
>> Hi Richie,
>>
>> I've got some notes that I did when I wrote one. I'll see what I can 
>> dig out. The notes were all diagrams though - no text. It might be 
>> totally impenetrable to an outsider!
>> It involved two stacks, one of free voices, and one of voices in use. 
>> I also kept a  lookup up of what voice (if any) each note was been 
>> played by to save having to search the stacks for that information. 
>> Free voices came off the bottom of the free stack, and recently freed 
>> voices went back on the top. Similarly new used voices went on the 
>> top of the used stack, and if there were no free voices left, you 
>> could pull the oldest used voice off the bottom. There wasn't a lot 
>> more to it than that, or that was the gist of it, anyway.
>>
>> Tom
>>
>>
>> On 23 Jun 2014, at 21:57, rburnett at richieburnett.co.uk wrote:
>>
>>> Hi guys and girls,
>>>
>>> Does anyone have a link or document that gives a good explanation 
>>> for a basic polyphonic voice allocation algorithm.  I'm not after 
>>> anything fancy, just the sort of process that goes on inside a basic 
>>> mono-timbral polysynth like Roland's Juno series.
>>>
>>> I know some basic terminology like "voice stealing" and "round robin 
>>> fashion" but I'm trying to avoid sitting down and going through the 
>>> thought process of coming up with my own voice allocation algorithm 
>>> from scratch!  Life is too short to spend time re-inventing the 
>>> wheel when this algorithm has been used for decades and must surely 
>>> be documented somewhere?
>>>
>>> I know synths like the Juno 106 had two different poly voice 
>>> allocation modes on offer.  One of them assigns repetitive same 
>>> notes to new voices in round-robin fashion so that their release 
>>> phases can overlap, and the other mode plays the repeating same 
>>> notes by just retriggering the same module. What I'm really looking 
>>> for is something like a flowchart, or text description of how the 
>>> voice allocation decisions are performed.
>>>
>>> I appreciate that things can get complicated when notes can arrive 
>>> from local keyboard vs over MIDI, and things like Sustain messages, 
>>> and multi-timbral setups are considered. However, I'd like to keep 
>>> it simple at the moment so that I can just play about with some 
>>> synthesis options.
>>>
>>> Thanks in advance for any help,
>>>
>>> -Richie,
>>> _______________________________________________
>>> Synth-diy mailing list
>>> Synth-diy at dropmix.xs4all.nl
>>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at dropmix.xs4all.nl
>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
>




More information about the Synth-diy mailing list