Measure Beat Grid
lab_beatgridMeasure the TEMPO of the sequence's bound music track and store the beat grid — opens the real file with ffmpeg and analyses it, no guessing and no provider, so it costs nothing but a few seconds. Writes bpm and metadata.beat_grid on the audio row; it does NOT touch the timeline (timeline_geaendert: false). Deterministic and cached: a second call returns the same numbers without downloading again (pass neu_messen to force). READ confidence AND verlaesslich BEFORE YOU CUT. Below the threshold (0.35) lab_apply_rhythm computes durations but deliberately does NOT snap them to the grid — that is a decision, not a failure. Soft material measures badly: a real swing track came out at 0.164, an ordered hard pulse (techno, 128 bpm) at 0.621. Half and double tempo are the classic misreads, so bpm_alternativen is part of the answer. frame_konflikt reports the collision between beat grid and frame grid, for BOTH renderers: export (24 fps, the delivered MP4) and murnau (25 fps, the editor timeline). Read frames_pro_schlag as a DEVIATION, not a count: it is how far one beat sits from a whole frame, between 0 and 0.5. 0 means beat and frame coincide (100, 125 and 150 bpm at 25 fps do); anything above means beat-accurate and frame-accurate cannot both hold, and the rounding error accumulates across clips — measured on a finished MP4 at 128 bpm: up to 64.7 ms off the audible beat although every cut point had snapped. Shown here, not fixed: that decision belongs to a human. Refusals that name their own remedy: 409 without a bound music track (run lab_bind_audio), 409 when the track is pending (poll lab_list_audio), 502/504 when the audio host is unreachable or slow, 422 when the file carries no usable audio, 503 when ffmpeg is missing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| takt | No | Beats per bar (default 4). INPUT, not detection — time-signature detection is explicitly out of scope. It only affects where the downbeats fall, which is what the rhythm 'auf die Songstruktur' snaps to | |
| seq_id | Yes | Sequence id (from lab_create_sequence/lab_list_sequences) — positive integer as string | |
| neu_messen | No | Measure again even though a result for this exact file already exists. Default false. The measurement is deterministic — the same file gives the same number, so this only helps after the track behind the url was swapped |