AudioTrack

interface AudioTrack extends Track { uuid: string owner: AnyAudioUnit | AnyModulator audioUnit: Nullable<AnyAudioUnit> enabled: boolean excludePianoMode: boolean index: number type: 'audio' regions: readonly AudioRegion[] clips: readonly AudioClip[] remove(): void addRegion(sample: Sample, props?: AudioRegionProps): AudioRegion addClip(sample: Sample, props?: AudioClipProps): AudioClip }

Track holding audio regions and clips (Tape units)

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: 'audio'

readonly

Overrides type

Always "audio"

regions: readonly AudioRegion[]

readonly

All regions sorted by position

clips: readonly AudioClip[]

readonly

All clips sorted by slot index

Methods

remove(): void

Inherited from remove

Remove this track including its regions and clips

Returns

  • void

addRegion(sample: Sample, props?: AudioRegionProps): AudioRegion

Add an audio region. Default playback is "pitch" when the sample has a tempo, otherwise "no-sync". Default duration is the sample length. Throws if it overlaps an existing region

Parameters

Returns

Example

CODE
const tape = project.addInstrumentUnit("Tape", {label: "Loop"})
tape.audioTracks[0].addRegion(sample, {position: PPQN.Bar, playback: "timestretch"})

addClip(sample: Sample, props?: AudioClipProps): AudioClip

Add an audio clip (default: next free slot)

Parameters

Returns