LeffelMania / android-midi-lib

MIT License
255 stars 72 forks source link

MidiTrack.insertNote() should line 168 create a NoteOff instead of NoteOn #10

Closed blinkmacalahan closed 8 years ago

blinkmacalahan commented 8 years ago

Seeing as how insertNote() is a shortcut for calling NoteOn and NoteOff shouldn't line 168 of MidiTrack.java create a NoteOff object?

LeffelMania commented 8 years ago

NoteOn with a velocity of 0 is equivalent to a NoteOff event; it's an optimization in the event stream so that a continuous stream of NoteOn events can be sent, resulting in fewer bytes in the stream.