MChanVoicer is intended for channel rotation polyphony as used in the Roli Saeboard and QuNexus keyboard. It accepts one channel of incoming noteOn, noteOff, bend, and press messages, and has one MKtlElement each for note, vel, bend, press, and velOff. NoteOn and NoteOff are interpreted monophonically as follows:
noteOn: if there are no held notes yet, startFunc is triggered; always sets note and vel values from incoming values
noteOff: if there are held notes, note value rolls back to one of them (by default, the latest); if not, noteOff sets vel element to 0, offVelEl is set, and endFunc is triggered.
First code examples:
make a new MChanVoicer with a (MIDI) channel, and pass in MKtlElements if desired; else they are created.
the chan value
the MKtlElements for note, amp, bend, press, velOff values
pass in noteOn and noteOff messages
pass in bend values
pass in press messages
get and set the function that happens when a new note starts
get and set the function that happens when the note ends
the currently held notes in the order they were played in
trigger startFunc and endFunc