builtins

Waveform

A time-domain envelope visualizer that draws the min/max amplitude of the signal over time. It sits in the chain as a pass-through, so audio flows through un…

A time-domain envelope visualizer that draws the min/max amplitude of the signal over time. It sits in the chain as a pass-through, so audio flows through unchanged.

waveform

Waveform - Time-domain envelope display showing min/max amplitude.

ParamTypeDescription
insignalInput signal
namestringDisplay label (optional)
optsrecordOptions (optional)

Options:

OptionTypeDefaultDescription
widthnumber / string200Width in pixels, or "100%" for full width
heightnumber / string50Height in pixels, or "100%" for full height
scalenumber1.0Amplitude multiplier (2.0 = zoom in 2x)
filledbooleantrueFilled envelope or line waveform

Displays the signal as a min/max envelope over time. In filled mode (default), shows a shaded region between the minimum and maximum amplitude at each point. In line mode (filled: false), draws a single center-line waveform similar to the oscilloscope.

// Basic waveform
osc("saw", 110) |> waveform(%) |> out(%, %)

scale

Amplitude multiplier for the displayed envelope. Useful when the signal is quiet and you want to see detail without changing the actual gain.

// Zoomed in for a quiet signal
osc("sin", 440) * 0.3 |> waveform(%, "quiet signal", {scale: 3.0}) |> out(%, %)

filled

Toggle between filled-envelope mode (true, default) and line-waveform mode (false). Line mode looks similar to the oscilloscope but without trigger stabilization.

// Line waveform
osc("sin", 440) |> waveform(%, {filled: false}) |> out(%, %)
// Wide filled envelope
osc("saw", 55) |> lp(%, 400) |> waveform(%, "bass", {width: 400, height: 80}) |> out(%, %)

Related: oscilloscope, spectrum