Apply Rhythm to Timeline
lab_apply_rhythmCompute the sequence's clip durations from the project's cutting preset and — when the tempo allows it — pull the cut points onto the measured beat grid. WRITES the timeline; costs nothing. The old duration of every changed clip is kept in clip.metadata.dauer_vorher, so one undo step exists (a second differing run overwrites it — there is no history). Clip count is never changed: no clip is added or removed. SNAPPING IS NOT GUARANTEED, AND A REFUSAL TO SNAP IS A RESULT, NOT A FAILURE — read gerastet and raster.grund before you repeat anything: 'tempo_unverlaesslich' = measured below the confidence threshold (deliberate; pass trotz_unsicherem_tempo to override), 'nicht_gemessen' = run lab_beatgrid first, 'keine_musikspur'/'musikspur_nicht_aufgeloest' = run lab_bind_audio first, 'rhythmus_ohne_raster' = the preset's rhythm is 'frei' or 'atmend', which means not snapping IS the promise ('auf den Beat', 'auf die Songstruktur' and 'gegen den Takt' are the three that snap), 'toleranz_null' = you passed toleranz_s 0. In every one of those cases the durations are still recomputed from the preset and written — that alone is the difference between 40 and 6 cuts over 30 seconds. Also read raster.getroffen of raster.von: gerastet: true only says snapping ran; this pair says whether it landed. And geklemmt lists clips the renderer's own duration clamp moved back OFF the grid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seq_id | Yes | Sequence id (from lab_create_sequence/lab_list_sequences) — positive integer as string | |
| toleranz_s | No | How far a cut point may travel to land on a beat, in seconds (default 0.12 — three frames at 25 fps). 0 disables snapping entirely and only recomputes the durations | |
| trotz_unsicherem_tempo | No | Snap onto a grid whose own measurement reports `verlaesslich: false`. Default false, and that default is the honest one: below the threshold the detector has not confirmed it found the pulse. Set it only as a deliberate decision — the answer then carries raster.unsicheres_tempo_uebergangen: true |