[sdiy] MonoSynth Note Priority over MIDI

MTG grant at musictechnologiesgroup.com
Wed Apr 15 21:05:58 CEST 2015


Later that same weekend ... so if you're are doing high note proirity, 
for instance, and a note comes in that's not higher than the one 
playing, but higher than other values in the stack, do you insert it or 
ignore it?  Again I don't a proper MIDI monosynth so I don't know what 
is customary.

GB

On 10/21/2014 10:09 PM, Tom Wiltshire wrote:
>
> On 22 Oct 2014, at 04:08, Chris McDowell <declareupdate at gmail.com> wrote:
>
>>> Do you search for it in the stack and pull it out and toss it?
>> Indeed you do. (Or one does). I keep a “note stack” array and a “stack height” variable. Note on increments stack height. note off decrements stack height, searches for the note in the stack, removes it and slides the others notes in the stack down to fill the gap (it’s definitely a bit confusing, I had to do some serious scribbling on paper to get it right). Stack height is used as the index to the note stack, and represents the current note output.
>> Looks silly typed out like that. Worth drawing on paper!
>> Maybe someone here has an easier way to do it right?
>>
>> Chris
>
> I did it a similar way, with a stack of notes. New notes coming in go on the top of the stack and push older notes down. If a note is released, the stack is searched, and it is removed if present, and the remaining notes in the stack moved up to fill the gap.
> The only difference between my way and yours seems to be that I didn't keep track of the stack height. Instead, I used the fact that MIDI notes are 7-bit and I was storing them in bytes. This means the top bit is always clear for a note, and I was able to use "top bit set" in my stack to represent "this position is empty". Thus when a note is released, you fall back to the next one in the stack, as long as the top bit is clear. If the top bit is set, the last held note has just been released.
>



More information about the Synth-diy mailing list