Module autocut_ui

Source
Expand description

Auto-cut pane (non-blocking; the timeline stays usable while it is open). Works on the selected audio clips (a selected video clip uses its linked audio). Controls: threshold (dBFS slider -80..0), min silence, min speech, padding (DragValues), “Keep: loud parts / quiet parts” toggle, “Ripple (close gaps)” checkbox. It shows the detected segments live (count + total kept seconds) and publishes them to overlay (timeline time ranges to KEEP, per selected clip) so the timeline can shade them; buttons: “Split only” (cuts at the boundaries, removes nothing), “Apply” (Project::auto_cut with the cuts and the quiet ranges; linked video follows), “Clear”. Peaks come from WaveformCache (None while computing → “analysing…”); detection uses engine::autocut. Undo once per Apply/Split. Returns what changed.

Structs§

AutoCutState
Detection 🔒
Detection result for one audio clip (timeline seconds).

Functions§

audio_targets 🔒
Selected clips mapped to the audio clips to analyse (video → its linked audio), deduplicated.
keep_ranges 🔒
Complement of remove inside [start, end) — the ranges that survive the cut.
show
sort_right_to_left 🔒
Apply’s ripple shifts every later clip left, which invalidates the absolute times cached for them — so applying right-to-left keeps each detection valid until it has been used.