Skip to content

@liminal-hq/undertone / VoiceParams

Interface: VoiceParams ​

Defined in: types.ts:30

Properties ​

attack ​

attack: number

Defined in: types.ts:43


channelGains? ​

optional channelGains?: number[]

Defined in: types.ts:123

Per-speaker output gains for multichannel (up to 7.1) playback, in the Web-Audio-conventional order FL, FR, C, LFE, SL, SR, RL, RR (1-8 entries). Takes precedence over pan when set. Voices are folded down to stereo automatically when the context's destination has fewer channels.


cutGroup? ​

optional cutGroup?: number

Defined in: types.ts:149

Cut group: a new voice in the same (context, output, group) stops the previous voice in it with a very short fade, like a hi-hat choke or a monophonic channel retriggering.


decay ​

decay: number

Defined in: types.ts:44


delayFeedback ​

delayFeedback: number

Defined in: types.ts:70

Feedback (0-1) for the orbit's shared delay bus.


delayLevel? ​

optional delayLevel?: number

Defined in: types.ts:66

Delay send level (0-1) to this voice's orbit bus. No send at all when undefined or 0.


delayTime ​

delayTime: number

Defined in: types.ts:68

Delay time in seconds for the orbit's shared delay bus.


duration? ​

optional duration?: number

Defined in: types.ts:129

Gate length in seconds: the envelopes hold at their sustain level until this long after the voice starts, then release. Percussive (no hold) when undefined. The scheduler sets this from each event's pattern duration.


filterAttack ​

filterAttack: number

Defined in: types.ts:52


filterCutoff? ​

optional filterCutoff?: number

Defined in: types.ts:49

Base lowpass cutoff in Hz. No filter is created at all when undefined.


filterDecay ​

filterDecay: number

Defined in: types.ts:53


filterEnvAmount ​

filterEnvAmount: number

Defined in: types.ts:51

Hz the filter envelope adds on top of filterCutoff at its peak.


filterRelease ​

filterRelease: number

Defined in: types.ts:56


filterSustain ​

filterSustain: number

Defined in: types.ts:55

Fraction (0-1) between filterCutoff and its peak the decay stage settles to.


fmAttack? ​

optional fmAttack?: number

Defined in: types.ts:102

Modulator-depth envelope (reaches the full index after fmAttack). Without any of the four envelope fields the index is constant. Default 0.


fmDecay? ​

optional fmDecay?: number

Defined in: types.ts:104

Seconds for the modulator depth to fall to fmSustain × the index. Default 0.


fmEnvCurve? ​

optional fmEnvCurve?: "lin" | "exp"

Defined in: types.ts:110

Ramp shape of the modulator-depth envelope: 'exp' (default, as in Strudel) or 'lin'.


fmHarmonicity? ​

optional fmHarmonicity?: number

Defined in: types.ts:100

FM harmonicity (Strudel's fmh): modulator frequency ÷ carrier frequency. Non-integers give bell and metallic tones. Default 1.


fmIndex? ​

optional fmIndex?: number

Defined in: types.ts:98

FM modulation index (Strudel's fm): the modulator swings the carrier's frequency by index × modulator frequency, so the sound stays equally bright as the pitch changes. 0 or unset adds no FM nodes. Synth voices only.


fmRelease? ​

optional fmRelease?: number

Defined in: types.ts:108

Seconds for the modulator depth to fall to 0 after the gate closes. Default 0.


fmSustain? ​

optional fmSustain?: number

Defined in: types.ts:106

Fraction (0-1) of the index the modulator depth settles to. Default 1, or 0 when only fmDecay is set (as in Strudel).


fmWave? ​

optional fmWave?: OscType | ShapedWaveType

Defined in: types.ts:112

Modulator waveform — any oscillator or shaped waveform. Default 'sine'.


gainLevel ​

gainLevel: number

Defined in: types.ts:42


hpfCutoff? ​

optional hpfCutoff?: number

Defined in: types.ts:58

Static highpass cutoff in Hz, in series after the lowpass. No filter is created when undefined.


legato? ​

optional legato?: number

Defined in: types.ts:137

Gate length as a fraction of the event's own length in the pattern (1 = the whole event, 0.5 = half of it). Applied by the pattern scheduler when it turns events into voices, and forces a gate even in an ungated play(). Ignored when an explicit duration is set, and by playParams() (which has no event lengths).


nudgeTime ​

nudgeTime: number

Defined in: types.ts:114

Start-time offset in seconds, relative to the pattern's shared start time.


orbit? ​

optional orbit?: number

Defined in: types.ts:72

Which shared effects bus (see effects.ts's getOrbitBus()) this voice's room/delay sends target. Default 0.


pan? ​

optional pan?: number

Defined in: types.ts:116

Stereo position from -1 (hard left) to 1 (hard right). No panner node is created when undefined.


phaserRate? ​

optional phaserRate?: number

Defined in: types.ts:60

LFO rate in Hz driving a 4-stage allpass phaser. No phaser is created when undefined.


pitch? ​

optional pitch?: string | number

Defined in: types.ts:33

Note name ("c2", "a4", "f#3") or a raw Hz number. Ignored for noise sound types.


pitchAttack? ​

optional pitchAttack?: number

Defined in: types.ts:82

Seconds the pitch envelope takes to reach its offset (0 = starts there). Default 0.


pitchDecay? ​

optional pitchDecay?: number

Defined in: types.ts:84

Seconds the pitch envelope takes to return to the note. Default 0.1.


pitchEnvAmount? ​

optional pitchEnvAmount?: number

Defined in: types.ts:80

Pitch envelope depth in semitones (negative for a falling start): the pitch moves from the note to this offset over pitchAttack, then returns to the note over pitchDecay. Synth voices only. Unset or 0 means none.


pitchStepRate? ​

optional pitchStepRate?: number

Defined in: types.ts:92

Frames per second for pitchSteps. Default 140 (the frame rate of classic AdLib effects).


pitchSteps? ​

optional pitchSteps?: number[]

Defined in: types.ts:90

A stepped pitch curve as semitone offsets from the note, one per frame: the pitch jumps to each offset in turn and holds the last. Plain data, so a sound editor can store and replay it. Takes priority over the envelope and slide.


release ​

release: number

Defined in: types.ts:47


roomLevel? ​

optional roomLevel?: number

Defined in: types.ts:62

Reverb send level (0-1) to this voice's orbit bus. No send at all when undefined or 0.


roomSize ​

roomSize: number

Defined in: types.ts:64

Reverb decay character for the orbit's shared bus, roughly 1 (short) to 10 (long) — see effects.ts.


sampleBank? ​

optional sampleBank?: string

Defined in: types.ts:41

.bank(name) — tried as ${sampleBank}_${sampleName} before falling back to sampleName alone.


sampleName? ​

optional sampleName?: string

Defined in: types.ts:39

A name registered via registerSample() (see samples.ts). Takes precedence over soundType when set — set by s()/.s() for any word that isn't a synth SoundType.


slideTime ​

slideTime: number

Defined in: types.ts:74

Pitch glide (portamento) time in seconds; starts an octave above the target and slides down.


soundType ​

soundType: SoundType

Defined in: types.ts:31


sustain ​

sustain: number

Defined in: types.ts:46

Fraction (0-1) of gainLevel the decay stage settles to before release.


velocity? ​

optional velocity?: number

Defined in: types.ts:143

Strength of this note, multiplying the peak amplitude only (not the envelope shape or any other control). Lets one instrument keep its identity from a ghost note to an accent. Default 1.