NoteTrack

interface NoteTrack extends Track { uuid: string owner: AnyAudioUnit | AnyModulator audioUnit: Nullable<AnyAudioUnit> enabled: boolean excludePianoMode: boolean index: number type: 'notes' regions: readonly NoteRegion[] clips: readonly NoteClip[] remove(): void addRegion(props?: NoteRegionProps): NoteRegion addClip(props?: NoteClipProps): NoteClip }

Track holding note regions and clips

Hierarchy


Properties

uuid: string

readonly

Inherited from uuid

Unique id

owner: AnyAudioUnit | AnyModulator

readonly

Inherited from owner

The audio unit or modulator this track belongs to

audioUnit: Nullable<AnyAudioUnit>

readonly

Inherited from audioUnit

The audio unit this track belongs to (null for modulator automation lanes)

enabled: boolean

Inherited from enabled

Enable or disable the track

excludePianoMode: boolean

Inherited from excludePianoMode

Keep the track out of piano mode

index: number

readonly

Inherited from index

Position within the owner

type: 'notes'

readonly

Overrides type

Always "notes"

regions: readonly NoteRegion[]

readonly

All regions sorted by position

clips: readonly NoteClip[]

readonly

All clips sorted by slot index

Methods

remove(): void

Inherited from remove

Remove this track including its regions and clips

Returns

  • void

addRegion(props?: NoteRegionProps): NoteRegion

Add a region (default duration one bar). Throws if it overlaps an existing region

Parameters

Returns

Example

CODE
const region = synth.noteTracks[0].addRegion({duration: PPQN.Bar * 2, loopDuration: PPQN.Bar})
region.addEvent({position: 0, duration: PPQN.Quarter, pitch: 60})

addClip(props?: NoteClipProps): NoteClip

Add a clip (default: next free slot, one bar)

Parameters

Returns