if (0 !== format && 1 !== format && 2 !== format) {
    throw new Error(
      'Invalid MIDI file : MIDI format (' +
        format +
        '),' +