Closed turnerhayes closed 8 years ago
Such an old project but afaik this libs does not expose NodeJS streams but sort of generators. Do not use .edn() but next() until it returns notihng
The .end() call is not within the demo code, it's within the lib code--see https://github.com/nfroidure/MIDIEvents/blob/master/src/MIDIEvents.js#L126
Maybe this issue should go under that project, but the demo code that triggered it is in this project's Readme.
The problem is that the return value of getTrackEvents()
is an array, not a stream, and the .createParser()
seems to expect a stream (or similar construct).
Ok, found the problem: https://github.com/nfroidure/MIDIFile/commit/82f26c119ee10e8afeb15e642627b678706950ff
This project really needs a total rewrite imo ;)
I get the error
stream.end is not a function
when trying to run thegetTrackEvents()
part of the sample code in the Readme. It looks liketrackEventsChunk
is an array, whileMIDIEvents.createParser()
expects a stream and tries to call.end()
on it. Is the sample code out of date?