PlayfieldSlot

interface PlayfieldSlot extends MIDIEffectHost, AudioEffectHost { midiEffects: readonly AnyMIDIEffect[] audioEffects: readonly AnyAudioEffect[] uuid: string playfield: Playfield sample: Sample note: number icon: string enabled: boolean minimized: boolean mute: boolean solo: boolean exclude: boolean polyphone: boolean gate: 0 | 1 | 2 pitch: number sampleStart: number sampleEnd: number attack: number release: number volume: number panning: number 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] remove(): void }

One slot (pad) of the Playfield drum machine

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

playfield: Playfield

readonly

The Playfield this slot belongs to

sample: Sample

readonly

The sample played by this slot

note: number

MIDI note triggering this slot (0 to 127)

icon: string

Icon name

enabled: boolean

Enable the slot

minimized: boolean

Collapse the slot editor

mute: boolean

Mute the slot

solo: boolean

Solo the slot

exclude: boolean

Exclusive: a new hit stops any other exclusive slot (hi-hat choke)

polyphone: boolean

Polyphonic playback (overlapping hits)

gate: 0 | 1 | 2

Gate mode: 0 = Off (play to end), 1 = On (stop on note-off), 2 = Loop

pitch: number

Pitch in cents (-1200 to 1200, default 0)

sampleStart: number

Sample start (0.0 to 1.0, default 0.0)

sampleEnd: number

Sample end (0.0 to 1.0, default 1.0)

attack: number

Attack in seconds (0.001 to 5.0, default 0.001)

release: number

Release in seconds (0.001 to 5.0, default 0.02)

volume: number

Volume in dB (default 0)

panning: number

Pan (-1.0 to 1.0, default 0.0)

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})

remove(): void

Remove the slot

Returns

  • void