InstrumentCompositeLayer

interface InstrumentCompositeLayer extends MIDIEffectHost, AudioEffectHost { midiEffects: readonly AnyMIDIEffect[] audioEffects: readonly AnyAudioEffect[] uuid: string composite: InstrumentComposite index: number instrument: Vaporisateur | Playfield | Nano | Soundfont | Neon | Tubular | Cubed | Apparat | InstrumentComposite gain: number pan: number mute: boolean solo: boolean minimized: boolean 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] setInstrument<K extends 'Vaporisateur' | 'Playfield' | 'Nano' | 'Soundfont' | 'Neon' | 'Tubular' | 'Cubed' | 'Apparat' | 'InstrumentComposite'>(key: K, props?: DeepPartial<LayerInstruments[K]>): LayerInstruments[K] remove(): void }

One layer of an InstrumentComposite: an instrument with its own MIDI and audio effect chains and its own strip

Hierarchy


Properties

midiEffects: readonly AnyMIDIEffect[]

readonly

Inherited from midiEffects

MIDI effects ordered by index

audioEffects: readonly AnyAudioEffect[]

readonly

Inherited from audioEffects

Audio effects ordered by index

uuid: string

readonly

Unique id

composite: InstrumentComposite

readonly

The composite this layer belongs to

index: number

readonly

Position in the composite

instrument: Vaporisateur | Playfield | Nano | Soundfont | Neon | Tubular | Cubed | Apparat | InstrumentComposite

readonly

The instrument this layer plays

gain: number

Layer gain in dB (default 0)

pan: number

Pan (-1.0 to 1.0, default 0.0)

mute: boolean

Mute the layer (it keeps running, unmuting is instant)

solo: boolean

Solo the layer

minimized: boolean

Collapse the layer editor

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

Parameters

  • key (K) — Effect type
  • props (DeepPartial<MIDIEffects[K]>, optional) — Initial parameter values
  • index (number, optional) — Insert position (default: end of chain)

Returns

Example

CODE
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

Parameters

  • key (K) — Effect type
  • props (DeepPartial<AudioEffects[K]>, optional) — Initial parameter values
  • index (number, optional) — Insert position (default: end of chain)

Returns

Example

CODE
synth.addAudioEffect("Delay", {delay: 13, feedback: 0.4, wet: -9})
const composite = synth.addAudioEffect("Composite")
composite.addEntry({label: "Crushed"}).addAudioEffect("Crusher", {bits: 8})

setInstrument< K extends 'Vaporisateur' | 'Playfield' | 'Nano' | 'Soundfont' | 'Neon' | 'Tubular' | 'Cubed' | 'Apparat' | 'InstrumentComposite', >( key: K, props?: DeepPartial<LayerInstruments[K]>, ): LayerInstruments[K]

Replace the layer's instrument. The layer keeps its strip and its effect chains

Type Parameters

Parameters

  • key (K) — Instrument type
  • props (DeepPartial<LayerInstruments[K]>, optional) — Instrument settings

Returns

remove(): void

Remove the layer with its instrument and effects

Returns

  • void