lib/midi.js
function (deltaTime, on, firstChannel, chord, velocity) {
  var arr = [];

  // Make note event for first note after appropriate time
  arr.push(makeNoteEvent(deltaTime, on, firstChannel, noteValue(_.first(chord)), velocity));

  // Make note event for rest of the notes
  _.each(_.rest(chord), function (note, i) {
    arr.push(makeNoteEvent(0, on, i + firstChannel, noteValue(note), velocity));
  });

  return Buffer.concat(arr);
}
function (deltaTime, on, firstChannel, chord, velocity) {
  var arr = [];

  // Make note event for first note after appropriate time
  arr.push(makeNoteEvent(deltaTime, on, firstChannel, noteValue(_.first(chord)), velocity));

  // Make note event for rest of the notes
  _.each(_.rest(chord), function (note, i) {
    arr.push(makeNoteEvent(0, on, i + firstChannel, noteValue(note), velocity));
  });

  return Buffer.concat(arr);
}
function ( deltaTime , on , firstChannel , chord , velocity ) { var arr = [ ] ; // Make note event for first note after appropriate time arr . push ( makeNoteEvent ( deltaTime , on , firstChannel , noteValue ( _ . first ( chord ) ) , velocity ) ) ; // Make note event for rest of the notes _ . each ( _ . rest ( chord ) , function ( note , i ) { arr . push ( makeNoteEvent ( 0 , on , i + firstChannel , noteValue ( note ) , velocity ) ) ; } ) ; return Buffer . concat ( arr ) ; }
Make a multiple MIDI note events for a given chord
Make a multiple MIDI note events for a given chord