Open source CapCut alternative.
TypeScript
docs: a clip's own sound treatment
David Le8a1dd1d94316
diff --git a/docs/guides/cut/README.md b/docs/guides/cut/README.mdindex 15ec440d..3a8b95e0 100644--- a/docs/guides/cut/README.md+++ b/docs/guides/cut/README.md@@ -40,6 +40,8 @@ The client probes the engine's health endpoint (dedicated port first, dev server**An effect treats what runs under it.** An effect is a stretch of the timeline rather than a property of a clip, so it can cover part of a shot, a whole one, or a run of them, and it is trimmed and moved like any other element. Some of them treat the picture — a grade, a grain, a shake, a push in — and some treat the sound: everything audible under the window, clip audio, upper tracks and soundtrack, mixed and then filtered as one. The sound treatments are described as data — a dry level, delay taps, filter bands, a tremolo, a bit crush — and three renderers read that one description: the Web Audio graph the preview plays, the same graph folded offline for an in-tab export, and an ffmpeg chain for the engine and the cloud worker. That is what keeps the export sounding like the preview; the ffmpeg side cuts the window out of the mix, runs the chain over it, and pads the result back to the length it went in at, so a chain that rings past its window cannot walk the rest of the sound late. The window's edges cross over rather than switch, in both mixes, so an effect coming in cannot click. A picture effect can be shown on its tile; a sound treatment has to be heard, so the tile plays — a line of recorded speech run through the same chain the mix would build. The line is one of the voice personas already shipped with the site, fetched once and kept decoded for the session, so the shelf demonstrates itself in a project with no footage in it yet.+**A clip carries its own sound treatment.** Beside the volume in the Inspector's Audio tab, a clip — a video clip's own sound or a soundtrack clip — has a Sound quality section: a seven-band equalizer, a compressor and a limiter. The treatment belongs to the clip and runs on its sound alone, ahead of its level, fades and any ducking, so shaping a voice never colors the music under it. It is described with the same recipe the sound effects use and read by the same three renderers, which is what keeps the preview, the in-tab export and the ffmpeg export on one sound; the compressor and the limiter are dynamics stages on that recipe, spelled as ffmpeg's compressor and lookahead limiter on one side and the browser's dynamics node on the other. The band frequencies are fixed, so a treatment is seven decibel values and two small stages, which is what makes it a preset: the editor ships a flat one and a voice one, and the user saves their own to the Library, where a preset is a template carrying nothing but a treatment — every shelf stores and lists it with the machinery templates already have, and the template shelf leaves it out. The assistant applies and saves the same presets by name.+**A handover is on the picture or on the sound.** A transition is a blend at the cut rather than an overlap: the clips still abut, the layout never moves, and the incoming clip starts exactly at the cut. Most styles blend the picture across the outgoing clip's last seconds. The cross dissolve hands over on the sound instead — the picture cuts while the two clips ramp past each other, half the handover either side of it. Its bar sits across the cut for that reason, where every other bar ends on the boundary it plays. The two windows sit on separate fields, so everything that draws the picture reads a plain cut and only the mix ramps: the preview, the in-tab export, and the ffmpeg graph the engine and the worker build all follow from that one split. A sound handover needs a second clip's sound to cross into, so a bar of it parked on a clip's open head or tail plays nothing.**A crossing needs handle, and holds its loudness.** Clips never overlap, so for the length of a cross dissolve each one plays into the other's time out of its handle — the media its trim left behind, the outgoing clip past its out point and the incoming clip before its in point. That is what makes both sides really audible over a cut their pictures hard-join, and it is why the ramps are equal-power (sine and cosine) rather than straight lines: two signals meeting at half level sum to the loudness they each had, so the mix never dips through the join. A clip trimmed to the end of its source has no handle to reach into; its side of the crossing stops at the cut, and the handover reads as a dip instead of a crossing. Every renderer works from the same two numbers on a span — how far the crossing runs, and how far each side reaches — so the preview, the browser fold and the ffmpeg graph land on one sound. It opens at 0.3 seconds, shorter than a picture blend's half second: that covers the jump in room tone at a cut while staying under the length where the ear starts hearing two voices, and it asks less of the trim each clip has left. It is picked where the other work on the sound is picked — the Effects tab's Sound family — while the styles that blend the picture are picked from the Transitions tab. A bar can also be hidden, like anything else on the timeline: it grays out and plays nothing while keeping the cut it sits on, so the joint runs hard and the blend is one click away again.