lib/midi.js
function (settings) {
  var tempo = 60e6 / settings.tempo; // Microseconds per beat
  var setTempo = Buffer.concat([new Buffer([0, 0xFF, 0x51, 0x03]), padNumber(tempo, 3)]);
  var length = setTempo.length + trackFooter.length;

  return Buffer.concat([trackHeader, padNumber(length, 4), setTempo, trackFooter]);
}
function (settings) {
  var tempo = 60e6 / settings.tempo; // Microseconds per beat
  var setTempo = Buffer.concat([new Buffer([0, 0xFF, 0x51, 0x03]), padNumber(tempo, 3)]);
  var length = setTempo.length + trackFooter.length;

  return Buffer.concat([trackHeader, padNumber(length, 4), setTempo, trackFooter]);
}
function ( settings ) { var tempo = 60e6 / settings . tempo ; // Microseconds per beat var setTempo = Buffer . concat ( [ new Buffer ( [ 0 , 0xFF , 0x51 , 0x03 ] ) , padNumber ( tempo , 3 ) ] ) ; var length = setTempo . length + trackFooter . length ; return Buffer . concat ( [ trackHeader , padNumber ( length , 4 ) , setTempo , trackFooter ] ) ; }
Return a buffer with a MIDI track that sets the tempo
Return a buffer with a MIDI track that sets the tempo