setup_ducking
Builds an audio ducking curve with keyframes for pre-fade, duck-in, duck-out, and post-fade transitions, lowering music or SFX around speech or effects.
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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"clipId": "<clipId>",
"baseDb": "<baseDb>",
"duckingWindows": "<duckingWindows>"
},
"name": "setup_ducking"
}
}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. |