grimmdude / MidiPlayerJS

♬ MIDI parser & player engine for browser or Node. As a parser converts MIDI events into JSON. Works well with single or multitrack MIDI files.
https://grimmdude.com/MidiPlayerJS/
MIT License
359 stars 52 forks source link

Player.getEvents typings incorrect #24

Closed xeoneux closed 6 years ago

xeoneux commented 6 years ago

Player.getEvents method does not return an array of events, but an array of array of events.

grimmdude commented 6 years ago

Hi @xeoneux,

Thanks for your message. Correct, Player.getEvents() returns an array of tracks each of which contains an array of events for that track.

-Garrett

xeoneux commented 6 years ago

There are a few other issues with the typings as well. Would you accept a PR if I convert the code into TypeScript?

grimmdude commented 6 years ago

Hi @xeoneux,

I'm not too familiar with TypeScript, but sure I'd consider accepting a PR if it improves the library. It wouldn't change the way it's currently used would it?

-Garrett

xeoneux commented 6 years ago

It won't change the way how the library is currently used.

It'd remove dependency on gulp and babel and would also improve the developer experience.