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