Skip to content

A toolbox of film styles made in code for Claude Code: 66 ready to use, and your own. Each style is a style prompt plus a demo film made entirely in code by Claude Opus 5.5, with no video model. By Lemomo. · 一套用代码做片的风格工具箱:66 种现成风格,也能做出你自己的

README split: English README.md (bilingual intro, link for Chinese readers) and README.zh-CN.md; build.py writes both grids; core tools' errors, --help and instrument descriptions in English

lemomo-aib65efe6ea393
diff --git a/MAINTAINING.md b/MAINTAINING.md
index 4f69f7b..bed0a8a 100644
--- a/MAINTAINING.md
+++ b/MAINTAINING.md
@@ -20,7 +20,7 @@ Assets are CC0, CC BY or OFL only, each in `demo/CREDITS`. No watermark on any f
## Register
1. **Number.** `num` in `style.json` is the next free number after the highest in `styles/*/style.json` (two digits as a string, e.g. `"55"`); it orders the gallery within a category.
-2. `python3 styleboard/build.py` reads every `styles/*/style.json` and rewrites the gallery data, the README grid and counts, `styles/README.md` and the style list in `AGENTS.md`. Never edit those generated parts by hand. Then `python3 styleboard/build.py --frames <slug>` (the README grid frame at `frame_sec`) and `sh styleboard/frames.sh <slug>` (the gallery card from `demo/stills/styleframe.jpg`).
+2. `python3 styleboard/build.py` reads every `styles/*/style.json` and rewrites the gallery data, the grids and counts in `README.md` (English) and `README.zh-CN.md` (Chinese), `styles/README.md` and the style list in `AGENTS.md`. Never edit those generated parts by hand. The rest of the two READMEs is written by hand: change both together (e.g. the **New** line). Then `python3 styleboard/build.py --frames <slug>` (the README grid frame at `frame_sec`) and `sh styleboard/frames.sh <slug>` (the gallery card from `demo/stills/styleframe.jpg`).
3. `sh tools/web_cuts.sh` makes the 720p web cut in `.release/web/` (only for films that are new or changed).
## Gates
diff --git a/README.md b/README.md
index 7fb06ad..2c609cd 100644
--- a/README.md
+++ b/README.md
@@ -2,60 +2,56 @@
# Lemo-Opuscar
+**English** · [简体中文](README.zh-CN.md)
+
**<!--n-->43<!--/n--> film styles, each with a short film made entirely in code.**<br>
**<!--n-->43<!--/n--> 种影片风格,每种都配一支完全用代码做出来的短片。**
Pick a style, bring your own story, and let your coding agent direct the film.<br>
选一个风格,带上你自己的故事,让你的编程 agent 来当导演。
-[**▶ Watch the gallery · 看图鉴**](https://lemomo-ai.github.io/lemo-opuscar/)
+**🇨🇳 中文用户请看这里 → [简体中文说明 README.zh-CN.md](README.zh-CN.md)**
+
+[**▶ Watch the gallery**](https://lemomo-ai.github.io/lemo-opuscar/)
-<sub>Official repo · 官方仓库:[github.com/lemomo-ai/lemo-opuscar](https://github.com/lemomo-ai/lemo-opuscar) · by Lemomo ([@lemomo_ai](https://x.com/lemomo_ai))</sub>
+<sub>Official repo: [github.com/lemomo-ai/lemo-opuscar](https://github.com/lemomo-ai/lemo-opuscar) · by Lemomo ([@lemomo_ai](https://x.com/lemomo_ai))</sub>
-**New · 新增:** Copperplate Engraving 铜版画 · Sci-fi Hologram HUD 科幻全息界面 · Mid-century Cartoon 50s 扁平卡通 · Silkscreen Travel Poster 丝印旅行海报
+**New:** Copperplate Engraving · Sci-fi Hologram HUD · Mid-century Cartoon · Silkscreen Travel Poster
</div>
-## 🎬 Feature presentation · 特别放映:OPUSCAR 98
+## 🎬 Feature presentation: OPUSCAR 98
<div align="center">
<a href="https://lemomo-ai.github.io/lemo-opuscar/opuscar98/"><img src="docs/opuscar98.jpg" alt="OPUSCAR 98 — 98 Years of Best Picture" width="100%"></a>
-**98 Years of Best Picture · 1927 – 2025 · 6:31**<br>
-**98 年最佳影片 · 1927 – 2025 · 6 分 31 秒**
+**98 Years of Best Picture · 1927 – 2025 · 6:31**
One Clawd walks through all 98 Best Picture winners, each one redrawn in a style that fits the film.<br>
-Every frame, every note and every cut was written in code by Claude Opus 5.5.<br>
-一个 Clawd 走过 98 部最佳影片,每一部都换成贴合那部电影的画风。<br>
-每一帧画面、每一个音符、每一刀剪辑,都是 Claude Opus 5.5 写代码做出来的。
+Every frame, every note and every cut was written in code by Claude Opus 5.5.
-[**▶ Watch · 观看**](https://lemomo-ai.github.io/lemo-opuscar/opuscar98/) · [**Download 1080p · 下载**](https://github.com/lemomo-ai/lemo-opuscar/releases/download/films/opuscar98.mp4)
+[**▶ Watch**](https://lemomo-ai.github.io/lemo-opuscar/opuscar98/) · [**Download 1080p**](https://github.com/lemomo-ai/lemo-opuscar/releases/download/films/opuscar98.mp4)
</div>
-## 👋 About me · 关于我
+## 👋 About me
-I'm **Lemomo** ([@lemomo-ai](https://github.com/lemomo-ai)). More about me on my profile.<br>
-我是 **Lemomo**,更多信息见我的 [GitHub 主页](https://github.com/lemomo-ai)。
+I'm **Lemomo** ([@lemomo-ai](https://github.com/lemomo-ai)). More about me on my profile.
> **Not an awesome list.** Every film here was made by me, with Claude Opus 5.5. The styles are tuned for Opus 5.5; other models may not reproduce them.
->
-> **这不是一个 awesome 合集。** 这里所有的片子都是我自己用 Claude Opus 5.5 做的。风格是按 Opus 5.5 调出来的,换成其他模型不保证能做出同样的效果。
-![All styles · 全部风格](docs/cover.jpg)
+![All styles](docs/cover.jpg)
Every film was directed, drawn, scored and mixed by an AI agent writing code: canvas and WebGL pages rendered frame by frame, original music from free sample libraries, text-to-speech narration. No video generation, no stock footage.
-每一支片子都是 AI agent 写代码导演、作画、配乐、混音的:Canvas 和 WebGL 页面逐帧渲染,用免费采样库写原创配乐,TTS 配音。不用视频生成,也不用素材库画面。
-
-## How to use · 怎么用
+## How to use
-Two ways in; the skill is the easiest. · 两种用法,推荐装 skill,最省事。
+Two ways in; the skill is the easiest.
-### Option 1: install the skill (recommended) · 方式一:装成 skill(推荐)
+### Option 1: install the skill (recommended)
-In your terminal · 在终端里:
+In your terminal:
```sh
claude plugin marketplace add lemomo-ai/lemo-opuscar
@@ -64,9 +60,7 @@ claude plugin install lemo-opuscar@lemolab
Then use it from any folder. On first use it downloads the guides, tools and style prompts to `~/lemo-opuscar`, shared by all your films. Each film's project, from source to finished video, goes in the folder you started from. For other agents, copy [`plugin/skills/lemo-opuscar/`](plugin/skills/lemo-opuscar/) into their skills folder.
-之后在任何目录都能用。第一次使用时,它会把指南、工具和风格提示词下载到 `~/lemo-opuscar`,所有片子共用这一份;每支片子的工程,从源码到成片,都放在你发起时所在的文件夹里。其他 agent 可以把 [`plugin/skills/lemo-opuscar/`](plugin/skills/lemo-opuscar/) 复制到它们的 skills 目录。
-
-### Option 2: clone the repo · 方式二:clone 仓库
+### Option 2: clone the repo
```sh
git clone https://github.com/lemomo-ai/lemo-opuscar.git
@@ -76,170 +70,163 @@ claude
Films go into `films/<name>/` inside the repo.
-片子做到仓库里的 `films/<名字>/`。
-
-### Then just say what you want · 然后直接说
+### Then just say what you want
> Make a 45-second film in the **watercolor** style about the coffee farm my family runs. Warm female narrator.
->
-> 用**油画厚涂**风格做一支 30 秒的片子,讲我家那只每天在窗台等我下班的橘猫。
-Name the style in English or Chinese; the [style index](styles/README.md) lists them all. · 风格用英文名或中文名都行,全部风格见[风格索引](styles/README.md)。
+Name the style in English or Chinese; the [style index](styles/README.md) lists them all.
It asks you once, up front: anything it can't decide about your topic, whether you have your own **voice, music or other material**, and whether you want to see a **storyboard** first. Say yes and it stops once to show you the key shots in the real style; otherwise it goes straight to the finished film.
-它开工前只问你一次:主题里它定不了的事、你有没有自己的**配音、音乐或其他素材**、要不要先看**分镜故事板**。要看的话,它会停一次,给你看用真实风格画出来的关键镜头;不看就直接做完成片。
-
-The agent reads three guides and works like a small studio · agent 会读三份指南,像一个小工作室一样开工:
+The agent reads three guides and works like a small studio:
-| File · 文件 | What it gives the agent · 给 agent 的东西 |
+| File | What it gives the agent |
|---|---|
-| [`DIRECTOR.md`](DIRECTOR.md) | how to direct: story, sound, rhythm, camera, performance, self-checks<br>怎么导:故事、声音、节奏、镜头、表演、自检 |
-| [`TECHNIQUE.md`](TECHNIQUE.md) | how to build: frame-by-frame rendering, voice, music, mixing<br>怎么做:逐帧渲染、配音、配乐、混音 |
-| `styles/<style>/STYLE.md` | what the style looks and sounds like; the story is yours<br>这个风格长什么样、听起来什么样;故事由你定 |
+| [`DIRECTOR.md`](DIRECTOR.md) | how to direct: story, sound, rhythm, camera, performance, self-checks |
+| [`TECHNIQUE.md`](TECHNIQUE.md) | how to build: frame-by-frame rendering, voice, music, mixing |
+| `styles/<style>/STYLE.md` | what the style looks and sounds like; the story is yours |
-### Before you start · 开始之前
+### Before you start
-- A film takes an agent about 30–60 minutes and a fair amount of tokens. · 一支片子 agent 大约要做 30–60 分钟,token 用量不小。
-- You need Node 20+, ffmpeg and Python 3.11+ (or [uv](https://docs.astral.sh/uv/)); the agent installs the rest. · 需要 Node 20+、ffmpeg 和 Python 3.11+(或 uv),其余由 agent 安装。
-- Default output 1920×1080, 24 fps; other sizes on request. · 默认输出 1920×1080、24 fps,其他尺寸可以指定。
+- A film takes an agent about 30–60 minutes and a fair amount of tokens.
+- You need Node 20+, ffmpeg and Python 3.11+ (or [uv](https://docs.astral.sh/uv/)); the agent installs the rest.
+- Default output 1920×1080, 24 fps; other sizes on request.
-Update: `claude plugin marketplace update lemolab && claude plugin update lemo-opuscar@lemolab`, then restart Claude Code (the library in `~/lemo-opuscar` updates itself on the next film); uninstall with `claude plugin uninstall lemo-opuscar@lemolab` and delete `~/lemo-opuscar`. If a step stays stuck, [open an issue](https://github.com/lemomo-ai/lemo-opuscar/issues). · 更新:`claude plugin marketplace update lemolab && claude plugin update lemo-opuscar@lemolab`,然后重启 Claude Code(`~/lemo-opuscar` 里的库会在下一次做片时自动更新);卸载:`claude plugin uninstall lemo-opuscar@lemolab` 并删除 `~/lemo-opuscar`。一直卡住就[提个 issue](https://github.com/lemomo-ai/lemo-opuscar/issues)。
+Update: `claude plugin marketplace update lemolab && claude plugin update lemo-opuscar@lemolab`, then restart Claude Code (the library in `~/lemo-opuscar` updates itself on the next film); uninstall with `claude plugin uninstall lemo-opuscar@lemolab` and delete `~/lemo-opuscar`. If a step stays stuck, [open an issue](https://github.com/lemomo-ai/lemo-opuscar/issues).
-## The styles · 风格
+## The styles
-Click a frame for its `STYLE.md` · 点图片看它的 `STYLE.md`。
+Click a frame for its `STYLE.md`.
<!-- styles:start -->
-### Hand-drawn & Painting · 手绘与绘画
+### Hand-drawn & Painting
<table>
<tr>
-<td width="33%" valign="top"><a href="styles/crayon-book/STYLE.md"><img src="docs/frames/crayon-book.jpg" alt="Crayon Picture Book"></a><br><b>Crayon Picture Book</b> · 蜡笔儿童绘本<br><i>The Moon Can&#x27;t Sleep</i><br><sub>The moon can&#x27;t sleep, so a little girl climbs onto the roof to sing it a lullaby.<br>月亮失眠了,小女孩爬上屋顶给它唱摇篮曲。</sub></td>
-<td width="33%" valign="top"><a href="styles/watercolor/STYLE.md"><img src="docs/frames/watercolor.jpg" alt="Watercolor Brush"></a><br><b>Watercolor Brush</b> · 水彩笔刷<br><i>Follow the Rain</i><br><sub>Follow the rain from Australia&#x27;s red desert heart to its green coast in one unbroken painted walk.<br>跟着降雨从澳洲红色腹地一路画到绿色海岸,一镜到底。</sub></td>
-<td width="33%" valign="top"><a href="styles/ink-wash/STYLE.md"><img src="docs/frames/ink-wash.jpg" alt="Chinese Ink Wash"></a><br><b>Chinese Ink Wash</b> · 中国水墨<br><i>The Swordsman and the River</i><br><sub>A swordsman crosses the river on the water and splits the current with a single stroke.<br>侠客踏水过江,一剑断流。</sub></td>
+<td width="33%" valign="top"><a href="styles/crayon-book/STYLE.md"><img src="docs/frames/crayon-book.jpg" alt="Crayon Picture Book"></a><br><b>Crayon Picture Book</b><br><i>The Moon Can&#x27;t Sleep</i><br><sub>The moon can&#x27;t sleep, so a little girl climbs onto the roof to sing it a lullaby.</sub></td>
+<td width="33%" valign="top"><a href="styles/watercolor/STYLE.md"><img src="docs/frames/watercolor.jpg" alt="Watercolor Brush"></a><br><b>Watercolor Brush</b><br><i>Follow the Rain</i><br><sub>Follow the rain from Australia&#x27;s red desert heart to its green coast in one unbroken painted walk.</sub></td>
+<td width="33%" valign="top"><a href="styles/ink-wash/STYLE.md"><img src="docs/frames/ink-wash.jpg" alt="Chinese Ink Wash"></a><br><b>Chinese Ink Wash</b><br><i>The Swordsman and the River</i><br><sub>A swordsman crosses the river on the water and splits the current with a single stroke.</sub></td>
</tr>
<tr>
-<td width="33%" valign="top"><a href="styles/impasto/STYLE.md"><img src="docs/frames/impasto.jpg" alt="Impasto Oil Painting"></a><br><b>Impasto Oil Painting</b> · 油画厚涂<br><i>The Colour of Rain</i><br><sub>In a grey, rainy square one red umbrella opens, and a waltz paints the whole plaza in colour.<br>灰色雨中广场,第一把红伞撑开,圆舞曲把整个广场刷上颜色。</sub></td>
-<td width="33%" valign="top"><a href="styles/one-line/STYLE.md"><img src="docs/frames/one-line.jpg" alt="One-line Drawing"></a><br><b>One-line Drawing</b> · 一笔画<br><i>The Line That Never Lifted</i><br><sub>One unbroken line draws a whole life, then the pen passes to a child.<br>一根不离纸的线画完一个人的一生,再把笔交给孩子。</sub></td>
-<td width="33%" valign="top"><a href="styles/whiteboard/STYLE.md"><img src="docs/frames/whiteboard.jpg" alt="Whiteboard Explainer"></a><br><b>Whiteboard Explainer</b> · 白板讲解<br><i>Einstein in Your Pocket</i><br><sub>How your phone knows where you are: GPS, atomic clocks, and the 38 microseconds relativity adds every day.<br>手机怎么知道你在哪:GPS、原子钟,和相对论每天多出的 38 微秒。</sub></td>
+<td width="33%" valign="top"><a href="styles/impasto/STYLE.md"><img src="docs/frames/impasto.jpg" alt="Impasto Oil Painting"></a><br><b>Impasto Oil Painting</b><br><i>The Colour of Rain</i><br><sub>In a grey, rainy square one red umbrella opens, and a waltz paints the whole plaza in colour.</sub></td>
+<td width="33%" valign="top"><a href="styles/one-line/STYLE.md"><img src="docs/frames/one-line.jpg" alt="One-line Drawing"></a><br><b>One-line Drawing</b><br><i>The Line That Never Lifted</i><br><sub>One unbroken line draws a whole life, then the pen passes to a child.</sub></td>
+<td width="33%" valign="top"><a href="styles/whiteboard/STYLE.md"><img src="docs/frames/whiteboard.jpg" alt="Whiteboard Explainer"></a><br><b>Whiteboard Explainer</b><br><i>Einstein in Your Pocket</i><br><sub>How your phone knows where you are: GPS, atomic clocks, and the 38 microseconds relativity adds every day.</sub></td>
</tr>
<tr>
-<td width="33%" valign="top"><a href="styles/urban-sketch/STYLE.md"><img src="docs/frames/urban-sketch.jpg" alt="Urban Sketch · Pen &amp; Wash"></a><br><b>Urban Sketch · Pen &amp; Wash</b> · 钢笔淡彩<br><i>Where the Wind Went</i><br><sub>A park that is only a pen sketch; wherever the wind carries her straw hat, colour follows.<br>公园只是一张钢笔速写,风把草帽吹到哪里,哪里才有颜色。</sub></td>
+<td width="33%" valign="top"><a href="styles/urban-sketch/STYLE.md"><img src="docs/frames/urban-sketch.jpg" alt="Urban Sketch · Pen &amp; Wash"></a><br><b>Urban Sketch · Pen &amp; Wash</b><br><i>Where the Wind Went</i><br><sub>A park that is only a pen sketch; wherever the wind carries her straw hat, colour follows.</sub></td>
</tr>
</table>
-### East Asian Traditions · 东方传统
+### East Asian Traditions
<table>
<tr>
-<td width="33%" valign="top"><a href="styles/shadow-puppet/STYLE.md"><img src="docs/frames/shadow-puppet.jpg" alt="Shadow Puppetry"></a><br><b>Shadow Puppetry</b> · 皮影戏<br><i>Hou Yi Shoots the Suns</i><br><sub>Ten suns scorch the earth until the archer Hou Yi draws his bow, told with leather puppets on a lit screen.<br>十日炙烤大地,后羿张弓射日。</sub></td>
-<td width="33%" valign="top"><a href="styles/ukiyoe/STYLE.md"><img src="docs/frames/ukiyoe.jpg" alt="Ukiyo-e"></a><br><b>Ukiyo-e</b> · 浮世绘<br><i>A Journey Toward the Mountain</i><br><sub>A traveller walks toward a distant mountain; every shot is a woodblock print, ending in a great wave.<br>旅人走向远山,每个镜头都是一幅版画,最后迎来一道巨浪。</sub></td>
-<td width="33%" valign="top"><a href="styles/papercut-red/STYLE.md"><img src="docs/frames/papercut-red.jpg" alt="Red Paper-cut"></a><br><b>Red Paper-cut</b> · 红色窗花剪纸<br><i>Nian Comes to Town</i><br><sub>On New Year&#x27;s Eve the beast Nian comes to town, and one girl&#x27;s giant paper-cut lights up the village to scare it off.<br>除夕年兽进村,小女孩剪出的大窗花照亮全村,把它吓跑。</sub></td>
+<td width="33%" valign="top"><a href="styles/shadow-puppet/STYLE.md"><img src="docs/frames/shadow-puppet.jpg" alt="Shadow Puppetry"></a><br><b>Shadow Puppetry</b><br><i>Hou Yi Shoots the Suns</i><br><sub>Ten suns scorch the earth until the archer Hou Yi draws his bow, told with leather puppets on a lit screen.</sub></td>
+<td width="33%" valign="top"><a href="styles/ukiyoe/STYLE.md"><img src="docs/frames/ukiyoe.jpg" alt="Ukiyo-e"></a><br><b>Ukiyo-e</b><br><i>A Journey Toward the Mountain</i><br><sub>A traveller walks toward a distant mountain; every shot is a woodblock print, ending in a great wave.</sub></td>
+<td width="33%" valign="top"><a href="styles/papercut-red/STYLE.md"><img src="docs/frames/papercut-red.jpg" alt="Red Paper-cut"></a><br><b>Red Paper-cut</b><br><i>Nian Comes to Town</i><br><sub>On New Year&#x27;s Eve the beast Nian comes to town, and one girl&#x27;s giant paper-cut lights up the village to scare it off.</sub></td>
</tr>
<tr>
-<td width="33%" valign="top"><a href="styles/paper-lantern/STYLE.md"><img src="docs/frames/paper-lantern.jpg" alt="Paper-cut Lightbox"></a><br><b>Paper-cut Lightbox</b> · 纸雕灯影<br><i>A Mooncake&#x27;s Longing</i><br><sub>A single mooncake tells the Mid-Autumn story of reunion and longing inside a glowing paper-cut lightbox.<br>一枚月饼讲中秋的团圆与思念,纸雕灯箱层层透光。</sub></td>
+<td width="33%" valign="top"><a href="styles/paper-lantern/STYLE.md"><img src="docs/frames/paper-lantern.jpg" alt="Paper-cut Lightbox"></a><br><b>Paper-cut Lightbox</b><br><i>A Mooncake&#x27;s Longing</i><br><sub>A single mooncake tells the Mid-Autumn story of reunion and longing inside a glowing paper-cut lightbox.</sub></td>
</tr>
</table>
-### Print & Printmaking · 印刷与版画
+### Print & Printmaking
<table>
<tr>
-<td width="33%" valign="top"><a href="styles/risograph/STYLE.md"><img src="docs/frames/risograph.jpg" alt="Risograph Print"></a><br><b>Risograph Print</b> · Risograph 丝网印刷<br><i>Sunday Ride</i><br><sub>A Sunday-morning bike ride through the city — bakery, park, riverside — in two misregistered inks.<br>周日早晨骑车穿过城市:面包店、公园、河边。</sub></td>
-<td width="33%" valign="top"><a href="styles/halftone-dossier/STYLE.md"><img src="docs/frames/halftone-dossier.jpg" alt="Halftone Dossier"></a><br><b>Halftone Dossier</b> · 复古半调案卷<br><i>Case File: Chubby</i><br><sub>A chubby orange cat stands trial for testing gravity and 4 a.m. parkour, and walks free.<br>橘猫胖橘被立案审查:测试重力、凌晨跑酷,最后无罪释放。</sub></td>
-<td width="33%" valign="top"><a href="styles/woodcut/STYLE.md"><img src="docs/frames/woodcut.jpg" alt="Woodcut Print"></a><br><b>Woodcut Print</b> · 木刻版画<br><i>The Bell Founder</i><br><sub>A village spends a whole winter casting one bell; the first time it rings, the snow stops.<br>村子用一整个冬天铸一口钟,钟声第一次响起,雪停了。</sub></td>
+<td width="33%" valign="top"><a href="styles/risograph/STYLE.md"><img src="docs/frames/risograph.jpg" alt="Risograph Print"></a><br><b>Risograph Print</b><br><i>Sunday Ride</i><br><sub>A Sunday-morning bike ride through the city — bakery, park, riverside — in two misregistered inks.</sub></td>
+<td width="33%" valign="top"><a href="styles/halftone-dossier/STYLE.md"><img src="docs/frames/halftone-dossier.jpg" alt="Halftone Dossier"></a><br><b>Halftone Dossier</b><br><i>Case File: Chubby</i><br><sub>A chubby orange cat stands trial for testing gravity and 4 a.m. parkour, and walks free.</sub></td>
+<td width="33%" valign="top"><a href="styles/woodcut/STYLE.md"><img src="docs/frames/woodcut.jpg" alt="Woodcut Print"></a><br><b>Woodcut Print</b><br><i>The Bell Founder</i><br><sub>A village spends a whole winter casting one bell; the first time it rings, the snow stops.</sub></td>
</tr>
<tr>
-<td width="33%" valign="top"><a href="styles/engraving/STYLE.md"><img src="docs/frames/engraving.jpg" alt="Copperplate Engraving"></a><br><b>Copperplate Engraving</b> · 铜版画<br><i>The Honeybee, Plate VII</i><br><sub>A natural-history plate engraves itself: the burin cuts the copper, the bee builds up line by line, and a watercolour wash brings it to life.<br>一张博物志图版自己刻出来:雕刀推开铜版,蜜蜂一线线成形,最后手工水彩上色。</sub></td>
-<td width="33%" valign="top"><a href="styles/silkscreen-poster/STYLE.md"><img src="docs/frames/silkscreen-poster.jpg" alt="Silkscreen Travel Poster"></a><br><b>Silkscreen Travel Poster</b> · 丝印旅行海报<br><i>Three Trails</i><br><sub>Three trail posters are screen-printed one ink at a time, then climbed in one long take from noon to dusk.<br>三条步道各一张丝印海报,一色一刮印出来,再沿山脊一镜到底从正午爬到黄昏。</sub></td>
+<td width="33%" valign="top"><a href="styles/engraving/STYLE.md"><img src="docs/frames/engraving.jpg" alt="Copperplate Engraving"></a><br><b>Copperplate Engraving</b><br><i>The Honeybee, Plate VII</i><br><sub>A natural-history plate engraves itself: the burin cuts the copper, the bee builds up line by line, and a watercolour wash brings it to life.</sub></td>
+<td width="33%" valign="top"><a href="styles/silkscreen-poster/STYLE.md"><img src="docs/frames/silkscreen-poster.jpg" alt="Silkscreen Travel Poster"></a><br><b>Silkscreen Travel Poster</b><br><i>Three Trails</i><br><sub>Three trail posters are screen-printed one ink at a time, then climbed in one long take from noon to dusk.</sub></td>
</tr>
</table>
-### Graphic & Type · 图形与排版
+### Graphic & Type
<table>
<tr>
-<td width="33%" valign="top"><a href="styles/swiss-motion/STYLE.md"><img src="docs/frames/swiss-motion.jpg" alt="Swiss Motion Graphics"></a><br><b>Swiss Motion Graphics</b> · 瑞士动态排版<br><i>Five Rules for a Poster</i><br><sub>A concert poster lays itself out by five Swiss design rules; the fifth is to break just one.<br>一张音乐会海报按瑞士设计的五条规则自己排版,第五条是只打破一条。</sub></td>
-<td width="33%" valign="top"><a href="styles/spy-titles/STYLE.md"><img src="docs/frames/spy-titles.jpg" alt="60s Spy Title Sequence"></a><br><b>60s Spy Title Sequence</b> · 60s 间谍片头<br><i>The Velvet Cipher</i><br><sub>Opening titles for an imaginary 1964 spy film: a chase for a stolen key until the shapes lock into the title.<br>虚构 1964 年间谍片的片头:追一把被偷的钥匙,几何碎片最后拼成片名。</sub></td>
-<td width="33%" valign="top"><a href="styles/art-deco/STYLE.md"><img src="docs/frames/art-deco.jpg" alt="Art Deco"></a><br><b>Art Deco</b> · 装饰艺术<br><i>Midnight at the Starlight Hotel</i><br><sub>A grand hotel, 1930: a bellboy races lifts and revolving doors to deliver one letter before midnight.<br>1930 年的大饭店,门童赶在午夜前把一封信送上顶楼。</sub></td>
+<td width="33%" valign="top"><a href="styles/swiss-motion/STYLE.md"><img src="docs/frames/swiss-motion.jpg" alt="Swiss Motion Graphics"></a><br><b>Swiss Motion Graphics</b><br><i>Five Rules for a Poster</i><br><sub>A concert poster lays itself out by five Swiss design rules; the fifth is to break just one.</sub></td>
+<td width="33%" valign="top"><a href="styles/spy-titles/STYLE.md"><img src="docs/frames/spy-titles.jpg" alt="60s Spy Title Sequence"></a><br><b>60s Spy Title Sequence</b><br><i>The Velvet Cipher</i><br><sub>Opening titles for an imaginary 1964 spy film: a chase for a stolen key until the shapes lock into the title.</sub></td>
+<td width="33%" valign="top"><a href="styles/art-deco/STYLE.md"><img src="docs/frames/art-deco.jpg" alt="Art Deco"></a><br><b>Art Deco</b><br><i>Midnight at the Starlight Hotel</i><br><sub>A grand hotel, 1930: a bellboy races lifts and revolving doors to deliver one letter before midnight.</sub></td>
</tr>
<tr>
-<td width="33%" valign="top"><a href="styles/blueprint/STYLE.md"><img src="docs/frames/blueprint.jpg" alt="Blueprint"></a><br><b>Blueprint</b> · 蓝图 / 工程制图<br><i>Patent Pending: The Cloud Catcher</i><br><sub>An inventor&#x27;s blueprint draws, explodes and assembles a cloud-catching machine, and its revision cloud starts to rain.<br>发明家的蓝图自己画出一台接云机器,修订云线变成了真的雨云。</sub></td>
-<td width="33%" valign="top"><a href="styles/stained-glass/STYLE.md"><img src="docs/frames/stained-glass.jpg" alt="Stained Glass"></a><br><b>Stained Glass</b> · 彩色玻璃窗<br><i>The Dragon of the East Window</i><br><sub>Sunlight crosses a cathedral window from dawn to dusk, waking each pane of a knight-and-dragon tale.<br>阳光从清晨移到黄昏,照到哪一格花窗,哪一格的故事就动起来。</sub></td>
-<td width="33%" valign="top"><a href="styles/pictogram-motion/STYLE.md"><img src="docs/frames/pictogram-motion.jpg" alt="Pictogram Motion"></a><br><b>Pictogram Motion</b> · 象形运动图形<br><i>Aichi-Nagoya 2026 — All 43 Sports</i><br><sub>All 43 sports of the 2026 Asian Games as beat-locked geometric pictograms.<br>2026 亚运会 43 个大项,几何象形人卡着节拍快闪。</sub></td>
+<td width="33%" valign="top"><a href="styles/blueprint/STYLE.md"><img src="docs/frames/blueprint.jpg" alt="Blueprint"></a><br><b>Blueprint</b><br><i>Patent Pending: The Cloud Catcher</i><br><sub>An inventor&#x27;s blueprint draws, explodes and assembles a cloud-catching machine, and its revision cloud starts to rain.</sub></td>
+<td width="33%" valign="top"><a href="styles/stained-glass/STYLE.md"><img src="docs/frames/stained-glass.jpg" alt="Stained Glass"></a><br><b>Stained Glass</b><br><i>The Dragon of the East Window</i><br><sub>Sunlight crosses a cathedral window from dawn to dusk, waking each pane of a knight-and-dragon tale.</sub></td>
+<td width="33%" valign="top"><a href="styles/pictogram-motion/STYLE.md"><img src="docs/frames/pictogram-motion.jpg" alt="Pictogram Motion"></a><br><b>Pictogram Motion</b><br><i>Aichi-Nagoya 2026 — All 43 Sports</i><br><sub>All 43 sports of the 2026 Asian Games as beat-locked geometric pictograms.</sub></td>
</tr>
<tr>
-<td width="33%" valign="top"><a href="styles/ascii-crt/STYLE.md"><img src="docs/frames/ascii-crt.jpg" alt="ASCII / CRT Terminal"></a><br><b>ASCII / CRT Terminal</b> · ASCII / CRT 终端<br><i>Tranquility.log</i><br><sub>A moon-base AI wakes after forty years to a signal from Earth, and replies by drawing “home” in characters.<br>月球基地的 AI 沉睡 40 年后被唤醒,用字符画出“家”来回复。</sub></td>
+<td width="33%" valign="top"><a href="styles/ascii-crt/STYLE.md"><img src="docs/frames/ascii-crt.jpg" alt="ASCII / CRT Terminal"></a><br><b>ASCII / CRT Terminal</b><br><i>Tranquility.log</i><br><sub>A moon-base AI wakes after forty years to a signal from Earth, and replies by drawing “home” in characters.</sub></td>
</tr>
</table>
-### Information & Keynote · 信息与发布
+### Information & Keynote
<table>
<tr>
-<td width="33%" valign="top"><a href="styles/dataviz/STYLE.md"><img src="docs/frames/dataviz.jpg" alt="Data Storytelling"></a><br><b>Data Storytelling</b> · 数据叙事<br><i>A Hundred Summers</i><br><sub>A hundred years of summer temperatures, where the chart itself tells the story.<br>一百年的夏季气温,图表本身就是故事。</sub></td>
-<td width="33%" valign="top"><a href="styles/iso-infographic/STYLE.md"><img src="docs/frames/iso-infographic.jpg" alt="Isometric Infographic"></a><br><b>Isometric Infographic</b> · 等距信息图<br><i>From Bean to Cup</i><br><sub>A coffee&#x27;s journey from the plantation to your hands, across one isometric world.<br>一杯咖啡从种植园到你手里的旅程。</sub></td>
-<td width="33%" valign="top"><a href="styles/dark-keynote/STYLE.md"><img src="docs/frames/dark-keynote.jpg" alt="Dark Tech Keynote"></a><br><b>Dark Tech Keynote</b> · 暗色科技发布<br><i>Room to Think</i><br><sub>Launch film for Tidy, a fictional app: one buried cursor snaps hundreds of windows back into place.<br>虚构 app Tidy 的发布片:被埋掉的光标一键把几百个窗口归位。</sub></td>
+<td width="33%" valign="top"><a href="styles/dataviz/STYLE.md"><img src="docs/frames/dataviz.jpg" alt="Data Storytelling"></a><br><b>Data Storytelling</b><br><i>A Hundred Summers</i><br><sub>A hundred years of summer temperatures, where the chart itself tells the story.</sub></td>
+<td width="33%" valign="top"><a href="styles/iso-infographic/STYLE.md"><img src="docs/frames/iso-infographic.jpg" alt="Isometric Infographic"></a><br><b>Isometric Infographic</b><br><i>From Bean to Cup</i><br><sub>A coffee&#x27;s journey from the plantation to your hands, across one isometric world.</sub></td>
+<td width="33%" valign="top"><a href="styles/dark-keynote/STYLE.md"><img src="docs/frames/dark-keynote.jpg" alt="Dark Tech Keynote"></a><br><b>Dark Tech Keynote</b><br><i>Room to Think</i><br><sub>Launch film for Tidy, a fictional app: one buried cursor snaps hundreds of windows back into place.</sub></td>
</tr>
<tr>
-<td width="33%" valign="top"><a href="styles/living-screencast/STYLE.md"><img src="docs/frames/living-screencast.jpg" alt="Living Screencast"></a><br><b>Living Screencast</b> · 活体实机录屏<br><i>Clawd Moves In</i><br><sub>Clawd, the Claude Code pixel mascot, hops out of the terminal into the Claude app and acts out plan mode, diff comments and self-checks in a one-take screencast.<br>像素小人 Clawd 跳出终端、搬进 Claude 应用,在一镜到底的录屏里演示 Plan 模式、diff 评论和自检。</sub></td>
-<td width="33%" valign="top"><a href="styles/hologram-hud/STYLE.md"><img src="docs/frames/hologram-hud.jpg" alt="Sci-fi Hologram HUD"></a><br><b>Sci-fi Hologram HUD</b> · 科幻全息界面<br><i>Volt · Spec Scan</i><br><sub>An e-bike is scanned into a hologram; target boxes lock onto the battery, motor and brakes, and each spec rolls into place.<br>一辆电助力车被扫描成全息线框,目标框依次锁定电池、电机、刹车,参数逐个滚到真值。</sub></td>
+<td width="33%" valign="top"><a href="styles/living-screencast/STYLE.md"><img src="docs/frames/living-screencast.jpg" alt="Living Screencast"></a><br><b>Living Screencast</b><br><i>Clawd Moves In</i><br><sub>Clawd, the Claude Code pixel mascot, hops out of the terminal into the Claude app and acts out plan mode, diff comments and self-checks in a one-take screencast.</sub></td>
+<td width="33%" valign="top"><a href="styles/hologram-hud/STYLE.md"><img src="docs/frames/hologram-hud.jpg" alt="Sci-fi Hologram HUD"></a><br><b>Sci-fi Hologram HUD</b><br><i>Volt · Spec Scan</i><br><sub>An e-bike is scanned into a hologram; target boxes lock onto the battery, motor and brakes, and each spec rolls into place.</sub></td>
</tr>
</table>
-### Cartoon & Anime · 卡通与动画
+### Cartoon & Anime
<table>
<tr>
-<td width="33%" valign="top"><a href="styles/rubber-hose/STYLE.md"><img src="docs/frames/rubber-hose.jpg" alt="1930s Rubber Hose Cartoon"></a><br><b>1930s Rubber Hose Cartoon</b> · 1930s 橡皮管卡通<br><i>Coffee Cup Chase</i><br><sub>A coffee cup chases a runaway sugar cube around the kitchen, 1930s-cartoon style.<br>一只咖啡杯满厨房追一块逃跑的方糖。</sub></td>
-<td width="33%" valign="top"><a href="styles/cel-anime-80s/STYLE.md"><img src="docs/frames/cel-anime-80s.jpg" alt="80s Cel Anime"></a><br><b>80s Cel Anime</b> · 80 年代赛璐璐动画<br><i>City Lights, 1987</i><br><sub>A courier girl rides through a rain-soaked neon city to deliver a tape before the dawn launch.<br>快递少女骑车穿过雨后霓虹都市,赶在黎明发射前送到一盘磁带。</sub></td>
-<td width="33%" valign="top"><a href="styles/scifi-toon/STYLE.md"><img src="docs/frames/scifi-toon.jpg" alt="Sci-Fi Sitcom Toon"></a><br><b>Sci-Fi Sitcom Toon</b> · 科幻情景喜剧卡通<br><i>Coffee Run</i><br><sub>A jaded genius opens a portal just to buy coffee and tumbles through ever-stranger universes.<br>厌世天才开传送门只想买杯咖啡,却穿过越来越离谱的平行宇宙。</sub></td>
+<td width="33%" valign="top"><a href="styles/rubber-hose/STYLE.md"><img src="docs/frames/rubber-hose.jpg" alt="1930s Rubber Hose Cartoon"></a><br><b>1930s Rubber Hose Cartoon</b><br><i>Coffee Cup Chase</i><br><sub>A coffee cup chases a runaway sugar cube around the kitchen, 1930s-cartoon style.</sub></td>
+<td width="33%" valign="top"><a href="styles/cel-anime-80s/STYLE.md"><img src="docs/frames/cel-anime-80s.jpg" alt="80s Cel Anime"></a><br><b>80s Cel Anime</b><br><i>City Lights, 1987</i><br><sub>A courier girl rides through a rain-soaked neon city to deliver a tape before the dawn launch.</sub></td>
+<td width="33%" valign="top"><a href="styles/scifi-toon/STYLE.md"><img src="docs/frames/scifi-toon.jpg" alt="Sci-Fi Sitcom Toon"></a><br><b>Sci-Fi Sitcom Toon</b><br><i>Coffee Run</i><br><sub>A jaded genius opens a portal just to buy coffee and tumbles through ever-stranger universes.</sub></td>
</tr>
<tr>
-<td width="33%" valign="top"><a href="styles/midcentury-toon/STYLE.md"><img src="docs/frames/midcentury-toon.jpg" alt="Mid-century Cartoon"></a><br><b>Mid-century Cartoon</b> · 50s 扁平卡通<br><i>Meet Pip</i><br><sub>A robot vacuum set up in three steps, told like a 1950s classroom film: place the dock, connect the app, press start.<br>用 50 年代教育片的口吻,三步教你装好一台扫地机:放充电座、连 app、按开始。</sub></td>
+<td width="33%" valign="top"><a href="styles/midcentury-toon/STYLE.md"><img src="docs/frames/midcentury-toon.jpg" alt="Mid-century Cartoon"></a><br><b>Mid-century Cartoon</b><br><i>Meet Pip</i><br><sub>A robot vacuum set up in three steps, told like a 1950s classroom film: place the dock, connect the app, press start.</sub></td>
</tr>
</table>
-### Games · 游戏
+### Games
<table>
<tr>
-<td width="33%" valign="top"><a href="styles/pixel-rpg/STYLE.md"><img src="docs/frames/pixel-rpg.jpg" alt="16-bit Pixel RPG"></a><br><b>16-bit Pixel RPG</b> · 16-bit 像素 RPG<br><i>The Last Save Point</i><br><sub>At the final boss door a hero saves the game, and the save screen replays the whole journey.<br>勇士在最终 Boss 门前存档,存档画面闪回一路冒险。</sub></td>
-<td width="33%" valign="top"><a href="styles/hd-2d/STYLE.md"><img src="docs/frames/hd-2d.jpg" alt="HD-2D"></a><br><b>HD-2D</b><br><i>The Lampbearer</i><br><sub>The lighthouse goes dark; a girl carries the last flame through a night forest and up the storm cliffs.<br>灯塔熄灭,孙女提着最后一簇火穿过夜林、爬上风暴悬崖。</sub></td>
-<td width="33%" valign="top"><a href="styles/microgame/STYLE.md"><img src="docs/frames/microgame.jpg" alt="Microgame Frenzy"></a><br><b>Microgame Frenzy</b> · 微游戏快闪(瓦里奥制造式)<br><i>Five-Second Astronaut</i><br><sub>A clumsy cadet survives a five-second boot camp, faster and faster, until the boss: landing home.<br>见习宇航员闯五秒训练营,越来越快,Boss 关亲手降落回地球。</sub></td>
+<td width="33%" valign="top"><a href="styles/pixel-rpg/STYLE.md"><img src="docs/frames/pixel-rpg.jpg" alt="16-bit Pixel RPG"></a><br><b>16-bit Pixel RPG</b><br><i>The Last Save Point</i><br><sub>At the final boss door a hero saves the game, and the save screen replays the whole journey.</sub></td>
+<td width="33%" valign="top"><a href="styles/hd-2d/STYLE.md"><img src="docs/frames/hd-2d.jpg" alt="HD-2D"></a><br><b>HD-2D</b><br><i>The Lampbearer</i><br><sub>The lighthouse goes dark; a girl carries the last flame through a night forest and up the storm cliffs.</sub></td>
+<td width="33%" valign="top"><a href="styles/microgame/STYLE.md"><img src="docs/frames/microgame.jpg" alt="Microgame Frenzy"></a><br><b>Microgame Frenzy</b><br><i>Five-Second Astronaut</i><br><sub>A clumsy cadet survives a five-second boot camp, faster and faster, until the boss: landing home.</sub></td>
</tr>
<tr>
-<td width="33%" valign="top"><a href="styles/game-show/STYLE.md"><img src="docs/frames/game-show.jpg" alt="Game Show Flat"></a><br><b>Game Show Flat</b> · 综艺节奏扁平<br><i>Rhythm of AI, 1997 → 2026</i><br><sub>The history of AI as a rhythm game: models take the stage on the beat, and a report card closes the show.<br>把 AI 发展史做成一局节奏游戏,模型踩着拍登场,最后发成绩单。</sub></td>
+<td width="33%" valign="top"><a href="styles/game-show/STYLE.md"><img src="docs/frames/game-show.jpg" alt="Game Show Flat"></a><br><b>Game Show Flat</b><br><i>Rhythm of AI, 1997 → 2026</i><br><sub>The history of AI as a rhythm game: models take the stage on the beat, and a report card closes the show.</sub></td>
</tr>
</table>
-### Cinema & Eras · 电影与时代
+### Cinema & Eras
<table>
<tr>
-<td width="33%" valign="top"><a href="styles/silent-film/STYLE.md"><img src="docs/frames/silent-film.jpg" alt="1920s Silent Film"></a><br><b>1920s Silent Film</b> · 1920s 默片<br><i>The Runaway Loaf</i><br><sub>A baker&#x27;s boy chases a runaway loaf downhill, then breaks it in half for a hungry girl.<br>面包店学徒追一个滚走的面包,最后掰成两半分给饿肚子的小女孩。</sub></td>
-<td width="33%" valign="top"><a href="styles/backrooms/STYLE.md"><img src="docs/frames/backrooms.jpg" alt="Liminal Found Footage"></a><br><b>Liminal Found Footage</b> · 后室 / 新怪谈<br><i>Night Shift Orientation</i><br><sub>A new night-shift hire films their first night in an endless yellow office, following the rules on the wall.<br>新夜班员工拍下入职第一晚:无尽的黄色办公空间,和墙上的员工守则。</sub></td>
+<td width="33%" valign="top"><a href="styles/silent-film/STYLE.md"><img src="docs/frames/silent-film.jpg" alt="1920s Silent Film"></a><br><b>1920s Silent Film</b><br><i>The Runaway Loaf</i><br><sub>A baker&#x27;s boy chases a runaway loaf downhill, then breaks it in half for a hungry girl.</sub></td>
+<td width="33%" valign="top"><a href="styles/backrooms/STYLE.md"><img src="docs/frames/backrooms.jpg" alt="Liminal Found Footage"></a><br><b>Liminal Found Footage</b><br><i>Night Shift Orientation</i><br><sub>A new night-shift hire films their first night in an endless yellow office, following the rules on the wall.</sub></td>
</tr>
</table>
-### Materials & 3D · 材质与 3D
+### Materials & 3D
<table>
<tr>
-<td width="33%" valign="top"><a href="styles/brick-toy/STYLE.md"><img src="docs/frames/brick-toy.jpg" alt="Brick Toy"></a><br><b>Brick Toy</b> · 积木玩具<br><i>Rocket from Spare Parts</i><br><sub>A brick astronaut builds a rocket from spare parts and flies to a brick moon.<br>积木宇航员用零件拼出火箭,飞向积木月亮。</sub></td>
-<td width="33%" valign="top"><a href="styles/paper-popup/STYLE.md"><img src="docs/frames/paper-popup.jpg" alt="Paper Pop-up Book"></a><br><b>Paper Pop-up Book</b> · 纸片立体书<br><i>Pip&#x27;s Paper Adventure</i><br><sub>A pop-up book opens on a desk; a sprite named Pip adventures through paper worlds and jumps out into ours.<br>立体书在书桌上打开,小精灵 Pip 在纸片世界冒险,最后跳出书外。</sub></td>
-<td width="33%" valign="top"><a href="styles/tilt-shift/STYLE.md"><img src="docs/frames/tilt-shift.jpg" alt="Tilt-Shift Miniature"></a><br><b>Tilt-Shift Miniature</b> · 移轴微缩<br><i>Toy Town Rush Hour</i><br><sub>Morning rush hour in a town that looks like a model: traffic, trains and tiny people.<br>玩具城的早高峰,一切都像模型。</sub></td>
+<td width="33%" valign="top"><a href="styles/brick-toy/STYLE.md"><img src="docs/frames/brick-toy.jpg" alt="Brick Toy"></a><br><b>Brick Toy</b><br><i>Rocket from Spare Parts</i><br><sub>A brick astronaut builds a rocket from spare parts and flies to a brick moon.</sub></td>
+<td width="33%" valign="top"><a href="styles/paper-popup/STYLE.md"><img src="docs/frames/paper-popup.jpg" alt="Paper Pop-up Book"></a><br><b>Paper Pop-up Book</b><br><i>Pip&#x27;s Paper Adventure</i><br><sub>A pop-up book opens on a desk; a sprite named Pip adventures through paper worlds and jumps out into ours.</sub></td>
+<td width="33%" valign="top"><a href="styles/tilt-shift/STYLE.md"><img src="docs/frames/tilt-shift.jpg" alt="Tilt-Shift Miniature"></a><br><b>Tilt-Shift Miniature</b><br><i>Toy Town Rush Hour</i><br><sub>Morning rush hour in a town that looks like a model: traffic, trains and tiny people.</sub></td>
</tr>
<tr>
-<td width="33%" valign="top"><a href="styles/lowpoly-island/STYLE.md"><img src="docs/frames/lowpoly-island.jpg" alt="Low-poly Isometric Island"></a><br><b>Low-poly Isometric Island</b> · 低多边形等距<br><i>The Island That Grew</i><br><sub>An island and its village grow tile by tile from an empty sea, each tile a note, into a starry night.<br>空海里一格格长出小岛和村庄,每放一块响一个音符,直到星空。</sub></td>
-<td width="33%" valign="top"><a href="styles/glass-product/STYLE.md"><img src="docs/frames/glass-product.jpg" alt="Glass Product Render"></a><br><b>Glass Product Render</b> · 玻璃质感产品<br><i>Aura — Hear the Light</i><br><sub>Unboxing and close-ups of Aura, fictional glass earbuds, in strip-light sweeps and caustics.<br>虚构玻璃耳机 Aura 的开箱与特写。</sub></td>
+<td width="33%" valign="top"><a href="styles/lowpoly-island/STYLE.md"><img src="docs/frames/lowpoly-island.jpg" alt="Low-poly Isometric Island"></a><br><b>Low-poly Isometric Island</b><br><i>The Island That Grew</i><br><sub>An island and its village grow tile by tile from an empty sea, each tile a note, into a starry night.</sub></td>
+<td width="33%" valign="top"><a href="styles/glass-product/STYLE.md"><img src="docs/frames/glass-product.jpg" alt="Glass Product Render"></a><br><b>Glass Product Render</b><br><i>Aura — Hear the Light</i><br><sub>Unboxing and close-ups of Aura, fictional glass earbuds, in strip-light sweeps and caustics.</sub></td>
</tr>
</table>
<!-- styles:end -->
-## Licence · 授权
+## Licence
-Made by **LemoLab × Claude Opus 5.5**. MIT licensed. Third-party assets in the demos keep their own licences (see each demo's `CREDITS`); you are responsible for the materials you use in your films.<br>
-**LemoLab × Claude Opus 5.5** 出品,MIT 协议。样片中的第三方素材沿用各自的授权(见各样片的 `CREDITS`);你在自己片子里使用的素材由你负责。
+Made by **LemoLab × Claude Opus 5.5**. MIT licensed. Third-party assets in the demos keep their own licences (see each demo's `CREDITS`); you are responsible for the materials you use in your films.
diff --git a/README.zh-CN.md b/README.zh-CN.md
new file mode 100644
index 0000000..c1de2a6
--- /dev/null
+++ b/README.zh-CN.md
@@ -0,0 +1,228 @@
+<div align="center">
+
+# Lemo-Opuscar
+
+[English](README.md) · **简体中文**
+
+**<!--n-->43<!--/n--> 种影片风格,每种都配一支完全用代码做出来的短片。**
+
+选一个风格,带上你自己的故事,让你的编程 agent 来当导演。
+
+[**▶ 看图鉴**](https://lemomo-ai.github.io/lemo-opuscar/)
+
+<sub>官方仓库:[github.com/lemomo-ai/lemo-opuscar](https://github.com/lemomo-ai/lemo-opuscar) · 作者 Lemomo([@lemomo_ai](https://x.com/lemomo_ai))</sub>
+
+**新增:** 铜版画 · 科幻全息界面 · 50s 扁平卡通 · 丝印旅行海报
+
+</div>
+
+## 🎬 特别放映:OPUSCAR 98
+
+<div align="center">
+
+<a href="https://lemomo-ai.github.io/lemo-opuscar/opuscar98/"><img src="docs/opuscar98.jpg" alt="OPUSCAR 98:98 年最佳影片" width="100%"></a>
+
+**98 年最佳影片 · 1927 – 2025 · 6 分 31 秒**
+
+一个 Clawd 走过 98 部最佳影片,每一部都换成贴合那部电影的画风。<br>
+每一帧画面、每一个音符、每一刀剪辑,都是 Claude Opus 5.5 写代码做出来的。
+
+[**▶ 观看**](https://lemomo-ai.github.io/lemo-opuscar/opuscar98/) · [**下载 1080p**](https://github.com/lemomo-ai/lemo-opuscar/releases/download/films/opuscar98.mp4)
+
+</div>
+
+## 👋 关于我
+
+我是 **Lemomo**,更多信息见我的 [GitHub 主页](https://github.com/lemomo-ai)。
+
+> **这不是一个 awesome 合集。** 这里所有的片子都是我自己用 Claude Opus 5.5 做的。风格是按 Opus 5.5 调出来的,换成其他模型不保证能做出同样的效果。
+
+![全部风格](docs/cover.jpg)
+
+每一支片子都是 AI agent 写代码导演、作画、配乐、混音的:Canvas 和 WebGL 页面逐帧渲染,用免费采样库写原创配乐,TTS 配音。不用视频生成,也不用素材库画面。
+
+## 怎么用
+
+两种用法,推荐装 skill,最省事。
+
+### 方式一:装成 skill(推荐)
+
+在终端里:
+
+```sh
+claude plugin marketplace add lemomo-ai/lemo-opuscar
+claude plugin install lemo-opuscar@lemolab
+```
+
+之后在任何目录都能用。第一次使用时,它会把指南、工具和风格提示词下载到 `~/lemo-opuscar`,所有片子共用这一份;每支片子的工程,从源码到成片,都放在你发起时所在的文件夹里。其他 agent 可以把 [`plugin/skills/lemo-opuscar/`](plugin/skills/lemo-opuscar/) 复制到它们的 skills 目录。
+
+### 方式二:clone 仓库
+
+```sh
+git clone https://github.com/lemomo-ai/lemo-opuscar.git
+cd lemo-opuscar
+claude
+```
+
+片子做到仓库里的 `films/<名字>/`。
+
+### 然后直接说
+
+> 用**油画厚涂**风格做一支 30 秒的片子,讲我家那只每天在窗台等我下班的橘猫。
+
+风格用中文名、英文名或文件夹名都行,全部风格见[风格索引](styles/README.md)。
+
+它开工前只问你一次:主题里它定不了的事、你有没有自己的**配音、音乐或其他素材**、要不要先看**分镜故事板**。要看的话,它会停一次,给你看用真实风格画出来的关键镜头;不看就直接做完成片。
+
+agent 会读三份指南,像一个小工作室一样开工。指南是英文写给 agent 看的,你用中文跟它说就行,片子的配音和字幕默认跟你用的语言一致。
+
+| 文件 | 给 agent 的东西 |
+|---|---|
+| [`DIRECTOR.md`](DIRECTOR.md) | 怎么导:故事、声音、节奏、镜头、表演、自检 |
+| [`TECHNIQUE.md`](TECHNIQUE.md) | 怎么做:逐帧渲染、配音、配乐、混音 |
+| `styles/<风格>/STYLE.md` | 这个风格长什么样、听起来什么样;故事由你定 |
+
+### 开始之前
+
+- 一支片子 agent 大约要做 30–60 分钟,token 用量不小。
+- 需要 Node 20+、ffmpeg 和 Python 3.11+(或 [uv](https://docs.astral.sh/uv/)),其余由 agent 安装。
+- 默认输出 1920×1080、24 fps,其他尺寸可以指定。
+
+更新:`claude plugin marketplace update lemolab && claude plugin update lemo-opuscar@lemolab`,然后重启 Claude Code(`~/lemo-opuscar` 里的库会在下一次做片时自动更新);卸载:`claude plugin uninstall lemo-opuscar@lemolab` 并删除 `~/lemo-opuscar`。一直卡住就[提个 issue](https://github.com/lemomo-ai/lemo-opuscar/issues)。
+
+## 风格
+
+点图片看它的 `STYLE.md`。
+
+<!-- styles:start -->
+
+### 手绘与绘画
+
+<table>
+<tr>
+<td width="33%" valign="top"><a href="styles/crayon-book/STYLE.md"><img src="docs/frames/crayon-book.jpg" alt="蜡笔儿童绘本"></a><br><b>蜡笔儿童绘本</b><br>Crayon Picture Book<br><i>The Moon Can&#x27;t Sleep</i><br><sub>月亮失眠了,小女孩爬上屋顶给它唱摇篮曲。</sub></td>
+<td width="33%" valign="top"><a href="styles/watercolor/STYLE.md"><img src="docs/frames/watercolor.jpg" alt="水彩笔刷"></a><br><b>水彩笔刷</b><br>Watercolor Brush<br><i>Follow the Rain</i><br><sub>跟着降雨从澳洲红色腹地一路画到绿色海岸,一镜到底。</sub></td>
+<td width="33%" valign="top"><a href="styles/ink-wash/STYLE.md"><img src="docs/frames/ink-wash.jpg" alt="中国水墨"></a><br><b>中国水墨</b><br>Chinese Ink Wash<br><i>The Swordsman and the River</i><br><sub>侠客踏水过江,一剑断流。</sub></td>
+</tr>
+<tr>
+<td width="33%" valign="top"><a href="styles/impasto/STYLE.md"><img src="docs/frames/impasto.jpg" alt="油画厚涂"></a><br><b>油画厚涂</b><br>Impasto Oil Painting<br><i>The Colour of Rain</i><br><sub>灰色雨中广场,第一把红伞撑开,圆舞曲把整个广场刷上颜色。</sub></td>
+<td width="33%" valign="top"><a href="styles/one-line/STYLE.md"><img src="docs/frames/one-line.jpg" alt="一笔画"></a><br><b>一笔画</b><br>One-line Drawing<br><i>The Line That Never Lifted</i><br><sub>一根不离纸的线画完一个人的一生,再把笔交给孩子。</sub></td>
+<td width="33%" valign="top"><a href="styles/whiteboard/STYLE.md"><img src="docs/frames/whiteboard.jpg" alt="白板讲解"></a><br><b>白板讲解</b><br>Whiteboard Explainer<br><i>Einstein in Your Pocket</i><br><sub>手机怎么知道你在哪:GPS、原子钟,和相对论每天多出的 38 微秒。</sub></td>
+</tr>
+<tr>
+<td width="33%" valign="top"><a href="styles/urban-sketch/STYLE.md"><img src="docs/frames/urban-sketch.jpg" alt="钢笔淡彩"></a><br><b>钢笔淡彩</b><br>Urban Sketch · Pen &amp; Wash<br><i>Where the Wind Went</i><br><sub>公园只是一张钢笔速写,风把草帽吹到哪里,哪里才有颜色。</sub></td>
+</tr>
+</table>
+
+### 东方传统
+
+<table>
+<tr>
+<td width="33%" valign="top"><a href="styles/shadow-puppet/STYLE.md"><img src="docs/frames/shadow-puppet.jpg" alt="皮影戏"></a><br><b>皮影戏</b><br>Shadow Puppetry<br><i>Hou Yi Shoots the Suns</i><br><sub>十日炙烤大地,后羿张弓射日。</sub></td>
+<td width="33%" valign="top"><a href="styles/ukiyoe/STYLE.md"><img src="docs/frames/ukiyoe.jpg" alt="浮世绘"></a><br><b>浮世绘</b><br>Ukiyo-e<br><i>A Journey Toward the Mountain</i><br><sub>旅人走向远山,每个镜头都是一幅版画,最后迎来一道巨浪。</sub></td>
+<td width="33%" valign="top"><a href="styles/papercut-red/STYLE.md"><img src="docs/frames/papercut-red.jpg" alt="红色窗花剪纸"></a><br><b>红色窗花剪纸</b><br>Red Paper-cut<br><i>Nian Comes to Town</i><br><sub>除夕年兽进村,小女孩剪出的大窗花照亮全村,把它吓跑。</sub></td>
+</tr>
+<tr>
+<td width="33%" valign="top"><a href="styles/paper-lantern/STYLE.md"><img src="docs/frames/paper-lantern.jpg" alt="纸雕灯影"></a><br><b>纸雕灯影</b><br>Paper-cut Lightbox<br><i>A Mooncake&#x27;s Longing</i><br><sub>一枚月饼讲中秋的团圆与思念,纸雕灯箱层层透光。</sub></td>
+</tr>
+</table>
+
+### 印刷与版画
+
+<table>
+<tr>
+<td width="33%" valign="top"><a href="styles/risograph/STYLE.md"><img src="docs/frames/risograph.jpg" alt="Risograph 丝网印刷"></a><br><b>Risograph 丝网印刷</b><br>Risograph Print<br><i>Sunday Ride</i><br><sub>周日早晨骑车穿过城市:面包店、公园、河边。</sub></td>
+<td width="33%" valign="top"><a href="styles/halftone-dossier/STYLE.md"><img src="docs/frames/halftone-dossier.jpg" alt="复古半调案卷"></a><br><b>复古半调案卷</b><br>Halftone Dossier<br><i>Case File: Chubby</i><br><sub>橘猫胖橘被立案审查:测试重力、凌晨跑酷,最后无罪释放。</sub></td>
+<td width="33%" valign="top"><a href="styles/woodcut/STYLE.md"><img src="docs/frames/woodcut.jpg" alt="木刻版画"></a><br><b>木刻版画</b><br>Woodcut Print<br><i>The Bell Founder</i><br><sub>村子用一整个冬天铸一口钟,钟声第一次响起,雪停了。</sub></td>
+</tr>
+<tr>
+<td width="33%" valign="top"><a href="styles/engraving/STYLE.md"><img src="docs/frames/engraving.jpg" alt="铜版画"></a><br><b>铜版画</b><br>Copperplate Engraving<br><i>The Honeybee, Plate VII</i><br><sub>一张博物志图版自己刻出来:雕刀推开铜版,蜜蜂一线线成形,最后手工水彩上色。</sub></td>
+<td width="33%" valign="top"><a href="styles/silkscreen-poster/STYLE.md"><img src="docs/frames/silkscreen-poster.jpg" alt="丝印旅行海报"></a><br><b>丝印旅行海报</b><br>Silkscreen Travel Poster<br><i>Three Trails</i><br><sub>三条步道各一张丝印海报,一色一刮印出来,再沿山脊一镜到底从正午爬到黄昏。</sub></td>
+</tr>
+</table>
+
+### 图形与排版
+
+<table>
+<tr>
+<td width="33%" valign="top"><a href="styles/swiss-motion/STYLE.md"><img src="docs/frames/swiss-motion.jpg" alt="瑞士动态排版"></a><br><b>瑞士动态排版</b><br>Swiss Motion Graphics<br><i>Five Rules for a Poster</i><br><sub>一张音乐会海报按瑞士设计的五条规则自己排版,第五条是只打破一条。</sub></td>
+<td width="33%" valign="top"><a href="styles/spy-titles/STYLE.md"><img src="docs/frames/spy-titles.jpg" alt="60s 间谍片头"></a><br><b>60s 间谍片头</b><br>60s Spy Title Sequence<br><i>The Velvet Cipher</i><br><sub>虚构 1964 年间谍片的片头:追一把被偷的钥匙,几何碎片最后拼成片名。</sub></td>
+<td width="33%" valign="top"><a href="styles/art-deco/STYLE.md"><img src="docs/frames/art-deco.jpg" alt="装饰艺术"></a><br><b>装饰艺术</b><br>Art Deco<br><i>Midnight at the Starlight Hotel</i><br><sub>1930 年的大饭店,门童赶在午夜前把一封信送上顶楼。</sub></td>
+</tr>
+<tr>
+<td width="33%" valign="top"><a href="styles/blueprint/STYLE.md"><img src="docs/frames/blueprint.jpg" alt="蓝图 / 工程制图"></a><br><b>蓝图 / 工程制图</b><br>Blueprint<br><i>Patent Pending: The Cloud Catcher</i><br><sub>发明家的蓝图自己画出一台接云机器,修订云线变成了真的雨云。</sub></td>
+<td width="33%" valign="top"><a href="styles/stained-glass/STYLE.md"><img src="docs/frames/stained-glass.jpg" alt="彩色玻璃窗"></a><br><b>彩色玻璃窗</b><br>Stained Glass<br><i>The Dragon of the East Window</i><br><sub>阳光从清晨移到黄昏,照到哪一格花窗,哪一格的故事就动起来。</sub></td>
+<td width="33%" valign="top"><a href="styles/pictogram-motion/STYLE.md"><img src="docs/frames/pictogram-motion.jpg" alt="象形运动图形"></a><br><b>象形运动图形</b><br>Pictogram Motion<br><i>Aichi-Nagoya 2026 — All 43 Sports</i><br><sub>2026 亚运会 43 个大项,几何象形人卡着节拍快闪。</sub></td>
+</tr>
+<tr>
+<td width="33%" valign="top"><a href="styles/ascii-crt/STYLE.md"><img src="docs/frames/ascii-crt.jpg" alt="ASCII / CRT 终端"></a><br><b>ASCII / CRT 终端</b><br>ASCII / CRT Terminal<br><i>Tranquility.log</i><br><sub>月球基地的 AI 沉睡 40 年后被唤醒,用字符画出“家”来回复。</sub></td>
+</tr>
+</table>
+
+### 信息与发布
+
+<table>
+<tr>
+<td width="33%" valign="top"><a href="styles/dataviz/STYLE.md"><img src="docs/frames/dataviz.jpg" alt="数据叙事"></a><br><b>数据叙事</b><br>Data Storytelling<br><i>A Hundred Summers</i><br><sub>一百年的夏季气温,图表本身就是故事。</sub></td>
+<td width="33%" valign="top"><a href="styles/iso-infographic/STYLE.md"><img src="docs/frames/iso-infographic.jpg" alt="等距信息图"></a><br><b>等距信息图</b><br>Isometric Infographic<br><i>From Bean to Cup</i><br><sub>一杯咖啡从种植园到你手里的旅程。</sub></td>
+<td width="33%" valign="top"><a href="styles/dark-keynote/STYLE.md"><img src="docs/frames/dark-keynote.jpg" alt="暗色科技发布"></a><br><b>暗色科技发布</b><br>Dark Tech Keynote<br><i>Room to Think</i><br><sub>虚构 app Tidy 的发布片:被埋掉的光标一键把几百个窗口归位。</sub></td>
+</tr>
+<tr>
+<td width="33%" valign="top"><a href="styles/living-screencast/STYLE.md"><img src="docs/frames/living-screencast.jpg" alt="活体实机录屏"></a><br><b>活体实机录屏</b><br>Living Screencast<br><i>Clawd Moves In</i><br><sub>像素小人 Clawd 跳出终端、搬进 Claude 应用,在一镜到底的录屏里演示 Plan 模式、diff 评论和自检。</sub></td>
+<td width="33%" valign="top"><a href="styles/hologram-hud/STYLE.md"><img src="docs/frames/hologram-hud.jpg" alt="科幻全息界面"></a><br><b>科幻全息界面</b><br>Sci-fi Hologram HUD<br><i>Volt · Spec Scan</i><br><sub>一辆电助力车被扫描成全息线框,目标框依次锁定电池、电机、刹车,参数逐个滚到真值。</sub></td>
+</tr>
+</table>
+
+### 卡通与动画
+
+<table>
+<tr>
+<td width="33%" valign="top"><a href="styles/rubber-hose/STYLE.md"><img src="docs/frames/rubber-hose.jpg" alt="1930s 橡皮管卡通"></a><br><b>1930s 橡皮管卡通</b><br>1930s Rubber Hose Cartoon<br><i>Coffee Cup Chase</i><br><sub>一只咖啡杯满厨房追一块逃跑的方糖。</sub></td>
+<td width="33%" valign="top"><a href="styles/cel-anime-80s/STYLE.md"><img src="docs/frames/cel-anime-80s.jpg" alt="80 年代赛璐璐动画"></a><br><b>80 年代赛璐璐动画</b><br>80s Cel Anime<br><i>City Lights, 1987</i><br><sub>快递少女骑车穿过雨后霓虹都市,赶在黎明发射前送到一盘磁带。</sub></td>
+<td width="33%" valign="top"><a href="styles/scifi-toon/STYLE.md"><img src="docs/frames/scifi-toon.jpg" alt="科幻情景喜剧卡通"></a><br><b>科幻情景喜剧卡通</b><br>Sci-Fi Sitcom Toon<br><i>Coffee Run</i><br><sub>厌世天才开传送门只想买杯咖啡,却穿过越来越离谱的平行宇宙。</sub></td>
+</tr>
+<tr>
+<td width="33%" valign="top"><a href="styles/midcentury-toon/STYLE.md"><img src="docs/frames/midcentury-toon.jpg" alt="50s 扁平卡通"></a><br><b>50s 扁平卡通</b><br>Mid-century Cartoon<br><i>Meet Pip</i><br><sub>用 50 年代教育片的口吻,三步教你装好一台扫地机:放充电座、连 app、按开始。</sub></td>
+</tr>
+</table>
+
+### 游戏
+
+<table>
+<tr>
+<td width="33%" valign="top"><a href="styles/pixel-rpg/STYLE.md"><img src="docs/frames/pixel-rpg.jpg" alt="16-bit 像素 RPG"></a><br><b>16-bit 像素 RPG</b><br>16-bit Pixel RPG<br><i>The Last Save Point</i><br><sub>勇士在最终 Boss 门前存档,存档画面闪回一路冒险。</sub></td>
+<td width="33%" valign="top"><a href="styles/hd-2d/STYLE.md"><img src="docs/frames/hd-2d.jpg" alt="HD-2D"></a><br><b>HD-2D</b><br><i>The Lampbearer</i><br><sub>灯塔熄灭,孙女提着最后一簇火穿过夜林、爬上风暴悬崖。</sub></td>
+<td width="33%" valign="top"><a href="styles/microgame/STYLE.md"><img src="docs/frames/microgame.jpg" alt="微游戏快闪(瓦里奥制造式)"></a><br><b>微游戏快闪(瓦里奥制造式)</b><br>Microgame Frenzy<br><i>Five-Second Astronaut</i><br><sub>见习宇航员闯五秒训练营,越来越快,Boss 关亲手降落回地球。</sub></td>
+</tr>
+<tr>
+<td width="33%" valign="top"><a href="styles/game-show/STYLE.md"><img src="docs/frames/game-show.jpg" alt="综艺节奏扁平"></a><br><b>综艺节奏扁平</b><br>Game Show Flat<br><i>Rhythm of AI, 1997 → 2026</i><br><sub>把 AI 发展史做成一局节奏游戏,模型踩着拍登场,最后发成绩单。</sub></td>
+</tr>
+</table>
+
+### 电影与时代
+
+<table>
+<tr>
+<td width="33%" valign="top"><a href="styles/silent-film/STYLE.md"><img src="docs/frames/silent-film.jpg" alt="1920s 默片"></a><br><b>1920s 默片</b><br>1920s Silent Film<br><i>The Runaway Loaf</i><br><sub>面包店学徒追一个滚走的面包,最后掰成两半分给饿肚子的小女孩。</sub></td>
+<td width="33%" valign="top"><a href="styles/backrooms/STYLE.md"><img src="docs/frames/backrooms.jpg" alt="后室 / 新怪谈"></a><br><b>后室 / 新怪谈</b><br>Liminal Found Footage<br><i>Night Shift Orientation</i><br><sub>新夜班员工拍下入职第一晚:无尽的黄色办公空间,和墙上的员工守则。</sub></td>
+</tr>
+</table>
+
+### 材质与 3D
+
+<table>
+<tr>
+<td width="33%" valign="top"><a href="styles/brick-toy/STYLE.md"><img src="docs/frames/brick-toy.jpg" alt="积木玩具"></a><br><b>积木玩具</b><br>Brick Toy<br><i>Rocket from Spare Parts</i><br><sub>积木宇航员用零件拼出火箭,飞向积木月亮。</sub></td>
+<td width="33%" valign="top"><a href="styles/paper-popup/STYLE.md"><img src="docs/frames/paper-popup.jpg" alt="纸片立体书"></a><br><b>纸片立体书</b><br>Paper Pop-up Book<br><i>Pip&#x27;s Paper Adventure</i><br><sub>立体书在书桌上打开,小精灵 Pip 在纸片世界冒险,最后跳出书外。</sub></td>
+<td width="33%" valign="top"><a href="styles/tilt-shift/STYLE.md"><img src="docs/frames/tilt-shift.jpg" alt="移轴微缩"></a><br><b>移轴微缩</b><br>Tilt-Shift Miniature<br><i>Toy Town Rush Hour</i><br><sub>玩具城的早高峰,一切都像模型。</sub></td>
+</tr>
+<tr>
+<td width="33%" valign="top"><a href="styles/lowpoly-island/STYLE.md"><img src="docs/frames/lowpoly-island.jpg" alt="低多边形等距"></a><br><b>低多边形等距</b><br>Low-poly Isometric Island<br><i>The Island That Grew</i><br><sub>空海里一格格长出小岛和村庄,每放一块响一个音符,直到星空。</sub></td>
+<td width="33%" valign="top"><a href="styles/glass-product/STYLE.md"><img src="docs/frames/glass-product.jpg" alt="玻璃质感产品"></a><br><b>玻璃质感产品</b><br>Glass Product Render<br><i>Aura — Hear the Light</i><br><sub>虚构玻璃耳机 Aura 的开箱与特写。</sub></td>
+</tr>
+</table>
+<!-- styles:end -->
+
+## 授权
+
+**LemoLab × Claude Opus 5.5** 出品,MIT 协议。样片中的第三方素材沿用各自的授权(见各样片的 `CREDITS`);你在自己片子里使用的素材由你负责。
diff --git a/core/audio/pluck.py b/core/audio/pluck.py
index 40a3e3e..5a386e7 100644
--- a/core/audio/pluck.py
+++ b/core/audio/pluck.py
@@ -26,7 +26,7 @@ def midi(p):
if isinstance(p, (int, float, np.integer, np.floating)): return float(p)
import re
m = re.fullmatch(r'\s*([A-Ga-g])([#sb]*)(-?\d+)\s*', str(p))
- if not m: raise ValueError(f'无法解析音高 {p!r}')
+ if not m: raise ValueError(f'cannot parse pitch {p!r}')
return float(12 * (int(m.group(3)) + 1) + {'C': 0, 'D': 2, 'E': 4, 'F': 5, 'G': 7, 'A': 9, 'B': 11}[m.group(1).upper()]
+ m.group(2).count('#') + m.group(2).count('s') - m.group(2).count('b'))
@@ -215,7 +215,7 @@ def pluck(preset, pitch, dur=None, vel=.8, **kw):
pitch: 'D3' 或 midi(可小数);dur: 按住时长(s),None=自然衰减完;vel 0..1
kw: harmonic=True(泛音)、bend=[(t,半音)...]、vib=(Hz,深度半音,起始s)、glide=(目标音高,s)、trem=Hz(轮指/摇指)、
以及覆盖预设参数 t60/damp/pos/bright/buzz/thr/bmix/noise、release"""
- if preset not in PRESETS: raise KeyError(f'未知预设 {preset!r};可用 {list(PRESETS)}')
+ if preset not in PRESETS: raise KeyError(f'unknown preset {preset!r}; available: {list(PRESETS)}')
m = midi(pitch); vel = float(np.clip(vel, .01, 1))
pr = PRESETS[preset]
y = _modal(preset, m, dur, vel, **kw) if pr.get('modal') else _string(pr, m, dur, vel, **kw)
diff --git a/core/audio/sampler.py b/core/audio/sampler.py
index f14421d..0e3b9e5 100644
--- a/core/audio/sampler.py
+++ b/core/audio/sampler.py
@@ -38,7 +38,7 @@ def midi(p):
"""'C#4' / 'Db3' / 'Bb-1' / 61 / 61.5 → midi(C4=60,允许小数=微分音)"""
if isinstance(p, (int, float, np.integer, np.floating)): return float(p)
m = re.fullmatch(r'\s*([A-Ga-g])([#sb♯♭]*)(-?\d+)\s*', str(p))
- if not m: raise ValueError(f'无法解析音高 {p!r}')
+ if not m: raise ValueError(f'cannot parse pitch {p!r}')
acc = m.group(2).count('#') + m.group(2).count('s') + m.group(2).count('♯') - m.group(2).count('b') - m.group(2).count('♭')
return float(12 * (int(m.group(3)) + 1) + _PC[m.group(1).upper()] + acc)
@@ -58,119 +58,119 @@ V, C, F, K, SAL = 'vsco2ce/', 'vcsl/', 'freepats/', 'karoryfer/', 'salamander/'
VI, VM = C + 'Idiophones/Struck Idiophones/', C + 'Membranophones/Struck Membranophones/'
REG = {
# 弦乐
- 'violins': dict(src=V + 'Strings/Violin Section/susVib', kind='sus', rel=.35, fam='弦乐', desc='小提琴组 长音(揉弦)'),
- 'violins_trem': dict(src=V + 'Strings/Violin Section/Trem', kind='sus', rel=.3, fam='弦乐', desc='小提琴组 震音'),
- 'violins_pizz': dict(src=V + 'Strings/Violin Section/Pizz', kind='dec', rel=.15, fam='弦乐', desc='小提琴组 拨奏'),
- 'violins_spic': dict(src=V + 'Strings/Violin Section/Spic', kind='dec', rel=.1, fam='弦乐', desc='小提琴组 跳弓(短音)'),
- 'violin': dict(src=V + 'Strings/Solo Violin/Arco Vib', kind='sus', rel=.3, fam='弦乐', desc='独奏小提琴 长音'),
- 'violin_pizz': dict(src=V + 'Strings/Solo Violin/Pizz', kind='dec', rel=.15, fam='弦乐', desc='独奏小提琴 拨奏'),
- 'violas': dict(src=V + 'Strings/Viola Section/susvib', kind='sus', rel=.35, fam='弦乐', desc='中提琴组 长音'),
- 'violas_pizz': dict(src=V + 'Strings/Viola Section/pizz', kind='dec', rel=.15, fam='弦乐', desc='中提琴组 拨奏'),
- 'cellos': dict(src=V + 'Strings/Cello Section/susvib', kind='sus', rel=.4, fam='弦乐', desc='大提琴组 长音'),
- 'cellos_pizz': dict(src=V + 'Strings/Cello Section/pizzT', kind='dec', rel=.2, fam='弦乐', desc='大提琴组 拨奏'),
- 'cellos_spic': dict(src=V + 'Strings/Cello Section/spic', kind='dec', rel=.12, fam='弦乐', desc='大提琴组 跳弓'),
- 'contrabass': dict(src=V + 'Strings/Solo Contrabass/SusVib', kind='sus', rel=.4, fam='弦乐', desc='低音提琴 长音'),
- 'contrabass_pizz': dict(src=V + 'Strings/Solo Contrabass/Pizz', kind='dec', rel=.2, fam='弦乐', desc='低音提琴 古典拨奏'),
- 'harp': dict(src=C + 'Chordophones/Composite Chordophones/Concert Harp', kind='dec', rel=1.2, fam='弦乐', desc='竖琴'),
+ 'violins': dict(src=V + 'Strings/Violin Section/susVib', kind='sus', rel=.35, fam='弦乐', desc='violin section, sustained (vibrato)'),
+ 'violins_trem': dict(src=V + 'Strings/Violin Section/Trem', kind='sus', rel=.3, fam='弦乐', desc='violin section, tremolo'),
+ 'violins_pizz': dict(src=V + 'Strings/Violin Section/Pizz', kind='dec', rel=.15, fam='弦乐', desc='violin section, pizzicato'),
+ 'violins_spic': dict(src=V + 'Strings/Violin Section/Spic', kind='dec', rel=.1, fam='弦乐', desc='violin section, spiccato (short)'),
+ 'violin': dict(src=V + 'Strings/Solo Violin/Arco Vib', kind='sus', rel=.3, fam='弦乐', desc='solo violin, sustained'),
+ 'violin_pizz': dict(src=V + 'Strings/Solo Violin/Pizz', kind='dec', rel=.15, fam='弦乐', desc='solo violin, pizzicato'),
+ 'violas': dict(src=V + 'Strings/Viola Section/susvib', kind='sus', rel=.35, fam='弦乐', desc='viola section, sustained'),
+ 'violas_pizz': dict(src=V + 'Strings/Viola Section/pizz', kind='dec', rel=.15, fam='弦乐', desc='viola section, pizzicato'),
+ 'cellos': dict(src=V + 'Strings/Cello Section/susvib', kind='sus', rel=.4, fam='弦乐', desc='cello section, sustained'),
+ 'cellos_pizz': dict(src=V + 'Strings/Cello Section/pizzT', kind='dec', rel=.2, fam='弦乐', desc='cello section, pizzicato'),
+ 'cellos_spic': dict(src=V + 'Strings/Cello Section/spic', kind='dec', rel=.12, fam='弦乐', desc='cello section, spiccato'),
+ 'contrabass': dict(src=V + 'Strings/Solo Contrabass/SusVib', kind='sus', rel=.4, fam='弦乐', desc='contrabass, sustained'),
+ 'contrabass_pizz': dict(src=V + 'Strings/Solo Contrabass/Pizz', kind='dec', rel=.2, fam='弦乐', desc='contrabass, classical pizzicato'),
+ 'harp': dict(src=C + 'Chordophones/Composite Chordophones/Concert Harp', kind='dec', rel=1.2, fam='弦乐', desc='harp'),
# 木管
- 'flute': dict(src=V + 'Woodwinds/Flute/susvib', kind='sus', rel=.25, fam='木管', desc='长笛 长音'),
- 'flute_stac': dict(src=V + 'Woodwinds/Flute/stac', kind='dec', rel=.1, fam='木管', desc='长笛 断奏'),
- 'piccolo': dict(src=V + 'Woodwinds/Piccolo/Sus', kind='sus', rel=.2, fam='木管', desc='短笛'),
- 'clarinet': dict(src=V + 'Woodwinds/Clarinet/susLong', kind='sus', rel=.25, fam='木管', desc='单簧管 长音'),
- 'clarinet_stac': dict(src=V + 'Woodwinds/Clarinet/stac', kind='dec', rel=.1, fam='木管', desc='单簧管 断奏'),
- 'oboe': dict(src=V + 'Woodwinds/Oboe/Vib', kind='sus', rel=.25, fam='木管', desc='双簧管 长音'),
- 'oboe_stac': dict(src=V + 'Woodwinds/Oboe/Stacc', kind='dec', rel=.1, fam='木管', desc='双簧管 断奏'),
- 'bassoon': dict(src=V + 'Woodwinds/Bassoon/sus', kind='sus', rel=.25, fam='木管', desc='巴松 长音'),
- 'bassoon_stac': dict(src=V + 'Woodwinds/Bassoon/stac', kind='dec', rel=.1, fam='木管', desc='巴松 断奏'),
- 'recorder': dict(src=C + 'Aerophones/Edge-blown Aerophones/Baroque Alto Recorder/Sustain', kind='sus', rel=.15, fam='木管', desc='中音竖笛(巴洛克)'),
- 'ocarina': dict(src=(C + 'Aerophones/Edge-blown Aerophones/Ocarina, Typical/Sustains', r'_Sus_'), kind='sus', rel=.15, fam='木管', desc='陶笛'),
- 'tenor_sax': dict(src=C + 'Aerophones/Reed Aerophones/Tenor Saxophone/Vibrato', kind='sus', rel=.2, fam='木管', desc='次中音萨克斯 揉音'),
- 'tenor_sax_nv': dict(src=C + 'Aerophones/Reed Aerophones/Tenor Saxophone/Non-Vibrato', kind='sus', rel=.2, fam='木管', desc='次中音萨克斯 直音'),
- 'tenor_sax_stac': dict(src=C + 'Aerophones/Reed Aerophones/Tenor Saxophone/Staccato', kind='dec', rel=.08, fam='木管', desc='次中音萨克斯 断奏'),
- 'alto_sax': dict(src=K + 'weresax/Samples/alto', kind='sus', rel=.2, pp='lower', fam='木管', desc='中音萨克斯(Weresax)'),
- 'harmonica': dict(src=(C + 'Aerophones/Free Aerophones/Harmonica-Hohner-Super64/Sustains', r'_Normal'), kind='sus', rel=.15, fam='木管', desc='半音阶口琴'),
+ 'flute': dict(src=V + 'Woodwinds/Flute/susvib', kind='sus', rel=.25, fam='木管', desc='flute, sustained'),
+ 'flute_stac': dict(src=V + 'Woodwinds/Flute/stac', kind='dec', rel=.1, fam='木管', desc='flute, staccato'),
+ 'piccolo': dict(src=V + 'Woodwinds/Piccolo/Sus', kind='sus', rel=.2, fam='木管', desc='piccolo'),
+ 'clarinet': dict(src=V + 'Woodwinds/Clarinet/susLong', kind='sus', rel=.25, fam='木管', desc='clarinet, sustained'),
+ 'clarinet_stac': dict(src=V + 'Woodwinds/Clarinet/stac', kind='dec', rel=.1, fam='木管', desc='clarinet, staccato'),
+ 'oboe': dict(src=V + 'Woodwinds/Oboe/Vib', kind='sus', rel=.25, fam='木管', desc='oboe, sustained'),
+ 'oboe_stac': dict(src=V + 'Woodwinds/Oboe/Stacc', kind='dec', rel=.1, fam='木管', desc='oboe, staccato'),
+ 'bassoon': dict(src=V + 'Woodwinds/Bassoon/sus', kind='sus', rel=.25, fam='木管', desc='bassoon, sustained'),
+ 'bassoon_stac': dict(src=V + 'Woodwinds/Bassoon/stac', kind='dec', rel=.1, fam='木管', desc='bassoon, staccato'),
+ 'recorder': dict(src=C + 'Aerophones/Edge-blown Aerophones/Baroque Alto Recorder/Sustain', kind='sus', rel=.15, fam='木管', desc='alto recorder (baroque)'),
+ 'ocarina': dict(src=(C + 'Aerophones/Edge-blown Aerophones/Ocarina, Typical/Sustains', r'_Sus_'), kind='sus', rel=.15, fam='木管', desc='ocarina'),
+ 'tenor_sax': dict(src=C + 'Aerophones/Reed Aerophones/Tenor Saxophone/Vibrato', kind='sus', rel=.2, fam='木管', desc='tenor sax, vibrato'),
+ 'tenor_sax_nv': dict(src=C + 'Aerophones/Reed Aerophones/Tenor Saxophone/Non-Vibrato', kind='sus', rel=.2, fam='木管', desc='tenor sax, straight tone'),
+ 'tenor_sax_stac': dict(src=C + 'Aerophones/Reed Aerophones/Tenor Saxophone/Staccato', kind='dec', rel=.08, fam='木管', desc='tenor sax, staccato'),
+ 'alto_sax': dict(src=K + 'weresax/Samples/alto', kind='sus', rel=.2, pp='lower', fam='木管', desc='alto sax (Weresax)'),
+ 'harmonica': dict(src=(C + 'Aerophones/Free Aerophones/Harmonica-Hohner-Super64/Sustains', r'_Normal'), kind='sus', rel=.15, fam='木管', desc='chromatic harmonica'),
# 铜管
- 'trumpet': dict(src=V + 'Brass/Trumpet/sus', kind='sus', rel=.25, fam='铜管', desc='小号 长音'),
- 'trumpet_stac': dict(src=V + 'Brass/Trumpet/stac', kind='dec', rel=.1, fam='铜管', desc='小号 断奏'),
- 'trumpet_mute': dict(src=V + 'Brass/Trumpet/straightM-sus', kind='sus', rel=.2, fam='铜管', desc='小号 直弱音器'),
- 'horn': dict(src=V + 'Brass/F Horn/sus', kind='sus', rel=.35, fam='铜管', desc='圆号 长音'),
- 'horn_stac': dict(src=V + 'Brass/F Horn/stac', kind='dec', rel=.12, fam='铜管', desc='圆号 断奏'),
- 'trombone': dict(src=V + 'Brass/Tenor Trombone/sus', kind='sus', rel=.3, fam='铜管', desc='长号 长音'),
- 'trombone_stac': dict(src=V + 'Brass/Tenor Trombone/stac', kind='dec', rel=.12, fam='铜管', desc='长号 断奏'),
- 'tuba': dict(src=V + 'Brass/Tuba/sus', kind='sus', rel=.3, fam='铜管', desc='大号 长音'),
- 'tuba_stac': dict(src=V + 'Brass/Tuba/stac', kind='dec', rel=.12, fam='铜管', desc='大号 断奏'),
+ 'trumpet': dict(src=V + 'Brass/Trumpet/sus', kind='sus', rel=.25, fam='铜管', desc='trumpet, sustained'),
+ 'trumpet_stac': dict(src=V + 'Brass/Trumpet/stac', kind='dec', rel=.1, fam='铜管', desc='trumpet, staccato'),
+ 'trumpet_mute': dict(src=V + 'Brass/Trumpet/straightM-sus', kind='sus', rel=.2, fam='铜管', desc='trumpet, straight mute'),
+ 'horn': dict(src=V + 'Brass/F Horn/sus', kind='sus', rel=.35, fam='铜管', desc='French horn, sustained'),
+ 'horn_stac': dict(src=V + 'Brass/F Horn/stac', kind='dec', rel=.12, fam='铜管', desc='French horn, staccato'),
+ 'trombone': dict(src=V + 'Brass/Tenor Trombone/sus', kind='sus', rel=.3, fam='铜管', desc='trombone, sustained'),
+ 'trombone_stac': dict(src=V + 'Brass/Tenor Trombone/stac', kind='dec', rel=.12, fam='铜管', desc='trombone, staccato'),
+ 'tuba': dict(src=V + 'Brass/Tuba/sus', kind='sus', rel=.3, fam='铜管', desc='tuba, sustained'),
+ 'tuba_stac': dict(src=V + 'Brass/Tuba/stac', kind='dec', rel=.12, fam='铜管', desc='tuba, staccato'),
# 有音高打击
- 'timpani': dict(src=V + 'Percussion/Timpani', kind='dec', rel=1.5, pp='detect', fam='打击', desc='定音鼓(5 面鼓;音高=主振动模 (1,1) 频谱实测)',
+ 'timpani': dict(src=V + 'Percussion/Timpani', kind='dec', rel=1.5, pp='detect', fam='打击', desc='timpani (5 drums; pitch = measured (1,1) main mode)',
roots={'drum1': 41.47, 'drum2': 46.81, 'drum3': 49.57, 'drum4': 52.5, 'drum5': 54.63},
var={f'drum{i}': f'Timpani{i}_' for i in range(1, 6)}),
- 'glockenspiel': dict(src=VI + 'Glockenspiel', kind='dec', rel=1.5, fam='打击', desc='钟琴'),
- 'xylophone': dict(src=VI + 'Xylophone/Medium Mallets', kind='dec', rel=.5, fam='打击', desc='木琴'),
- 'marimba': dict(src=VI + 'Marimba', kind='dec', rel=.8, fam='打击', desc='马林巴'),
- 'vibraphone': dict(src=VI + 'Vibraphone/Soft Mallets', kind='dec', rel=1.5, fam='打击', desc='颤音琴 软槌'),
- 'vibraphone_hard': dict(src=VI + 'Vibraphone/Hard Mallets', kind='dec', rel=1.5, fam='打击', desc='颤音琴 硬槌'),
- 'vibraphone_bowed': dict(src=VI + 'Vibraphone/Bowed', kind='sus', rel=1.0, fam='打击', desc='颤音琴 弓奏(空灵长音)'),
- 'tubular_bells': dict(src=VI + 'Tubular Bells 1', kind='dec', rel=3.0, retune=False, fam='打击', desc='管钟'),
- 'hand_chimes': dict(src=VI + 'Hand Chimes', kind='dec', rel=2.0, fam='打击', desc='手摇钟(柔和钟声)'),
- 'kalimba': dict(src=F + 'kalimba', kind='dec', rel=1.2, pp='sfz', fam='打击', desc='卡林巴(拇指琴)'),
- 'mbira': dict(src=C + 'Idiophones/Plucked Idiophones/Kalimba, Tanzania', kind='dec', rel=1.2, fam='打击', desc='姆比拉/坦桑尼亚卡林巴(更粗粝;原琴非平均律,已按实测校到平均律)'),
- 'hang': dict(src=F + 'hang', kind='dec', rel=3.0, pp='sfz', fam='打击', desc='手碟 Hang(D 小调,仅原琴音最好听)'),
- 'glass': dict(src=F + 'glass', kind='dec', rel=2.0, pp='sfz', fam='打击', desc='水杯琴'),
+ 'glockenspiel': dict(src=VI + 'Glockenspiel', kind='dec', rel=1.5, fam='打击', desc='glockenspiel'),
+ 'xylophone': dict(src=VI + 'Xylophone/Medium Mallets', kind='dec', rel=.5, fam='打击', desc='xylophone'),
+ 'marimba': dict(src=VI + 'Marimba', kind='dec', rel=.8, fam='打击', desc='marimba'),
+ 'vibraphone': dict(src=VI + 'Vibraphone/Soft Mallets', kind='dec', rel=1.5, fam='打击', desc='vibraphone, soft mallets'),
+ 'vibraphone_hard': dict(src=VI + 'Vibraphone/Hard Mallets', kind='dec', rel=1.5, fam='打击', desc='vibraphone, hard mallets'),
+ 'vibraphone_bowed': dict(src=VI + 'Vibraphone/Bowed', kind='sus', rel=1.0, fam='打击', desc='vibraphone, bowed (airy sustain)'),
+ 'tubular_bells': dict(src=VI + 'Tubular Bells 1', kind='dec', rel=3.0, retune=False, fam='打击', desc='tubular bells'),
+ 'hand_chimes': dict(src=VI + 'Hand Chimes', kind='dec', rel=2.0, fam='打击', desc='hand chimes (soft bells)'),
+ 'kalimba': dict(src=F + 'kalimba', kind='dec', rel=1.2, pp='sfz', fam='打击', desc='kalimba (thumb piano)'),
+ 'mbira': dict(src=C + 'Idiophones/Plucked Idiophones/Kalimba, Tanzania', kind='dec', rel=1.2, fam='打击', desc='mbira / Tanzanian kalimba (grittier; tuned from measured pitch to equal temperament)'),
+ 'hang': dict(src=F + 'hang', kind='dec', rel=3.0, pp='sfz', fam='打击', desc='hang drum (D minor; sounds best on its own notes)'),
+ 'glass': dict(src=F + 'glass', kind='dec', rel=2.0, pp='sfz', fam='打击', desc='glass harp'),
# 键盘
- 'piano': dict(src=SAL + 'samples', kind='dec', rel=.4, pp='sal', fam='键盘', desc='Salamander 三角钢琴(Yamaha C5,5 力度层)', lic='salamander'),
- 'upright': dict(src=V + 'Keys/Upright Nr1', kind='dec', rel=.35, retune=False, fam='键盘', desc='立式钢琴(温暖、略旧)'),
- 'honky_tonk': dict(src=F + 'piano_fb', kind='dec', rel=.4, pp='sfz', fam='键盘', desc='老式自动钢琴(酒馆 honky-tonk 味)'),
- 'harpsichord': dict(src=C + 'Chordophones/Zithers/Harpsichord, Italian/Sustains', kind='dec', rel=.15, fam='键盘', desc='羽管键琴(意大利式)'),
- 'organ': dict(src=(V + 'Keys/Organ/Loud', r'Man3'), kind='sus', rel=.2, pp='organ', oct=0, fam='键盘', desc='管风琴 手键盘全开(含 16\' 音栓,厚重)'),
- 'organ_soft': dict(src=(V + 'Keys/Organ/Quiet', r'Man3'), kind='sus', rel=.2, pp='organ', oct=0, fam='键盘', desc='管风琴 手键盘柔和音栓'),
- 'organ_pedal': dict(src=(V + 'Keys/Organ', r'Pedal'), kind='sus', rel=.3, pp='detect', fam='键盘', desc='管风琴 踏板低音(音高按实测)'),
- 'accordion': dict(src=F + 'accordion', kind='sus', rel=.13, pp='sfz', fam='键盘', desc='按键手风琴'),
+ 'piano': dict(src=SAL + 'samples', kind='dec', rel=.4, pp='sal', fam='键盘', desc='Salamander grand piano (Yamaha C5, 5 velocity layers)', lic='salamander'),
+ 'upright': dict(src=V + 'Keys/Upright Nr1', kind='dec', rel=.35, retune=False, fam='键盘', desc='upright piano (warm, slightly worn)'),
+ 'honky_tonk': dict(src=F + 'piano_fb', kind='dec', rel=.4, pp='sfz', fam='键盘', desc='old player piano (saloon honky-tonk)'),
+ 'harpsichord': dict(src=C + 'Chordophones/Zithers/Harpsichord, Italian/Sustains', kind='dec', rel=.15, fam='键盘', desc='harpsichord (Italian)'),
+ 'organ': dict(src=(V + 'Keys/Organ/Loud', r'Man3'), kind='sus', rel=.2, pp='organ', oct=0, fam='键盘', desc='pipe organ, full manual (with 16\' stop, heavy)'),
+ 'organ_soft': dict(src=(V + 'Keys/Organ/Quiet', r'Man3'), kind='sus', rel=.2, pp='organ', oct=0, fam='键盘', desc='pipe organ, soft manual stops'),
+ 'organ_pedal': dict(src=(V + 'Keys/Organ', r'Pedal'), kind='sus', rel=.3, pp='detect', fam='键盘', desc='pipe organ, pedal bass (measured pitch)'),
+ 'accordion': dict(src=F + 'accordion', kind='sus', rel=.13, pp='sfz', fam='键盘', desc='button accordion'),
# 拨弦 / 民族
- 'guitar_nylon': dict(src=F + 'spanish_guitar', kind='dec', rel=.3, pp='sfz', fam='拨弦', desc='尼龙弦古典吉他'),
- 'ukulele': dict(src=F + 'ukulele', kind='dec', rel=.3, pp='sfz', fam='拨弦', desc='尤克里里'),
- 'electric_guitar': dict(src=F + 'eguitar_clean', kind='dec', rel=.3, pp='sfz', fam='拨弦', desc='清音电吉他'),
- 'electric_bass': dict(src=F + 'finger_bass', kind='dec', rel=.12, pp='sfz', fam='拨弦', desc='电贝斯 指弹'),
- 'jazz_bass': dict(src=K + 'sneakybass/Samples/finger', kind='dec', rel=.15, pp='lower', oct=-12, fam='拨弦', desc='低音提琴 爵士拨弦(Sneakybass)'),
- 'strumstick': dict(src=C + 'Chordophones/Composite Chordophones/Strumstick/Finger', kind='dec', rel=.4, fam='拨弦', desc='Strumstick 民谣扬琴式拨弦(钢弦民谣感)'),
- 'dan_tranh': dict(src=C + 'Chordophones/Zithers/Dan Tranh/Normal', kind='dec', rel=1.0, fam='拨弦', desc='越南筝 Đàn tranh(与古筝同源,可作古筝)'),
- 'dan_tranh_trem': dict(src=C + 'Chordophones/Zithers/Dan Tranh/Tremolo', kind='sus', rel=.5, fam='拨弦', desc='越南筝 摇指'),
- 'erhu': dict(src=K + 'erhu/Samples/sus', kind='sus', rel=.25, pp='lower', fam='民族', desc='二胡 长音'),
- 'erhu_stac': dict(src=K + 'erhu/Samples/stac', kind='dec', rel=.1, pp='lower', fam='民族', desc='二胡 短弓'),
- 'bagpipe': dict(src=F + 'bagpipe', kind='sus', rel=.4, pp='sfz', fam='民族', desc='风笛(旋律管;G2/G3 为持续低音管)'),
+ 'guitar_nylon': dict(src=F + 'spanish_guitar', kind='dec', rel=.3, pp='sfz', fam='拨弦', desc='nylon-string classical guitar'),
+ 'ukulele': dict(src=F + 'ukulele', kind='dec', rel=.3, pp='sfz', fam='拨弦', desc='ukulele'),
+ 'electric_guitar': dict(src=F + 'eguitar_clean', kind='dec', rel=.3, pp='sfz', fam='拨弦', desc='clean electric guitar'),
+ 'electric_bass': dict(src=F + 'finger_bass', kind='dec', rel=.12, pp='sfz', fam='拨弦', desc='electric bass, fingered'),
+ 'jazz_bass': dict(src=K + 'sneakybass/Samples/finger', kind='dec', rel=.15, pp='lower', oct=-12, fam='拨弦', desc='double bass, jazz pizzicato (Sneakybass)'),
+ 'strumstick': dict(src=C + 'Chordophones/Composite Chordophones/Strumstick/Finger', kind='dec', rel=.4, fam='拨弦', desc='Strumstick, dulcimer-like steel-string folk pluck'),
+ 'dan_tranh': dict(src=C + 'Chordophones/Zithers/Dan Tranh/Normal', kind='dec', rel=1.0, fam='拨弦', desc='Vietnamese zither đàn tranh (kin to the guzheng; works as one)'),
+ 'dan_tranh_trem': dict(src=C + 'Chordophones/Zithers/Dan Tranh/Tremolo', kind='sus', rel=.5, fam='拨弦', desc='đàn tranh, tremolo'),
+ 'erhu': dict(src=K + 'erhu/Samples/sus', kind='sus', rel=.25, pp='lower', fam='民族', desc='erhu, sustained'),
+ 'erhu_stac': dict(src=K + 'erhu/Samples/stac', kind='dec', rel=.1, pp='lower', fam='民族', desc='erhu, short bow'),
+ 'bagpipe': dict(src=F + 'bagpipe', kind='sus', rel=.4, pp='sfz', fam='民族', desc='bagpipe (chanter; G2/G3 are the drones)'),
# 无音高打击
- 'bass_drum': dict(src=(V + 'Percussion', r'^BDrumNewhit'), kind='hit', fam='打击', desc='音乐会大鼓(7 力度层)'),
- 'gran_cassa': dict(src=VM + 'Bass Drum 2', kind='hit', fam='打击', desc='大鼓 2(含滚奏/渐强)',
+ 'bass_drum': dict(src=(V + 'Percussion', r'^BDrumNewhit'), kind='hit', fam='打击', desc='concert bass drum (7 velocity layers)'),
+ 'gran_cassa': dict(src=VM + 'Bass Drum 2', kind='hit', fam='打击', desc='bass drum 2 (with rolls / crescendos)',
var={'hit': r'_hit_', 'roll': r'_roll_(pp|mp|mf|ff|f)\.', 'roll_fast': r'_roll_fast_\w+(?<!_rel)\.', 'cresc': r'_cresc_', 'rub': r'_rub'}),
- 'snare': dict(src=(V + 'Percussion', r'^Snare2-'), kind='hit', fam='打击', desc='军鼓(管弦)',
+ 'snare': dict(src=(V + 'Percussion', r'^Snare2-'), kind='hit', fam='打击', desc='snare drum (orchestral)',
var={'on': r'HitSN', 'off': r'HitNS', 'roll': r'rollSN', 'roll_off': r'rollNS'}),
- 'snare2': dict(src=VM + 'Snare Drum, Modern 1', kind='hit', fam='打击', desc='军鼓 2(近拾音)',
+ 'snare2': dict(src=VM + 'Snare Drum, Modern 1', kind='hit', fam='打击', desc='snare drum 2 (close-miked)',
var={'on': r'HitSN', 'off': r'HitNS', 'roll': r'rollSN', 'stick': r'_stick_', 'taps': r'_taps_'}),
- 'toms': dict(src=(VM, r'Tom [12]/'), kind='hit', fam='打击', desc='通鼓(高/低 × 鼓棒/槌)',
+ 'toms': dict(src=(VM, r'Tom [12]/'), kind='hit', fam='打击', desc='toms (high/low × sticks/mallets)',
var={'high': r'TomH_HitS', 'low': r'TomL_HitS', 'high_mallet': r'TomH_HitM', 'low_mallet': r'TomL_HitM', 'roll': r'Roll'}),
- 'crash': dict(src=(V + 'Percussion', r'^cymbal-crash1'), kind='hit', fam='打击', desc='对镲(管弦)'),
- 'clash': dict(src=VI + 'Clash Cymbals 1', kind='hit', fam='打击', desc='对镲 2', var={'crash': r'crash1_(pp|mp|mf|ff)\d', 'short': r'short'}),
- 'sus_cymbal': dict(src=VI + 'Suspended Cymbal 1', kind='hit', fam='打击', desc='吊镲(软槌/棒/镲帽/滚奏/渐强/弓)',
+ 'crash': dict(src=(V + 'Percussion', r'^cymbal-crash1'), kind='hit', fam='打击', desc='crash cymbals (orchestral)'),
+ 'clash': dict(src=VI + 'Clash Cymbals 1', kind='hit', fam='打击', desc='crash cymbals 2', var={'crash': r'crash1_(pp|mp|mf|ff)\d', 'short': r'short'}),
+ 'sus_cymbal': dict(src=VI + 'Suspended Cymbal 1', kind='hit', fam='打击', desc='suspended cymbal (soft mallet/stick/bell/roll/crescendo/bowed)',
var={'hit': r'_hit_(pp|mp|f|fff)\d', 'stick': r'_hit_stick', 'bell': r'_hit_bell', 'roll': r'_roll_\w+_nloop',
'cresc': r'_cresc_', 'bow': r'_bow_', 'scrape': r'_scrape'}),
- 'gong': dict(src=(V + 'Percussion', r'^gongHit'), kind='hit', fam='打击', desc='大锣/Tam-tam'),
- 'gong2': dict(src=VI + 'Gong 1', kind='hit', fam='打击', desc='锣 2(含小锣、刮奏)', var={'big': r'^gong_(p|mf|f|fff)\.', 'small': r'gong_2_', 'scrape': r'scrape'}),
- 'triangle': dict(src=VI + 'Triangles', kind='hit', fam='打击', desc='三角铁',
+ 'gong': dict(src=(V + 'Percussion', r'^gongHit'), kind='hit', fam='打击', desc='tam-tam / gong'),
+ 'gong2': dict(src=VI + 'Gong 1', kind='hit', fam='打击', desc='gong 2 (incl. small gong, scrapes)', var={'big': r'^gong_(p|mf|f|fff)\.', 'small': r'gong_2_', 'scrape': r'scrape'}),
+ 'triangle': dict(src=VI + 'Triangles', kind='hit', fam='打击', desc='triangle',
var={'open': r'_Hit_', 'muted': r'_HitM_', 'semi': r'(?i)_hitFM_', 'roll': r'_Roll'}),
- 'tambourine': dict(src=(V + 'Percussion', r'^Tamb1'), kind='hit', fam='打击', desc='铃鼓'),
- 'claves': dict(src=(V + 'Percussion', r'^Claves1'), kind='hit', fam='打击', desc='响棒'),
- 'cowbell': dict(src=(V + 'Percussion', r'^Cowbell1'), kind='hit', fam='打击', desc='牛铃'),
- 'sleighbells': dict(src=(V + 'Percussion', r'^Sleighbells'), kind='hit', fam='打击', desc='雪橇铃'),
- 'log_drum': dict(src=(V + 'Percussion', r'^LogDrum'), kind='hit', fam='打击', desc='木鱼鼓/裂缝鼓', var={'hi': 'LogDrumHi', 'lo': 'LogDrumLo'}),
- 'woodblock': dict(src=VI + 'Woodblock', kind='hit', fam='打击', desc='木块', var={'a': r'wood_click_', 'b': r'wood_click2', 'c': r'wood_click3'}),
- 'frame_drum': dict(src=VM + 'Frame Drum', kind='hit', fam='打击', desc='手鼓/框鼓',
+ 'tambourine': dict(src=(V + 'Percussion', r'^Tamb1'), kind='hit', fam='打击', desc='tambourine'),
+ 'claves': dict(src=(V + 'Percussion', r'^Claves1'), kind='hit', fam='打击', desc='claves'),
+ 'cowbell': dict(src=(V + 'Percussion', r'^Cowbell1'), kind='hit', fam='打击', desc='cowbell'),
+ 'sleighbells': dict(src=(V + 'Percussion', r'^Sleighbells'), kind='hit', fam='打击', desc='sleigh bells'),
+ 'log_drum': dict(src=(V + 'Percussion', r'^LogDrum'), kind='hit', fam='打击', desc='log drum / slit drum', var={'hi': 'LogDrumHi', 'lo': 'LogDrumLo'}),
+ 'woodblock': dict(src=VI + 'Woodblock', kind='hit', fam='打击', desc='woodblock', var={'a': r'wood_click_', 'b': r'wood_click2', 'c': r'wood_click3'}),
+ 'frame_drum': dict(src=VM + 'Frame Drum', kind='hit', fam='打击', desc='frame drum',
var={'large': r'HDrumL_Hit_', 'small': r'HDrumS_Hit_', 'large_muted': r'HDrumL_HitMuted', 'small_muted': r'HDrumS_HitMuted', 'hand': r'_Hand'}),
- 'hihat': dict(src=VI + 'Hi-Hat Cymbal', kind='hit', fam='打击', desc='踩镲', var={'closed': r'HitC_', 'open': r'HitO_', 'loose': r'HitLoose', 'pedal': r'_Close_'}),
- 'cajon': dict(src=VI + 'Cajon', kind='hit', fam='打击', desc='卡洪鼓', var={'bass': 'hit1', 'slap': 'hit2', 'tone': 'hit3'}),
- 'conga': dict(src=VM + 'Conga', kind='hit', fam='打击', desc='康加鼓', var={'conga': r'^Conga_HitN', 'quinto': r'^Quinto_HitN', 'tumba': r'^Tumba_HitN', 'muted': r'HitFM'}),
- 'claps': dict(src=VI + 'Claps', kind='hit', fam='打击', desc='拍手', var={'group': r'^Clap_', 'solo': r'^SoloClap'}),
- 'shaker': dict(src=VI + 'Shaker, Small', kind='hit', fam='打击', desc='沙锤', var={'down': r'Double_Down', 'up': r'Double_Up', 'slap': r'Slap', 'roll': r'Roll'}),
- 'nepal_bells': dict(src=VI + 'Hand Bells, Nepalese', kind='hit', fam='打击', desc='尼泊尔手铃'),
- 'world_perc': dict(src=F + 'world_perc', kind='hit', pp='sfz', fam='打击', desc='世界打击(卡洪/邦戈/蛋沙锤/响板/达布卡等,变体见 info())'),
- 'drum_kit': dict(src=F + 'muldjord_kit', kind='hit', pp='sfz', fam='打击', desc='流行鼓组 MuldjordKit(CC BY 4.0)', lic='muldjord'),
+ 'hihat': dict(src=VI + 'Hi-Hat Cymbal', kind='hit', fam='打击', desc='hi-hat', var={'closed': r'HitC_', 'open': r'HitO_', 'loose': r'HitLoose', 'pedal': r'_Close_'}),
+ 'cajon': dict(src=VI + 'Cajon', kind='hit', fam='打击', desc='cajón', var={'bass': 'hit1', 'slap': 'hit2', 'tone': 'hit3'}),
+ 'conga': dict(src=VM + 'Conga', kind='hit', fam='打击', desc='conga', var={'conga': r'^Conga_HitN', 'quinto': r'^Quinto_HitN', 'tumba': r'^Tumba_HitN', 'muted': r'HitFM'}),
+ 'claps': dict(src=VI + 'Claps', kind='hit', fam='打击', desc='claps', var={'group': r'^Clap_', 'solo': r'^SoloClap'}),
+ 'shaker': dict(src=VI + 'Shaker, Small', kind='hit', fam='打击', desc='shaker', var={'down': r'Double_Down', 'up': r'Double_Up', 'slap': r'Slap', 'roll': r'Roll'}),
+ 'nepal_bells': dict(src=VI + 'Hand Bells, Nepalese', kind='hit', fam='打击', desc='Nepalese hand bells'),
+ 'world_perc': dict(src=F + 'world_perc', kind='hit', pp='sfz', fam='打击', desc='world percussion (cajón/bongo/egg shaker/castanets/darbuka…; variants in info())'),
+ 'drum_kit': dict(src=F + 'muldjord_kit', kind='hit', pp='sfz', fam='打击', desc='pop drum kit MuldjordKit (CC BY 4.0)', lic='muldjord'),
}
ALIASES = {'strings': 'violins', 'cello': 'cellos', 'viola': 'violas', 'double_bass': 'contrabass', 'upright_bass_pizz': 'jazz_bass',
'french_horn': 'horn', 'glock': 'glockenspiel', 'vibes': 'vibraphone', 'chimes': 'tubular_bells', 'grand_piano': 'piano',
@@ -464,7 +464,7 @@ _INST = {}
def load(nm):
"""按名加载乐器(懒加载 + 缓存)。返回 Inst(zones/range/vars 可查)"""
nm = ALIASES.get(nm, nm)
- if nm not in REG: raise KeyError(f'未知乐器 {nm!r};可用:{", ".join(sorted(REG))}')
+ if nm not in REG: raise KeyError(f'unknown instrument {nm!r}; available: {", ".join(sorted(REG))}')
with _lock:
if nm not in _INST: _INST[nm] = Inst(nm)
return _INST[nm]
@@ -597,7 +597,7 @@ def hit(inst, name_or_index=None, vel=.8, dur=None):
c = [v for v in I.vars if key[v].startswith(q)] or [v for v in I.vars if q in key[v]]
if c: var = c[0]
elif I.kind != 'hit': m, var = midi(var), None
- else: raise KeyError(f'{I.name} 没有变体 {var!r};可用 {I.vars}')
+ else: raise KeyError(f'{I.name} has no variant {var!r}; available: {I.vars}')
vel = float(np.clip(vel, .01, 1))
if var is None and I.vars and I.kind == 'hit': var = I.vars[0]
z = I.pick(m, vel, var)
diff --git a/core/tts/asr_check.py b/core/tts/asr_check.py
index 9a1b7f4..b775a10 100644
--- a/core/tts/asr_check.py
+++ b/core/tts/asr_check.py
@@ -1,14 +1,17 @@
-"""whisper 逐句校对:python core/tts/asr_check.py lines.json voices_dir [--lang en|zh|auto] [--model base|small|…] [--threshold 0.92]
-逐句对比原文与转写:前后补 0.6s 静音再转写(短句不补容易听错),输出逐词时间戳 voices_dir/words.json(口型、断句用)。
-lines.json 里可加 "asr" 字段覆盖期望文本(专有名词、拟声词、数字的读法,例如 "三十八" 而不是 "38")。
---lang auto(默认)按文本里有没有汉字判断;en 要求去掉标点和大小写后逐词完全一致(0–999 的数字两边都换成读法,所以
- "forty" 和 "40" 算一样;更大的数、年份、序数 3rd、带标点的数(3.5、1:30、1,000、40%)不换,期望的转写写进 "asr" 字段);zh(也可用 ja / ko)按字符相似度,
- 去标点、全半角、汉字数字变阿拉伯数字后 difflib 相似度 ≥ --threshold(默认 0.92)算通过。
-模型:--model(或环境变量 WHISPER_MODEL;模型名,或本地目录,离线可用);默认 en → base.en,其它语言 → base(多语言)。
- base 把某句听错、而你听着没错时,换 --model small 再查(更准,约 480 MB,慢几倍)。
- 首次运行会从 Hugging Face 下载(base / base.en ≈ 145 MB);防火墙后面:HF_ENDPOINT=https://hf-mirror.com,
- 或者事先下好,再 --model /path/to/model-dir。
-退出码:0 全部通过;1 有不一致;2 检查没能运行(模型加载失败等)。
+"""Whisper line-by-line check: python core/tts/asr_check.py lines.json voices_dir [--lang en|zh|auto] [--model base|small|…] [--threshold 0.92]
+Compares each line's text with its transcription (0.6 s of silence is padded on both sides first; short lines are misheard without it) and
+writes per-word timestamps to voices_dir/words.json (for lip sync and line breaks).
+A line in lines.json may carry an "asr" field that overrides the expected text (proper names, onomatopoeia, how numbers are read, e.g. "三十八" rather than "38").
+--lang auto (default) decides by whether the text contains CJK characters. en requires an exact word-by-word match after dropping punctuation
+ and case (whole numbers 0–999 are turned into words on both sides, so "forty" and "40" match; larger numbers, years, ordinals like 3rd and
+ numbers with punctuation (3.5, 1:30, 1,000, 40%) are not, so write the expected transcription in the "asr" field). zh (also ja / ko) compares
+ characters: after dropping punctuation, folding full-width to half-width and turning Chinese numerals into digits, a difflib similarity
+ ≥ --threshold (default 0.92) passes.
+Model: --model (or the WHISPER_MODEL environment variable; a model name, or a local folder for offline use); default en → base.en, other languages → base (multilingual).
+ If base mishears a line that sounds right to you, check again with --model small (more accurate, about 480 MB, several times slower).
+ The first run downloads from Hugging Face (base / base.en ≈ 145 MB); behind a firewall set HF_ENDPOINT=https://hf-mirror.com,
+ or download the model beforehand and pass --model /path/to/model-dir.
+Exit codes: 0 all lines pass; 1 some lines differ; 2 the check could not run (model failed to load, etc.).
"""
import sys, json, re, os, argparse, difflib, unicodedata
diff --git a/core/tts/tts.py b/core/tts/tts.py
index 23ee6c0..4a6a01c 100644
--- a/core/tts/tts.py
+++ b/core/tts/tts.py
@@ -1,11 +1,12 @@
-"""Kokoro 本地配音(离线):python core/tts/tts.py lines.json out_dir
+"""Kokoro offline voice: python core/tts/tts.py lines.json out_dir
lines.json = [{"id":..., "text":..., "voice":"bm_george", "speed":0.92, "lang":"en-us"}, ...]
- 默认 voice=af_bella、speed=0.92、lang=en-us。中文用 "lang":"cmn" 加 zf_*/zm_* 声音(离线可用,音色一般)。
-输出 out_dir/<id>.wav(24kHz,去首尾静音)与 out_dir/dur.json
-模型:kokoro-v1.0.onnx / voices-v1.0.bin 放在本目录,下载:sh tools/fetch.sh voice(约 350 MB)
-路径限制:espeak-ng(Kokoro 用它把文字转成音素)的数据目录,解析软链后的真实路径必须短于 160 字节(汉字算 3 字节),否则找不到数据、
- 报一个指向别人机器上某个路径(编译 espeak-ng 的那台)的莫名其妙的错。库放在 ~/lemo-opuscar 之类的短路径下就没事;本脚本开工前会检查并说明。
-要更自然的中文/日文等声音:core/tts/tts_zh.py(微软 edge-tts,要联网),接口和输出布局相同。
+ Defaults: voice=af_bella, speed=0.92, lang=en-us. For Chinese use "lang":"cmn" with a zf_*/zm_* voice (works offline, plain timbre).
+Writes out_dir/<id>.wav (24 kHz, leading/trailing silence trimmed) and out_dir/dur.json.
+Model: kokoro-v1.0.onnx / voices-v1.0.bin in this folder; download with sh tools/fetch.sh voice (about 350 MB).
+Path limit: the data folder of espeak-ng (which Kokoro uses to turn text into phonemes) must have a real path, after symlinks, shorter than
+ 160 bytes (a CJK character counts 3), or it is not found and the error names a path on someone else's machine (the one espeak-ng was
+ built on). A library under a short path such as ~/lemo-opuscar is fine; this script checks before it starts and explains.
+More natural Chinese, Japanese and other voices: core/tts/tts_zh.py (Microsoft edge-tts, online), same interface and output layout.
"""
import sys, json, os, re
if len(sys.argv) < 3 or sys.argv[1] in ('-h', '--help'):
diff --git a/core/tts/tts_zh.py b/core/tts/tts_zh.py
index 08d3d6d..03a1f14 100644
--- a/core/tts/tts_zh.py
+++ b/core/tts/tts_zh.py
@@ -1,14 +1,15 @@
-"""edge-tts 配音(微软神经语音,中文首选,也能念其它语言):
+"""edge-tts voice (Microsoft neural voices; first choice for Chinese, reads other languages too):
python core/tts/tts_zh.py lines.json out_dir [--voice zh-CN-XiaoxiaoNeural] [--rate +0%] [--pitch +0Hz]
lines.json = [{"id":..., "text":..., "voice":"zh-CN-YunxiNeural", "rate":"+10%", "pitch":"-2Hz", "say":"..."}, ...]
- "say"(可选)= 实际送去朗读的文字,默认同 "text"(数字、缩写要写成读法时用;字幕仍用 text)。
- 也认 tts.py 的 "speed"(倍速,1.1 → +10%)。声音列表:python -m edge_tts --list-voices
-输出与 tts.py 完全一致:out_dir/<id>.wav(24kHz 单声道,去首尾静音)与 out_dir/dur.json。
- 中间的 mp3 缓存在 out_dir/.cache/,文字/声音/语速没变就不再联网(先写 .part 再改名,Ctrl-C 不会留下半个文件被下次当成好的;
- 缓存里已经坏了的 mp3 会自动删掉重下)。
+ "say" (optional) = the text actually sent to be spoken, default "text" (for numbers and abbreviations written out as read; subtitles still use text).
+ Also takes tts.py's "speed" (a multiplier, 1.1 → +10%). Voice list: python -m edge_tts --list-voices
+Output is the same as tts.py: out_dir/<id>.wav (24 kHz mono, leading/trailing silence trimmed) and out_dir/dur.json.
+ The mp3s are cached in out_dir/.cache/; unchanged text/voice/rate is not fetched again (written to .part, then renamed, so Ctrl-C never
+ leaves half a file that the next run takes as good; a damaged mp3 in the cache is deleted and fetched again).
-需要联网:这是微软的在线语音服务,不是本地模型。用它做的声音能不能商用,请自己看微软的服务条款。
-网络不通、被防火墙挡住时报错退出(退出码 2;输入或配置有误是 1);离线的替代:tts.py 的 "lang":"cmn"(Kokoro,音色一般,用 asr_check.py 校对)。
+Needs the internet: this is Microsoft's online speech service, not a local model. Check Microsoft's terms yourself before using the voices commercially.
+Exits with an error when the network is down or blocked (exit code 2; bad input or configuration is 1). Offline alternative: tts.py with
+"lang":"cmn" (Kokoro, plain timbre; check it with asr_check.py).
"""
import sys, io, json, os, re, asyncio, hashlib, subprocess, argparse
import numpy as np, soundfile as sf
diff --git a/styleboard/build.py b/styleboard/build.py
index 28b7fe9..215547c 100644
--- a/styleboard/build.py
+++ b/styleboard/build.py
@@ -1,4 +1,4 @@
-# Lemo-Opuscar gallery: styles/*/style.json → catalog.json, index.html, and the generated parts of README.md, styles/README.md, AGENTS.md
+# Lemo-Opuscar gallery: styles/*/style.json → catalog.json, index.html, and the generated parts of README.md, README.zh-CN.md, styles/README.md, AGENTS.md
# Local: python3 styleboard/build.py (also refreshes each style.json "dur" from its mp4)
# GitHub Pages: python3 styleboard/build.py --site _site
# README frames: python3 styleboard/build.py --frames <slug>… (docs/frames/<slug>.jpg at the style's frame_sec)
@@ -223,6 +223,7 @@ def llms_txt():
f'Official repository: {REPO_URL} (by Lemomo, https://x.com/lemomo_ai). Forks are copies; this is the upstream.', '',
'## Start here', '',
f'- [README]({BLOB_URL}/README.md): what it is, how to install the skill, the style grid',
+ f'- [README in Chinese]({BLOB_URL}/README.zh-CN.md): the same in Simplified Chinese',
f'- [Agent instructions]({BLOB_URL}/AGENTS.md): how an agent directs a film in one of the styles',
f'- [Gallery]({SITE_URL}): every style with its demo film',
f'- [OPUSCAR 98]({FILM_URL}): 98 Years of Best Picture ({FEATURE["dur"]}), the feature film made with these tools', '']
@@ -245,30 +246,34 @@ if site: # Pages site: pages + style frames + posters + llms.txt + sitemap
+ ''.join(f' <url><loc>{u}</loc></url>\n' for u in (SITE_URL, FILM_URL)) + '</urlset>\n')
-def readme_grid():
- """README, between <!-- styles:start --> and <!-- styles:end -->: image grid by category (docs/frames/<slug>.jpg), both languages."""
+def readme_grid(zh):
+ """README.md (English) and README.zh-CN.md (Chinese, with the English name under it), between <!-- styles:start --> and <!-- styles:end -->:
+ image grid by category (docs/frames/<slug>.jpg)."""
out = []
for cn, en in cats:
group = [x for x in styles if x['cat'] == cn and x['stylemd']]
if not group: continue
- out.append(f'\n### {en} · {cn}\n\n<table>')
+ out.append(f'\n### {cn if zh else en}\n\n<table>')
for i in range(0, len(group), 3):
out.append('<tr>')
for s in group[i:i + 3]:
- cn_name = f' · {s["cn"]}' if s['cn'] != s['en'] else ''
- out.append(f'<td width="33%" valign="top"><a href="styles/{s["slug"]}/STYLE.md"><img src="docs/frames/{s["slug"]}.jpg" alt="{html.escape(s["en"])}"></a><br>'
- f'<b>{html.escape(s["en"])}</b>{html.escape(cn_name)}<br><i>{html.escape(s["film"])}</i><br>'
- f'<sub>{html.escape(s["line"])}<br>{html.escape(s["line_cn"])}</sub></td>')
+ if zh:
+ name = f'<b>{html.escape(s["cn"])}</b>' + (f'<br>{html.escape(s["en"])}' if s['cn'] != s['en'] else '')
+ alt, line = s['cn'], s['line_cn']
+ else:
+ name, alt, line = f'<b>{html.escape(s["en"])}</b>', s['en'], s['line']
+ out.append(f'<td width="33%" valign="top"><a href="styles/{s["slug"]}/STYLE.md"><img src="docs/frames/{s["slug"]}.jpg" alt="{html.escape(alt)}"></a><br>'
+ f'{name}<br><i>{html.escape(s["film"])}</i><br><sub>{html.escape(line)}</sub></td>')
out.append('</tr>')
out.append('</table>')
return '\n'.join(out) + '\n'
-for fn in ('README.md',):
+for fn, zh in (('README.md', False), ('README.zh-CN.md', True)):
p = os.path.join(ROOT, fn)
if not os.path.exists(p) or site: continue
t = open(p, encoding='utf-8').read()
- t2 = re.sub(r'(<!-- styles:start -->\n).*?(<!-- styles:end -->)', lambda m: m.group(1) + readme_grid() + m.group(2), t, flags=re.S)
+ t2 = re.sub(r'(<!-- styles:start -->\n).*?(<!-- styles:end -->)', lambda m: m.group(1) + readme_grid(zh) + m.group(2), t, flags=re.S)
t2 = re.sub(r'<!--n-->\d+<!--/n-->', f'<!--n-->{sum(1 for x in styles if x["stylemd"])}<!--/n-->', t2) # the headline count
if t2 != t: open(p, 'w', encoding='utf-8').write(t2)