Constructors

Accessors

  • get tempo(): number
  • Current MIDI Clock tempo

    Returns number

    current tempo in BPM.

    Throws

    MIDIValConfigurationError when computeClockTempo is not on.

Methods

  • Parameters

    • callback: Callback<[{
          channel: number;
          lsb: number;
          msb: number;
          parameter: "PITCH_BEND_SENSITIVITY" | "CHANNEL_FINE_TUNING" | "CHANNEL_COARSE_TUNING" | "TUNING_PROGRAM_CHANGE" | "TUNING_BANK_SELECT" | "MODULATION_DEPTH_CHANGE" | "MPE_CONFIGURATION_MESSAGE";
      }]>

    Returns UnregisterCallback

  • Parameters

    • callback: Callback<[{
          channel: number;
          lsb: number;
          msb: number;
          parameter: "PITCH_BEND_SENSITIVITY" | "CHANNEL_FINE_TUNING" | "CHANNEL_COARSE_TUNING" | "TUNING_PROGRAM_CHANGE" | "TUNING_BANK_SELECT" | "MODULATION_DEPTH_CHANGE" | "MPE_CONFIGURATION_MESSAGE";
      }]>

    Returns UnregisterCallback

  • Parameters

    • callback: Callback<[{
          channel: number;
          lsb: number;
          msb: number;
          parameter: "PITCH_BEND_SENSITIVITY" | "CHANNEL_FINE_TUNING" | "CHANNEL_COARSE_TUNING" | "TUNING_PROGRAM_CHANGE" | "TUNING_BANK_SELECT" | "MODULATION_DEPTH_CHANGE" | "MPE_CONFIGURATION_MESSAGE";
      }]>

    Returns UnregisterCallback

  • Parameters

    • callback: Callback<[{
          channel: number;
          lsb: number;
          msb: number;
          parameter: "PITCH_BEND_SENSITIVITY" | "CHANNEL_FINE_TUNING" | "CHANNEL_COARSE_TUNING" | "TUNING_PROGRAM_CHANGE" | "TUNING_BANK_SELECT" | "MODULATION_DEPTH_CHANGE" | "MPE_CONFIGURATION_MESSAGE";
      }]>

    Returns UnregisterCallback

  • Registers new callback on pitch bend message

    Parameters

    • callback: Callback<[{
          channel: number;
          value: number;
      }]>

      Callback that gets called on every pitch bend message. It gets value of the bend in the range of -1.0 to 1.0 using 16-bit precision (if supported by sending device).

    Returns UnregisterCallback

    Unregister callback.

  • Parameters

    • callback: Callback<[{
          channel: number;
          lsb: number;
          msb: number;
          parameter: "PITCH_BEND_SENSITIVITY" | "CHANNEL_FINE_TUNING" | "CHANNEL_COARSE_TUNING" | "TUNING_PROGRAM_CHANGE" | "TUNING_BANK_SELECT" | "MODULATION_DEPTH_CHANGE" | "MPE_CONFIGURATION_MESSAGE";
      }]>

    Returns UnregisterCallback

  • Parameters

    • callback: Callback<[{
          channel: number;
          lsb: number;
          msb: number;
          parameter: "PITCH_BEND_SENSITIVITY" | "CHANNEL_FINE_TUNING" | "CHANNEL_COARSE_TUNING" | "TUNING_PROGRAM_CHANGE" | "TUNING_BANK_SELECT" | "MODULATION_DEPTH_CHANGE" | "MPE_CONFIGURATION_MESSAGE";
      }]>

    Returns UnregisterCallback

  • Parameters

    • callback: Callback<[{
          channel: number;
          lsb: number;
          msb: number;
          parameter: "PITCH_BEND_SENSITIVITY" | "CHANNEL_FINE_TUNING" | "CHANNEL_COARSE_TUNING" | "TUNING_PROGRAM_CHANGE" | "TUNING_BANK_SELECT" | "MODULATION_DEPTH_CHANGE" | "MPE_CONFIGURATION_MESSAGE";
      }]>

    Returns UnregisterCallback

  • Type Parameters

    • const B extends Omnibus<{
          channelPressure: [{
              channel: number;
              command: number;
              data1: number;
              data2: number;
          }];
          clockContinue: [void];
          clockPulse: [void];
          clockStart: [void];
          clockStop: [void];
          controlChange: [{
              channel: number;
              command: number;
              control: number;
              data1: number;
              data2: number;
              value: number;
          }];
          noteOff: [{
              channel: number;
              command: number;
              data1: number;
              data2: number;
              note: number;
              velocity: number;
          }];
          noteOn: [{
              channel: number;
              command: number;
              data1: number;
              data2: number;
              note: number;
              velocity: number;
          }];
          pithchBend: [{
              channel: number;
              value: number;
          }];
          polyKeyPressure: [{
              channel: number;
              command: number;
              data1: number;
              data2: number;
          }];
          programChange: [{
              channel: number;
              command: number;
              data1: number;
              data2: number;
              program: number;
              value: number;
          }];
          registeredParameterData: [{
              channel: number;
              lsb: number;
              msb: number;
              parameter: "PITCH_BEND_SENSITIVITY" | "CHANNEL_FINE_TUNING" | "CHANNEL_COARSE_TUNING" | "TUNING_PROGRAM_CHANGE" | "TUNING_BANK_SELECT" | "MODULATION_DEPTH_CHANGE" | "MPE_CONFIGURATION_MESSAGE";
          }];
          sysex: [{
              BYTES_PER_ELEMENT: number;
              [toStringTag]: "Uint8Array";
              buffer: {
                  [toStringTag]: string;
                  byteLength: number;
                  slice: any;
              } | {
                  [species]: { readonly byteLength: number; slice: {}; readonly [Symbol.species]: ...; readonly [Symbol.toStringTag]: "SharedArrayBuffer"; };
                  [toStringTag]: "SharedArrayBuffer";
                  byteLength: number;
                  slice: any;
              };
              byteLength: number;
              byteOffset: number;
              length: number;
              [iterator]: any;
              at: any;
              copyWithin: any;
              entries: any;
              every: any;
              fill: any;
              filter: any;
              find: any;
              findIndex: any;
              forEach: any;
              includes: any;
              indexOf: any;
              join: any;
              keys: any;
              lastIndexOf: any;
              map: any;
              reduce: any;
              reduceRight: any;
              reverse: any;
              set: any;
              slice: any;
              some: any;
              sort: any;
              subarray: any;
              toLocaleString: any;
              toString: any;
              valueOf: any;
              values: any;
          }];
      }, "">
    • const T extends "pithchBend" | "sysex" | "channelPressure" | "noteOn" | "noteOff" | "controlChange" | "programChange" | "polyKeyPressure" | "clockPulse" | "clockStart" | "clockStop" | "clockContinue" | "registeredParameterData"

    Parameters

    • event: T

    Returns Promise<B extends Omnibus<X, "">
        ? T extends keyof X
            ? ReverseParameters<X[T]>
            : never
        : never>

    UnregisterCallback if callback provided. Promise resolving to the event value otherwise.

  • Type Parameters

    • const B extends Omnibus<{
          channelPressure: [{
              channel: number;
              command: number;
              data1: number;
              data2: number;
          }];
          clockContinue: [void];
          clockPulse: [void];
          clockStart: [void];
          clockStop: [void];
          controlChange: [{
              channel: number;
              command: number;
              control: number;
              data1: number;
              data2: number;
              value: number;
          }];
          noteOff: [{
              channel: number;
              command: number;
              data1: number;
              data2: number;
              note: number;
              velocity: number;
          }];
          noteOn: [{
              channel: number;
              command: number;
              data1: number;
              data2: number;
              note: number;
              velocity: number;
          }];
          pithchBend: [{
              channel: number;
              value: number;
          }];
          polyKeyPressure: [{
              channel: number;
              command: number;
              data1: number;
              data2: number;
          }];
          programChange: [{
              channel: number;
              command: number;
              data1: number;
              data2: number;
              program: number;
              value: number;
          }];
          registeredParameterData: [{
              channel: number;
              lsb: number;
              msb: number;
              parameter: "PITCH_BEND_SENSITIVITY" | "CHANNEL_FINE_TUNING" | "CHANNEL_COARSE_TUNING" | "TUNING_PROGRAM_CHANGE" | "TUNING_BANK_SELECT" | "MODULATION_DEPTH_CHANGE" | "MPE_CONFIGURATION_MESSAGE";
          }];
          sysex: [{
              BYTES_PER_ELEMENT: number;
              [toStringTag]: "Uint8Array";
              buffer: {
                  [toStringTag]: string;
                  byteLength: number;
                  slice: any;
              } | {
                  [species]: { readonly byteLength: number; slice: {}; readonly [Symbol.species]: ...; readonly [Symbol.toStringTag]: "SharedArrayBuffer"; };
                  [toStringTag]: "SharedArrayBuffer";
                  byteLength: number;
                  slice: any;
              };
              byteLength: number;
              byteOffset: number;
              length: number;
              [iterator]: any;
              at: any;
              copyWithin: any;
              entries: any;
              every: any;
              fill: any;
              filter: any;
              find: any;
              findIndex: any;
              forEach: any;
              includes: any;
              indexOf: any;
              join: any;
              keys: any;
              lastIndexOf: any;
              map: any;
              reduce: any;
              reduceRight: any;
              reverse: any;
              set: any;
              slice: any;
              some: any;
              sort: any;
              subarray: any;
              toLocaleString: any;
              toString: any;
              valueOf: any;
              values: any;
          }];
      }, "">
    • const T extends "pithchBend" | "sysex" | "channelPressure" | "noteOn" | "noteOff" | "controlChange" | "programChange" | "polyKeyPressure" | "clockPulse" | "clockStart" | "clockStop" | "clockContinue" | "registeredParameterData"
    • const Cb extends Callback<OmnibusParams<B, OmnibusKeysCheck<B, T>>>

    Parameters

    • event: T
    • cb: Cb

      Optional callback to be triggered. If not provided, Promise with the result is returned instead

    Returns UnregisterCallback

    UnregisterCallback if callback provided. Promise resolving to the event value otherwise.

  • Returns new MIDIValInput object based on the interface id.

    Parameters

    • interfaceId: string

      id of the interface from the MIDIAcces object.

    • Optional options: MIDIValInputOptions

    Returns Promise<MIDIValInput>

    Promise resolving to MIDIValInput.

    Throws

    MIDIValError when interface id is not found.

  • Finds first interface matching the name

    Parameters

    • interfaceName: string

      interface Name

    • Optional options: MIDIValInputOptions

      input configuration options

    Returns Promise<MIDIValInput>

    MIDIValInput object

    Throws

    MIDIValError when no interface with that name is found

Generated using TypeDoc