[sdiy] MIDI, note off or note on with zero velocity?
Andrew Simper
andy at cytomic.com
Mon Jan 14 03:45:08 CET 2013
On 14 January 2013 03:07, Colin f <colin at colinfraser.com> wrote:
>
> On 13 January 2013 14:28, Richard Wentk <richard at wentk.com> wrote:
>> If your sequencer sends two notes pn the same pitch with the same channel
> - which can happen - sending two note offs will kill both.
>
> I would avoid supporting stacking of duplicate notes on a receiver.
> The behaviour is not defined in the MIDI spec, and there instruments which
> don't like it.
> The Yamaha TX802, for example, will assign an additional voice for a
> duplicated note-on.
> The first note-off will gate-off the first assigned voice, but then it
> thinks that note is off, so further matching note-offs are ignored, leaving
> a hanging note.
> Any synth might receive a single bit error in a note number which could
> cause a wrong note to be played. If that note has also been sent correctly
> you'd have a situation where the synth thinks a note has been played twice,
> but it's never going to receive a second note off. Playing and releasing the
> hanging note on the master keyboard won't clear it, since the new note-on
> would be stacked.
> I'd say best practice is for a note-off to end that note on any voice on
> that channel/note combination.
>
> Cheers,
> Colin f
I agree with Colin here, that a single note off should kill all note
ons for that note, I have found this to be the most useful behaviour
and you still get "midi unison" support. Just ignore all note offs for
any notes that don't have a note on, and always still match the number
of note ons and offs you send.
In addition if there are currently no notes down for some time (eg 5
seconds) you can always send a safety "all notes off" message, which
will make no audible difference since all notes are already off, and
it will catch any stuck notes.
Andy
More information about the Synth-diy
mailing list