I have several midi files that contain notes with 0 duration. There will be a note_on event, then the next event for the same note says note_off and the time attribute is 0. Is there a purpose to these 0-length midi notes?

  • 1
    Do you know what sound these notes are intended to trigger? Commented Jun 12, 2020 at 6:49
  • 2
    One could suspect a lame editing software, which instead of delete a note, just put its length to zero…
    – Tom
    Commented Jun 12, 2020 at 10:57
  • @Tom_C That was my thought! I just wan't sure if somehow a 0-length note would get played for some microsecond, like a grace note or something...
    – duhaime
    Commented Jun 12, 2020 at 12:36
  • 1
    To elaborate on topo Reinstate Monica's comment, are the 0-length notes for unpitched percussion instruments such as snare drums?
    – Dekkadeci
    Commented Jun 12, 2020 at 14:04

1 Answer 1


Many percussion instruments have a fixed-length sound and ignore note-off messages, but MIDI files must not omit note-off messages. So the timing of these messages does not matter.

  • Thanks! Can I please ask you to say a little more about what you mean when you say some percussion instruments ignore note off messages? I'm not sure I follow yet...
    – duhaime
    Commented Jun 12, 2020 at 19:00
  • 1
    Presumably they are “one-shots” where the whole sample is played no matter how long the midi note, hence taking no notice of the note off. Commented Jun 12, 2020 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.