Skip to main content

Module waveform

Module waveform 

Source
Expand description

Audio waveform lane (ED.10 / M-EDIT).

You cannot splice on a sound you cannot see. The cutting room solved this with the mag track running beside the picture and a soundhead on the flatbed; we solve it with a waveform — the audio’s peak envelope made visible. downsample_peaks reduces a sea of samples to one min/max pair per horizontal bucket (drawing every sample is impossible and pointless — the envelope is what the eye actually reads); the AudioWaveform lane draws those buckets beneath the video track.

Decoding the recording’s audio into samples is gst work that lands with the render-integration pass; this chunk is the (pure, tested) envelope math + the lane that renders it.

Structs§

AudioWaveformProps
Props for the AudioWaveform component.
WaveBucket
The min/max amplitude envelope of one horizontal bucket of the waveform.

Functions§

AudioWaveform
The audio lane: the waveform envelope beneath the video track. Reads the peak buckets from context; renders a quiet baseline until the audio is decoded (render-integration).
bar_geometry 🔒
The horizontal (left%, width%) of bucket index of count, tiling the lane edge-to-edge (bar i spans [i/count, (i+1)/count]). Computing the width as the gap to the next bucket avoids cumulative rounding and lands the final bar exactly at 100%. Pure — the regression guard for the “bars render blank because they have no width” bug.
downsample_peaks
Reduce samples to buckets min/max envelopes — the peak-pair representation every scrubbable waveform uses. Pure + deterministic.
percent 🔒