lib/midi.js
function (notes, settings) {
  var noteEvents = makeNoteEvents(notes, settings);
  var setPatch = makePatchEvent(0, settings.melodyPatch);
  var length = setPatch.length + noteEvents.length + trackFooter.length;

  return Buffer.concat([trackHeader, padNumber(length, 4), setPatch, noteEvents, trackFooter]);
}
function (notes, settings) {
  var noteEvents = makeNoteEvents(notes, settings);
  var setPatch = makePatchEvent(0, settings.melodyPatch);
  var length = setPatch.length + noteEvents.length + trackFooter.length;

  return Buffer.concat([trackHeader, padNumber(length, 4), setPatch, noteEvents, trackFooter]);
}
function ( notes , settings ) { var noteEvents = makeNoteEvents ( notes , settings ) ; var setPatch = makePatchEvent ( 0 , settings . melodyPatch ) ; var length = setPatch . length + noteEvents . length + trackFooter . length ; return Buffer . concat ( [ trackHeader , padNumber ( length , 4 ) , setPatch , noteEvents , trackFooter ] ) ; }
Return a buffer with a melody track
Return a buffer with a melody track