Class MidiIn

The MidiIn class is an implementation of IMidiIn, which receives MIDI messages from a connected MIDI port and distributes in a more easily consumable format.

Hierarchy

  • MidiIn

Implements

Constructors

  • Parameters

    • Optional port: any

      The MIDI port which data gets received from, see the MidiAccess class.

    Returns MidiIn

Accessors

  • get noteOff(): MidiInEvent<NoteOffMessage>
  • The noteOff property can be subscribed to, to receive all Note Off messages that pass through the MidiIn object.

    Returns MidiInEvent<NoteOffMessage>

  • get noteOn(): MidiInEvent<NoteOnMessage>
  • The noteOn property can be subscribed to, to receive all Note On messages that pass through the MidiIn object.

    Returns MidiInEvent<NoteOnMessage>

  • get port(): any
  • The MIDI port which data gets received from, see the MidiAccess class.

    Setting this property automatically unsubscribes from any previously connected MIDI port, and also automatically subscribes to the newly set MIDI port.

    Returns any

  • set port(value: any): void
  • Parameters

    • value: any

    Returns void

  • get start(): MidiInEvent<StartMessage>
  • The start property can be subscribed to, to receive all Start messages that pass through the MidiIn object.

    Returns MidiInEvent<StartMessage>

  • get stop(): MidiInEvent<StopMessage>
  • The stop property can be subscribed to, to receive all Stop messages that pass through the MidiIn object.

    Returns MidiInEvent<StopMessage>

  • get tick(): MidiInEvent<TickMessage>
  • The tick property can be subscribed to, to receive all timing clock messages that pass through the MidiIn object.

    Returns MidiInEvent<TickMessage>

  • get typeName(): string
  • Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.

    Returns string

Methods

  • The receiveData method allows for raw MIDI message data to be passed in, which will then be analysed, and trigger an event for whichever MIDI event type it corresponds to.

    Parameters

    Returns void

Generated using TypeDoc