Class NoteOnMessage

The NoteOnMessage class represents a Note On MIDI message that can be sent to a MIDI output.

Hierarchy

  • MidiMessageBase

    Hierarchy

    • NoteOnMessage

Implements

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • pitch: string | number

      Acceptable values range from 0 to 127. Alternatively the pitch can be supplied by name.

    • velocity: number

      Acceptable values range from 0 to 127.

    • channel: number

      Acceptable values range from 0 to 15.

    Returns NoteOnMessage

Properties

channel: number = 0

Acceptable values range from 0 to 15.

pitch: number = 0

Acceptable values range from 0 to 127.

velocity: number = 0

Acceptable values range from 0 to 127.

Accessors

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

    Returns string

Methods

  • The toArray method converts a MIDI message object into it's byte-array form which can be sent through a MIDI port to a connected piece of MIDI technology.

    Returns number[]

Generated using TypeDoc