stopmotion-video
Rules, Remotion helpers and audio scripts for stop-motion style video cut to music, proposing Remotion by default to make it. A low frame rate is kept on purpose, with one pose per eighth note of the song. Pages start on bar lines, clicks land on kicks and snares, and the skill teaches when to skip a beat. Use when making or reviewing stop-motion, low frame rate, beat-synced or music-synced video. Also use for cutting a video to a song, Remotion launch films cut to a track, compositions timed to a BPM, metronome or click tracks, kinetic type timed to a beat, or scenes played live on a web page in time with a metronome. It covers measuring a song's tempo, bars and drops, and deciding where a cut, a click, a hold or a transition should land.
Install
npx skills add https://github.com/kosta4a/stopmotion-video --skill stopmotion-videoSound
How clicks are placed on the song's hits to the sample, baked into one track, given room in the mix, and checked against a metronome.
Contents
- Every click on a hit
- Place it to the sample
- One click track from frame 0
- A richer click, tuned to the song
- Room in the mix
- The metronome
- Bake again when something moves
- Rights
1. Every click on a hit
- Every click sound goes on the song's own drum hit, a kick or a snare, on the pose the press is drawn on. The click then sits in place of the hit rather than next to it.
- The click and its press are one event. Keep a single list of click poses that the scenes and the audio bake both read. A click component whose pose isn't in the list warns in the console.
2. Place it to the sample
- A pose's first frame isn't the hit. The film's hits landed 25ms after its poses, measured at the steepest rise of their high end: 23 to 29ms, from the excerpt's 23ms lead. A click placed on the pose's first frame landed anywhere from 21ms ahead of its hit to 7ms behind it.
- Place the tick to the sample at the hit:
pose × 60 / TEMPO / 2 + lag. With a 25ms lag, the film's ticks measured within 3ms of their hits in a render. - Give the click file 40ms of quiet before its tick. A renderer trims a sound that starts between frames to the sample, and that trim must only ever take quiet. Start the file 40ms before the hit, so the tick lands on it.
- The press is drawn on the pose's first frame, which falls between about 23ms ahead of its sound and 10ms after it (the film's arrow click led by 24ms; its copy click trailed by 5ms). The 30fps frame grid can't land it closer, and the picture reads best on or just ahead of the sound.
3. One click track from frame 0
- Bake every click into one track that starts on the video's first frame, as the music does.
- Why: a short sound started at its own frame comes in late in the Remotion Studio preview. A click that sounds on time in the render then sounds late while you review. One track from frame 0 keeps the clicks with the music and the metronome in the preview too.
- The bake, in plain Node over 16-bit PCM:
4. A richer click, tuned to the song
The designer's note: "add more bass / make richer click across all clicks we use; adapt it to song a bit".
- Keep the tick (the film's was a 65ms tick, raised 5dB) and lay a kick's thump under it. Keeping the tick where it is keeps every click on its hit.
- Tune the thump to the song's bass. Measure where the low end centres over the excerpt; the film's was B1, 61.7Hz. Use a sine that falls from 150Hz to that note in its first 25ms or so (an exponential with a 12ms time constant). It rises over 1.5ms and dies away over about 200ms (a 70ms time constant).
- Add its octave at 0.18, so it carries on laptop and phone speakers.
- Soft-limit it (tanh) to a peak 3.7dB under full scale, so the click and the music don't clip together.
- Only under a song. With no music over it, the thump reads as a dull "dum". A click played against a metronome alone keeps the tick and leaves the thump out (live.md [blocked] §6).
5. Room in the mix
Make room for each click with scripts/duck.mjs (skipping.md [blocked] has when to use which):
With --bpm, the times are poses counted from --offset, the time of pose 0's hit. Without it, they are seconds, so a click that falls outside the file stops the script: it most often means a forgotten --bpm. Bake from the clean excerpt every time and play the ducked copy; the script won't write over its input, by any path or link to it.
6. The metronome
Remotion has no metronome of its own, so make one for checking the picture against the song.
- A click on every song beat (two poses), on its hits: the same lag as the clicks.
- The first of each bar higher: 2kHz at 0.75, the others 1kHz at 0.6. Each is a sine burst with a 1ms rise and a 9ms fall away, 40ms in all.
- The music at 20% under it, so the clicks sit about 10dB over it.
- Its own compositions, one per cut (30fps and 60fps). It is never in the export.
- Checked in a render: the film's metronome clicks landed within 2ms of the song's hits.
- Played live with no song, the metronome is the music. Then it should sound like an ordinary, quiet metronome, a wooden knock, not this checking beep or a bright UI click (live.md [blocked] §6).
--beats counts song beats. A video of 268 poses is 134 song beats. --subdivision 2 adds a quieter click on every pose. That extra click is this script's choice, not the film's.
7. Bake again when something moves
8. Rights
A click sampled from a commercial track has to be cleared, or swapped for another, before the video is published. So does the song. Keep a note in the project of where each came from.