grimmdude / MidiWriterJS

♬ A JavaScript library which provides an API for programmatically generating and creating expressive multi-track MIDI files and JSON.
MIT License
557 stars 60 forks source link

Add startTick to duration in NoteOffEvent instead of subtracting it #75

Closed kjin closed 3 years ago

kjin commented 3 years ago

First off, thanks for writing this library! It's saved me from having to learn and implement the MIDI file spec myself.

I feel like the NoteOffEvent tick property should be startTick + duration, not -startTick + duration. Is that correct or is there something I'm missing?

leegee commented 3 years ago

The patch on this ticket solves the bug illustrated on issue 82: https://github.com/grimmdude/MidiWriterJS/issues/82

grimmdude commented 3 years ago

Hey @kjin,

Sorry for the delay responding to this. Thanks for the PR, I think you're right with this. Merging and will release in 2.0.1.

-Garrett