Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a Note.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Note(key?: number, velocity?: number, channel?: number): Note
  • Creates a note object with the specified values.

    Parameters

    • Optional key: number

      The key for this note message, defaults to 0.

    • Optional velocity: number

      The velocity for this note message, defaults to 127.

    • Optional channel: number

      The channel for this channel pressure message, defaults to 1.

    Returns Note

Properties

channel

channel: number | 1

The channel for this MIDI message.

Optional id

id: ObjectID | undefined

The identifier of this object.

key

key: number | 0

The key for this note

on

on: boolean

Returns true if this Note is a "note on" message.

velocity

velocity: number | 127

The velocity for this note

Methods

withChannel

  • withChannel(channel: number): Note
  • Returns a new Note which has the same key and velocity as this one, but with a different channel.

    Parameters

    • channel: number

    Returns Note

withKey

  • withKey(key: number): Note
  • Returns a new Note which has the same velocity and channel as this one, but with a different key.

    Parameters

    • key: number

    Returns Note

withVelocity

  • withVelocity(velocity: number): Note
  • Returns a new Note which has the same key and channel as this one, but with a different velocity.

    Parameters

    • velocity: number

    Returns Note

Generated using TypeDoc