lib/file/encoder/header.js
function encodeHeader(header) {
    var cursor = new BufferCursor(new buffer.Buffer(6));

    cursor.writeUInt16BE(header.getFileType());
    cursor.writeUInt16BE(header._trackCount);
    cursor.writeUInt16BE(header.getTicksPerBeat() & 0x7FFF);

    return encodeChunk('MThd', cursor.buffer);
}
function encodeHeader(header) {
    var cursor = new BufferCursor(new buffer.Buffer(6));

    cursor.writeUInt16BE(header.getFileType());
    cursor.writeUInt16BE(header._trackCount);
    cursor.writeUInt16BE(header.getTicksPerBeat() & 0x7FFF);

    return encodeChunk('MThd', cursor.buffer);
}
function encodeHeader ( header ) { var cursor = new BufferCursor ( new buffer . Buffer ( 6 ) ) ; cursor . writeUInt16BE ( header . getFileType ( ) ) ; cursor . writeUInt16BE ( header . _trackCount ) ; cursor . writeUInt16BE ( header . getTicksPerBeat ( ) & 0x7FFF ) ; return encodeChunk ( 'MThd' , cursor . buffer ) ; }
Encode a MIDI header chunk

@param {module:midijs/lib/file/header~Header} header Header to encode
@return {Buffer} Encoded header
Encode a MIDI header chunk