NoteEvent

interface NoteEvent { uuid: string position: number duration: number pitch: number velocity: number cents: number playCount: number playCurve: number repeatLength: number velocityFade: number chance: number group: Nullable<NoteGroup> leaveGroup(): void remove(): void }

A single note


Properties

uuid: string

readonly

Unique id

position: number

Start position in PPQN relative to the region or clip

duration: number

Length in PPQN (at least 1)

pitch: number

MIDI pitch (0 to 127, 60 = middle C)

velocity: number

Velocity (0.0 to 1.0)

cents: number

Fine-tuning in cents (-50 to 50)

playCount: number

Repeat count (1 to 128)

playCurve: number

Repeat timing curve (-1.0 to 1.0)

repeatLength: number

Length of each repeat (0.0 to 1.0, 1.0 = the full repeat), only with a play count above 1

velocityFade: number

Velocity ramp over the repeats (-1.0 fades out, 1.0 fades in, 0.0 = none), only with a play count above 1

chance: number

Probability in percent (0 to 100). For a grouped note this is the chance of its group

group: Nullable<NoteGroup>

readonly

The chance group of the note, or null

Methods

leaveGroup(): void

Take the note out of its group, it plays with chance 100 again

Returns

  • void

remove(): void

Remove the note

Returns

  • void