BusAudioUnit
interface BusAudioUnit extends AudioUnit {
midiEffects: readonly AnyMIDIEffect[]
audioEffects: readonly AnyAudioEffect[]
uuid: string
kind: AudioUnitKind
label: string
output: Nullable<AuxAudioUnit | GroupAudioUnit | OutputAudioUnit>
volume: number
panning: number
mute: boolean
solo: boolean
index: number
tracks: readonly AnyTrack[]
noteTracks: readonly NoteTrack[]
audioTracks: readonly AudioTrack[]
valueTracks: readonly ValueTrack[]
icon: string
color: string
addMIDIEffect<K extends keyof MIDIEffects>(key: K, props?: DeepPartial<MIDIEffects[K]>, index?: number): MIDIEffects[K]
addAudioEffect<K extends keyof AudioEffects>(key: K, props?: DeepPartial<AudioEffects[K]>, index?: number): AudioEffects[K]
addNoteTrack(props?: Partial<Pick<Track, 'enabled'>>, index?: number): NoteTrack
addAudioTrack(props?: Partial<Pick<Track, 'enabled'>>, index?: number): AudioTrack
addValueTrack<T extends Automatable>(target: T, parameter: ParameterPath<T>, props?: Partial<Pick<Track, 'enabled'>>, index?: number): ValueTrack
valueTrack<T extends Automatable>(target: T, parameter: ParameterPath<T>): Nullable<ValueTrack>
remove(): void
}Common surface of aux, group and output units
- See:
Hierarchy
Properties
midiEffects: readonly AnyMIDIEffect[]
Inherited from midiEffects
MIDI effects ordered by index
audioEffects: readonly AnyAudioEffect[]
Inherited from audioEffects
Audio effects ordered by index
uuid: string
Inherited from uuid
Unique id
kind: AudioUnitKind
Inherited from kind
Unit type identifier
label: string
Inherited from label
Custom label
output: Nullable<AuxAudioUnit | GroupAudioUnit | OutputAudioUnit>
Inherited from output
Output routing (null = unplugged). Defaults to the primary output
volume: number
Inherited from volume
Volume in dB (-96 to 6, default 0)
panning: number
Inherited from panning
Pan (-1.0 = left, 0.0 = center, 1.0 = right)
mute: boolean
Inherited from mute
Mute
solo: boolean
Inherited from solo
Solo
index: number
Inherited from index
Position in the project (instruments first, then aux, groups, output)
tracks: readonly AnyTrack[]
Inherited from tracks
All tracks ordered by index
noteTracks: readonly NoteTrack[]
Inherited from noteTracks
Note tracks
audioTracks: readonly AudioTrack[]
Inherited from audioTracks
Audio tracks
valueTracks: readonly ValueTrack[]
Inherited from valueTracks
Automation tracks
icon: string
Icon name (see IconSymbol)
color: string
CSS color of the bus
Methods
addMIDIEffect<
K extends keyof MIDIEffects,
>(
key: K,
props?: DeepPartial<MIDIEffects[K]>,
index?: number,
): MIDIEffects[K]
Inherited from addMIDIEffect
Add a MIDI effect
Type Parameters
Kextendskeyof MIDIEffects
Parameters
key(K) — Effect typeprops(DeepPartial<MIDIEffects[K]>, optional) — Initial parameter valuesindex(number, optional) — Insert position (default: end of chain)
Returns
Example
synth.addMIDIEffect("Arpeggio", {rate: 9, octaves: 2})addAudioEffect<
K extends keyof AudioEffects,
>(
key: K,
props?: DeepPartial<AudioEffects[K]>,
index?: number,
): AudioEffects[K]
Inherited from addAudioEffect
Add an audio effect
Type Parameters
Kextendskeyof AudioEffects
Parameters
key(K) — Effect typeprops(DeepPartial<AudioEffects[K]>, optional) — Initial parameter valuesindex(number, optional) — Insert position (default: end of chain)
Returns
Example
synth.addAudioEffect("Delay", {delay: 13, feedback: 0.4, wet: -9})
const composite = synth.addAudioEffect("Composite")
composite.addEntry({label: "Crushed"}).addAudioEffect("Crusher", {bits: 8})addNoteTrack(
props?: Partial<Pick<Track, 'enabled'>>,
index?: number,
): NoteTrack
Inherited from addNoteTrack
Add a note track (only meaningful for note instruments)
Parameters
props(Partial<Pick<Track, "enabled">>, optional)index(number, optional)
Returns
addAudioTrack(
props?: Partial<Pick<Track, 'enabled'>>,
index?: number,
): AudioTrack
Inherited from addAudioTrack
Add an audio track (only meaningful for audio instruments like Tape)
Parameters
props(Partial<Pick<Track, "enabled">>, optional)index(number, optional)
Returns
addValueTrack<
T extends Automatable,
>(
target: T,
parameter: ParameterPath<T>,
props?: Partial<Pick<Track, 'enabled'>>,
index?: number,
): ValueTrack
Inherited from addValueTrack
Add an automation track for a parameter
Type Parameters
TextendsAutomatable
Parameters
target(T) — Any automatable object (this unit, a device, a send, ...)parameter(ParameterPath<T>) — Parameter path, e.g."cutoff"or"lfo.rate"props(Partial<Pick<Track, "enabled">>, optional)index(number, optional)
Returns
Example
const lane = synth.addValueTrack(synth.instrument, "cutoff")
lane.addRegion({duration: PPQN.Bar * 4}).addEvents([
{position: 0, value: 0.2},
{position: PPQN.Bar * 4, value: 0.9}
])valueTrack<
T extends Automatable,
>(
target: T,
parameter: ParameterPath<T>,
): Nullable<ValueTrack>
Inherited from valueTrack
The automation track controlling a parameter, if any
Type Parameters
TextendsAutomatable
Parameters
target(T)parameter(ParameterPath<T>)
Returns
remove(): void
Inherited from remove
Remove this unit including all its tracks and devices (the output cannot be removed)
Returns
void