setup_ducking
Automate audio ducking keyframes from a base level and duck windows. Set music bed levels and voiceover dips to keep dialogue intelligible.
Instructions
High-level wrapper around add_audio_keyframes that builds a ducking curve from a base level + ducking windows. Computes 4 keyframes per window (pre-fade, duck-in, duck-out, post-fade) plus boundary keyframes at clip start/end. Replaces the manual "8 keyframes per video" pattern from Sprint 3. Times are clip-source-time absolute (same convention as add_audio_keyframes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| baseDb | Yes | Sustained level in dB (e.g. -25 for music bed under voice) | |
| clipId | Yes | The ID of the music/SFX clip to apply ducking to | |
| clipEndTime | No | Clip end time anchor for last keyframe; if omitted, last duck window endTime + 1s is used | |
| fadeSeconds | No | Ramp time for each transition (default 0.2s = 6 frames @30fps) | |
| clipStartTime | No | Clip start time anchor for first keyframe (default 0) | |
| duckingWindows | Yes | Windows where the clip should duck below baseDb. Empty array = sustained baseDb only. |