/** * Sound-design-on-cuts: drop a short SFX (whoosh, pop, swoosh) at * every cut point. Sound holds attention longer than visuals, and a * subtle whoosh-on-cut is the standard polish on every retention- * optimized vlog / short. * * We layer the SFX on top of the existing audio with a configurable * gain offset (default -8 dB so it doesn't fight the voice). One * ffmpeg pass — we read the SFX once and use the `adelay` filter to * shift one copy per cut point onto its target timestamp, then * `amix` everything down with the original audio. * * Pure logic here just builds the filter graph string; the tool * wrapper spawns ffmpeg. */ export interface SfxOnCutsOptions { /** Cut points in seconds. */ cutPoints: number[]; /** Total media duration (sec). Cuts >= total are dropped. */ totalSec: number; /** * SFX gain relative to original audio. Default -8 dB. Use -12 dB * for very subtle, -4 dB for prominent. */ sfxGainDb?: number; /** * Original-track sidechain duck depth (dB) at each cut. Default 0 * (no ducking). Use -3 to -6 to slightly dip the voice under the * whoosh — adds polish but harder to undo. */ duckDb?: number; /** * Min spacing (sec) between SFX hits. Default 0.25s — closer hits * get collapsed (fast machine-gun cuts shouldn't stack 8 whooshes). */ minSpacingSec?: number; } export interface SfxFilterGraph { /** * Complete `-filter_complex` value. Two inputs expected on the * ffmpeg command line: `[0:a]` (original) and `[1:a]` (sfx file). * The output label is `[mix]`. */ filterComplex: string; /** Number of SFX hits the graph emits (after deduplication). */ hits: number; } /** * Build a filter_complex that lays one SFX hit per cut point onto * the original audio, returning the result on label `[mix]`. * * Strategy: * 1. Drop cut points outside [0, totalSec) and dedupe by min spacing. * 2. For each hit i: `[1:a]adelay=Tms|Tms,volume=Gd[s_i]` produces a * gained, delayed copy of the SFX on its own label. (`Tms|Tms` * delays both stereo channels equally.) * 3. amix=inputs=N+1 sums the original + all SFX copies into [mix]. */ export declare function buildSfxOnCutsFilter(opts: SfxOnCutsOptions): SfxFilterGraph; //# sourceMappingURL=sfx-on-cuts.d.ts.map