prod-by-claude
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseprod-by-claude
prod-by-claude
Turn a Strudel track into a live-coding video. The music is rendered offline from the code, and
the video is driven by Strudel's own note events, so every highlight lands on its note.
将 Strudel 曲目制作成 Live Coding 视频。音乐由代码离线渲染,视频则由 Strudel 自身的音符事件驱动,因此每个高亮都会精准落在对应音符上。
When to use
何时使用
- The user wants a video of Strudel code playing: "make a video of this Strudel track", "show the code lighting up", "live-coding video", or a track the agent composed for them.
- Not for other audio or DAW projects, talking-head videos, or visualizers of an existing audio file with no Strudel code (use the HyperFrames music workflow for those).
- 用户希望制作一段展示 Strudel 代码演奏的视频:"make a video of this Strudel track"、"show the code lighting up"、"live-coding video",或是一段由 Agent 为其创作的曲目。
- 不适用于其他音频或 DAW 项目、talking-head 视频,以及没有 Strudel 代码的现有音频文件可视化项目(此类情况使用 HyperFrames music workflow)。
Inputs
输入
- A Strudel track (), or a brief to compose one. Compose with references/composing.md. With no track, start from assets/example/track.strudel.js (synth-only, no samples).
.strudel.js - The arrangement: length in bars, and which bars are builds and drops.
- 一个 Strudel 曲目(),或一份用于创作曲目的需求说明。使用 references/composing.md 进行创作。如果没有曲目,则以 assets/example/track.strudel.js 为起点(仅使用 synth,不含 samples)。
.strudel.js - 编排方案:长度(以小节计),以及哪些小节为 build 和 drop。
Tools and dependencies
工具与依赖
- Node 22 or newer, npm, and the HyperFrames CLI pinned to (run through
hyperframes@0.8.70).npx --yes - pins everything else:
tools/package.json1.3.0 (AGPL-3.0, installed from npm, not bundled here),@strudel/web25.12.0,puppeteer-core3.2.3, and the OFL fonts@puppeteer/browsers5.3.0 and@fontsource/jetbrains-mono5.3.0.@fontsource/rubik-mono-one - Chrome for Testing 149.0.7827.22 for recording, or any Chrome given as .
CHROME=<path> - No credentials.
- Node 22 或更高版本、npm,以及固定为 的 HyperFrames CLI(通过
hyperframes@0.8.70运行)。npx --yes - 固定了其余全部依赖:
tools/package.json1.3.0(AGPL-3.0,从 npm 安装,此处不打包)、@strudel/web25.12.0、puppeteer-core3.2.3,以及 OFL 字体@puppeteer/browsers5.3.0 和@fontsource/jetbrains-mono5.3.0。@fontsource/rubik-mono-one - 用于录制的 Chrome for Testing 149.0.7827.22,或通过 指定的任意 Chrome。
CHROME=<path> - 无需凭据。
Workflow
工作流
- Create the project (plain file copies):
node <skill>/scripts/new-project.mjs <project-dir> [track.strudel.js] - Edit :
<project-dir>/video.json,bars,builds,drops,themesparts,storm(references/video.md, references/themes.md). The template already matches the example track, so skip this step when using it.signoff - From , install the pinned tools:
<project-dir>/toolsnpm install - From , if
<project-dir>/toolsis not set, fetch Chrome for Testing:CHROMEnpx --yes @puppeteer/browsers@3.2.3 install chrome@149.0.7827.22 --path .chrome - From , record:
<project-dir>/toolsIt takes about 5-7 minutes for 32 bars (give it a 10 minute timeout), prints levels per 4 bars and warns on clipping. Fix the track and record again until the drops peak at or below -2 dBFS with no clipped samples.node record.mjs .. - From , build the video data:
<project-dir>/toolsIt prints the snapshot command for step 7.node build-data.mjs .. - From , run
<project-dir>, then the printed snapshot command, and look at every frame (what to look for: references/video.md).npx --yes hyperframes@0.8.70 check . - From , render locally when the user asks for the video:
<project-dir>HyperFrames cloud render (npx --yes hyperframes@0.8.70 render . -o renders/video.mp4) spends credits on the user's account: use it only after the user explicitly agrees.npx --yes hyperframes@0.8.70 cloud render .
If the track changes, repeat steps 5-7. If changes, repeat steps 6-7.
video.json- 创建项目(直接复制文件):
node <skill>/scripts/new-project.mjs <project-dir> [track.strudel.js] - 编辑 :配置
<project-dir>/video.json、bars、builds、drops、各themespart 和storm(references/video.md、references/themes.md)。模板已与示例曲目匹配,因此使用示例曲目时可以跳过此步骤。signoff - 在 中安装固定版本的工具:
<project-dir>/toolsnpm install - 在 中,如果未设置
<project-dir>/tools,则获取 Chrome for Testing:CHROMEnpx --yes @puppeteer/browsers@3.2.3 install chrome@149.0.7827.22 --path .chrome - 在 中录制:
<project-dir>/tools32 小节大约需要 5-7 分钟(请设置 10 分钟超时);录制过程每 4 小节输出一次电平,并警告削波问题。调整曲目并重新录制,直到各 drop 的峰值不高于 -2 dBFS,且没有削波采样。node record.mjs .. - 在 中构建视频数据:
<project-dir>/tools它会输出第 7 步所需的 snapshot 命令。node build-data.mjs .. - 在 中运行
<project-dir>,然后运行打印出的 snapshot 命令,并逐帧检查画面(检查要点见 references/video.md)。npx --yes hyperframes@0.8.70 check . - 当用户要求提供视频时,在 中进行本地渲染:
<project-dir>HyperFrames cloud render(npx --yes hyperframes@0.8.70 render . -o renders/video.mp4)会消耗用户账户中的 credits,仅在用户明确同意后使用。npx --yes hyperframes@0.8.70 cloud render .
如果曲目发生变化,请重复步骤 5-7;如果 发生变化,请重复步骤 6-7。
video.jsonOutputs
输出
- (the mix),
assets/bgm.wav(the scope part),assets/stem-<part>.wav(every note with its code locations),data/events.json(what the composition reads).data/events.js - , 1080×1080, 30 fps, about
renders/video.mp4seconds with a sign-off.pre + bars × 240 / bpm + 4.6
- (混音)、
assets/bgm.wav(对应的 scope part)、assets/stem-<part>.wav(每个音符及其代码位置)、data/events.json(供 composition 读取)。data/events.js - ,1080×1080,30 fps;带片尾字幕时,时长约为
renders/video.mp4秒。pre + bars × 240 / bpm + 4.6
Side effects
副作用
- Files: writes only inside .
<project-dir>rewrites thebuild-data.mjsand audiodata-durationattributes indata-start.index.html - Network: (npm registry), the Chrome for Testing download (about 150 MB from Google's storage), and GSAP from cdn.jsdelivr.net when the composition loads.
npm installuploads frames to a hosted captioning model unless givensnapshot, so always pass it. Recording runs on 127.0.0.1 only and fetches nothing unless the track itself loads samples (then from the sample URLs the track names).--describe false - Audio: recording is headless and muted; nothing plays out loud.
- Cost: none, unless the user approves a cloud render.
- 文件:仅在 内写入文件。
<project-dir>会重写build-data.mjs中的index.html和音频data-duration属性。data-start - 网络:(npm registry)、Chrome for Testing 下载(从 Google 的存储下载约 150 MB),以及 composition 加载时从 cdn.jsdelivr.net 获取 GSAP。除非提供
npm install,否则--describe false会将帧上传到托管的字幕模型,因此始终传入snapshot。录制仅在 127.0.0.1 上运行,不会获取任何内容,除非曲目自身加载了 samples(此时从曲目指定的 sample URL 获取)。--describe false - 音频:录制以 headless 模式运行且保持静音,不会外放声音。
- 成本:无费用,除非用户同意使用 cloud render。
Verify
验证
- exits 0, lists every part, and reports no clipping.
record.mjs - passes with 0 errors.
checkinfo notes for code lines below the frame are expected.canvas_overflow - In the snapshots: line 1 typing at 0.6 s, the first part blooming and highlighted after , graffiti in each drop, the decode after each drop, the sign-off at the end.
pre - In the render: the first sound lands at seconds, and the video ends in black.
pre
- 的退出码为 0,列出所有 part,并且未报告削波。
record.mjs - 通过检查,0 个错误。超出画面的代码行所产生的
check信息提示属于预期情况。canvas_overflow - 在 snapshots 中:第 1 行在 0.6 秒时输入,第一个 part 在 之后绽放并高亮,每个 drop 中都有涂鸦效果,每个 drop 之后都有 decode 效果,末尾有片尾字幕。
pre - 在最终渲染中:第一个声音在第 秒响起,视频以黑屏结束。
pre
Rights
权利
The music written in Strudel belongs to its author; Strudel's AGPL covers the software, not the
tracks. Built-in synths need no clearance. Samples loaded by a track are other people's
recordings: use only sounds the user owns or has cleared.
在 Strudel 中编写的音乐归其作者所有;Strudel 的 AGPL 许可适用于软件,而不适用于曲目。内置 synth 无需获得额外授权。曲目加载的 samples 是他人的录音:仅使用用户拥有或已获授权的声音。