NoteClip

interface NoteClip extends Clip, NoteEventOwner { uuid: string index: number duration: number mute: boolean label: string hue: number launch: ClipPlayback events: readonly NoteEvent[] track: NoteTrack remove(): void addEvent(props?: NoteEventProps): NoteEvent addEvents(events: readonly Partial<Pick<NoteEvent, 'pitch' | 'position' | 'duration' | 'velocity' | 'cents' | 'playCount' | 'playCurve' | 'chance'>>[]): readonly NoteEvent[] clearEvents(): void }

Clip holding notes

Hierarchy


Properties

uuid: string

readonly

Inherited from uuid

Unique id

index: number

Inherited from index

Slot index in the clip launcher

duration: number

Inherited from duration

Length in PPQN (seconds for non-synced audio clips)

mute: boolean

Inherited from mute

Mute the clip

label: string

Inherited from label

Custom label

hue: number

Inherited from hue

Color hue (0 to 360)

launch: ClipPlayback

readonly

Inherited from launch

Launch settings

events: readonly NoteEvent[]

readonly

Inherited from events

All notes sorted by position

track: NoteTrack

readonly

The note track this clip belongs to

Methods

remove(): void

Inherited from remove

Remove the clip

Returns

  • void

addEvent(props?: NoteEventProps): NoteEvent

Inherited from addEvent

Add a note (defaults: position 0, duration 1/16, pitch 60, velocity 100/127)

Parameters

Returns

addEvents( events: readonly Partial<Pick<NoteEvent, 'pitch' | 'position' | 'duration' | 'velocity' | 'cents' | 'playCount' | 'playCurve' | 'chance'>>[], ): readonly NoteEvent[]

Inherited from addEvents

Add many notes at once

Parameters

Returns

Example

CODE
region.addEvents([60, 64, 67].map((pitch, index) => ({position: index * PPQN.Quarter, duration: PPQN.Quarter, pitch})))

clearEvents(): void

Inherited from clearEvents

Remove all notes

Returns

  • void