lib/file/parser/track.js
function parseTrack(cursor) {
    var chunk, events = [],
        result, runningStatus = null;

    chunk = parseChunk('MTrk', cursor);

    while (!chunk.eof()) {
        result = parseEvent(chunk, runningStatus);
        runningStatus = result.runningStatus;

        events.push(result.event);
    }

    return new Track(events);
}
function parseTrack(cursor) {
    var chunk, events = [],
        result, runningStatus = null;

    chunk = parseChunk('MTrk', cursor);

    while (!chunk.eof()) {
        result = parseEvent(chunk, runningStatus);
        runningStatus = result.runningStatus;

        events.push(result.event);
    }

    return new Track(events);
}
function parseTrack ( cursor ) { var chunk , events = [ ] , result , runningStatus = null ; chunk = parseChunk ( 'MTrk' , cursor ) ; while ( ! chunk . eof ( ) ) { result = parseEvent ( chunk , runningStatus ) ; runningStatus = result . runningStatus ; events . push ( result . event ) ; } return new Track ( events ) ; }
Parse a MIDI track chunk

@param {module:buffercursor} cursor Buffer to parse
@return {module:midijs/lib/file/track~Track} Parsed track
Parse a MIDI track chunk