nfroidure / midifile

A MIDI file parser/writer using ArrayBuffers
http://karaoke.insertafter.com
MIT License
199 stars 30 forks source link

Uncaught ReferenceError: MIDIFileHeader is not defined #23

Closed alijaya closed 7 years ago

alijaya commented 7 years ago

Hello, I get this error when I try run the sample code from the readme. I use the dist version.

nfroidure commented 7 years ago

Hi @alijaya . According to the README sample, it is normal. The MidiFileHeader constructor is not defined as a global variable. It is exporter as a MIDIFile.Header property (https://github.com/nfroidure/MIDIFile/blob/master/src/MIDIFile.js#L313) so replacing it by that one should make it work. Can you check ?

Leaving the issue open since the README should be patched. Feel free to PR if you got some time, otherwise will do when I'll have some time to.

nfroidure commented 7 years ago

https://github.com/nfroidure/MIDIFile/pull/24

alijaya commented 7 years ago

Ah yes, it works... thanks :D