huashu-motion 0.1.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.en.md +164 -5
  2. package/README.md +165 -6
  3. package/THIRD_PARTY.md +1 -0
  4. package/cli/lib/capture.js +1 -1
  5. package/cli/lib/check.js +13 -0
  6. package/cli/lib/composed.js +2 -2
  7. package/cli/lib/composer.js +33 -12
  8. package/cli/lib/grab.js +239 -0
  9. package/cli/lib/qa.js +53 -1
  10. package/cli/lib/render-om.js +5 -2
  11. package/cli/lib/render.js +6 -4
  12. package/cli/lib/share.js +101 -0
  13. package/cli/lib/sound.js +4 -0
  14. package/cli/lib/soundprint.js +72 -0
  15. package/cli/lib/swatch.js +7 -3
  16. package/cli/om.js +22 -3
  17. package/package.json +2 -2
  18. package/runtime/om-engine.js +129 -1
  19. package/runtime/om.js +180 -1
  20. package/runtime/three/LICENSE +21 -0
  21. package/runtime/three/entry.js +19 -0
  22. package/runtime/three/om-three.js +280 -0
  23. package/runtime/three/three.min.js +4586 -0
  24. package/skills/huashu-motion/SKILL.md +43 -6
  25. package/skills/huashu-motion/references/about-author.md +2 -1
  26. package/skills/huashu-motion/references/colour.md +16 -11
  27. package/skills/huashu-motion/references/contract.md +27 -1
  28. package/skills/huashu-motion/references/depth.md +109 -0
  29. package/skills/huashu-motion/references/director.md +27 -9
  30. package/skills/huashu-motion/references/library/README.md +1 -1
  31. package/skills/huashu-motion/references/library/languages/3d-object.md +5 -3
  32. package/skills/huashu-motion/references/library/techniques.md +4 -2
  33. package/skills/huashu-motion/references/music.md +411 -0
  34. package/skills/huashu-motion/references/punch-up.md +108 -0
  35. package/skills/huashu-motion/references/scores/first-light.abc +1 -1
  36. package/skills/huashu-motion/references/scores/four-rooms.abc +1 -1
  37. package/skills/huashu-motion/references/sound.md +5 -3
  38. package/templates/object-3d/assets/comment.svg +1 -0
  39. package/templates/object-3d/assets/cursor.svg +1 -0
  40. package/templates/object-3d/assets/studio.jpg +0 -0
  41. package/templates/object-3d/index.html +163 -0
  42. package/templates/object-3d/materials.md +6 -0
  43. package/templates/object-3d/template.json +23 -0
  44. package/templates/ui-space/index.html +150 -0
  45. package/templates/ui-space/materials.md +6 -0
  46. package/templates/ui-space/template.json +22 -0
package/README.en.md CHANGED
@@ -30,7 +30,7 @@ npx skills add alchaincyf/huashu-motion
30
30
 
31
31
  ## See it
32
32
 
33
- Every animation in this README was made with huashu-motion. The clip above opens the 53-second film it made about itself. 👉 [Download the full film (MP4, with sound)](https://github.com/alchaincyf/huashu-motion/releases/latest); the full Grok Bot, huashu-design and DeepSeek films are on the same page.
33
+ Every animation in this README was made with huashu-motion. The clip above opens the 53-second film it made about itself. 👉 [Download the full film (MP4, with sound)](https://github.com/alchaincyf/huashu-motion/releases/latest); the full Grok Bot, huashu-design, DeepSeek and Claude Duet films are on the same page (Grok Bot and Claude Duet are unofficial fan films).
34
34
 
35
35
  ### Point at the frame
36
36
 
@@ -67,6 +67,162 @@ Grok Bot (fan-made, not official) · 30 s: hand over the work in the evening, ag
67
67
 
68
68
  This 22-second film was made with Claude Code running on DeepSeek V4.1 Flash (the 1017 release). I gave three rounds of notes (add DeepSeek's whale logo, drop a few shots); with music and effects it took under half an hour and cost ¥1.95 at the time (99.4% cache hits). The single palette, the dot carried through the film and the music locked to 124 BPM came from the skill; I never asked for them. With the method in the skill, a cheap model makes a good film too.
69
69
 
70
+ ### Claude Duet (fan-made, unofficial): one full brief, never asked me a thing
71
+
72
+ <img src="docs/media/claude-duet.gif" alt="Claude Duet fan film: the pixel Claude Code mascot waits in a terminal, bursts and gathers into the Duet icon, a notification comes to you first, and at night one continuous line runs through your apps doing the work" width="100%" />
73
+
74
+ Made the day Anthropic launched Claude Duet, 29 seconds, in English. The pixel Claude Code waits in the terminal for your keystroke; turned into Duet, it comes to you first and keeps working while you sleep. Full film on the [Release page](https://github.com/alchaincyf/huashu-motion/releases/latest).
75
+
76
+ ---
77
+
78
+ ## How the sample films were made
79
+
80
+ People keep asking for the prompts behind these films. Here is what I actually said, translated from Chinese (the originals, word for word, are in the [Chinese README](README.md)). Local paths and screenshots are replaced by notes in square brackets, words unrelated to the film are cut and marked …, and parentheses are context I added.
81
+
82
+ The result does not come from the first sentence alone. For some films I said everything up front and let it run; for others I sat with it through several rounds. One line does make a film; to get to this level, either the first message carries the brief or someone keeps directing.
83
+
84
+ <details>
85
+ <summary><b>Claude Duet</b> (unofficial) · one brief, two follow-ups, no notes in between</summary>
86
+
87
+ > Anthropic just released Claude Duet. Research it properly, then make three versions of a video /huashu-motion
88
+ > Version 1: 16:9, English, under 30 s
89
+ > Version 2: 16:9, Chinese — apart from the brand, the main elements in Chinese, under 30 s
90
+ > Version 3: Chinese voice-over, 2:3, the interface showing the official English and our Chinese version, to introduce Claude Duet on Douyin, under 1 minute
91
+ >
92
+ > All three need to get three things across, in whatever way suits each:
93
+ > 1. how Claude Duet differs from a coding agent like Claude Code
94
+ > 2. who can use it today: roughly Pro and Max members, after joining a waitlist
95
+ > 3. ChatGPT dots, Muse and Grok Bot are all personal agents; you could say that facing those three, Claude answered with Duet. [a screenshot of the pixel Claude Code mascot] This is Claude Code's own character; I think you can tell this in a visual, well-animated, fun way.
96
+ > All three only count as done when they are judged above 90 points. After the third, make the cover, title and description and post it to Douyin and WeChat Channels.
97
+ >
98
+ > Besides huashu-motion, you can also use /huashu-video-pipeline and /huashu-art-motion.
99
+
100
+ Then two more, 11 seconds and 5 minutes later:
101
+
102
+ > No need to check anything with me; run it completely on your own.
103
+
104
+ > Say it with more motion and visual metaphor rather than lots of captions and words.
105
+ >
106
+ > In the Douyin version, an X screenshot or the like can back up the voice-over that Anthropic has just released this.
107
+
108
+ After that, only where to post it; no notes. The agent chose the direction itself; "above 90" was scored by a separate reviewer agent against a rubric, and the English version shipped at its ninth version with 91.
109
+
110
+ </details>
111
+
112
+ <details>
113
+ <summary><b>DeepSeek V4.1 Flash motion film</b> · one line + three rounds, under half an hour</summary>
114
+
115
+ > Use the /huashu-motion skill to show off your motion skills as much as you like. Don't worry about the message; as many fast cuts and kinds of motion as you can, under 30 s. At the end just show that this animation was made by DeepSeek v4.1 flash 1017.
116
+
117
+ While it worked:
118
+
119
+ > Oh, and the opening could have a bit of the DeepSeek logo, the whale, then quickly into the animation.
120
+
121
+ On version 1:
122
+
123
+ > [one frame] Drop this effect, I think it's poor, no need to show it. And the ending is a bit long. The big moment could start earlier!
124
+
125
+ On version 2:
126
+
127
+ > [two more frames] These two effects can go too, poor.
128
+
129
+ Nothing after that; version 8 was the one delivered.
130
+
131
+ </details>
132
+
133
+ <details>
134
+ <summary><b>Grok Bot fan film</b> · one line + a direction + one note</summary>
135
+
136
+ > Let's make a launch film for Musk's new personal agent, Grok Bot.
137
+
138
+ The agent offered three directions (team launch, night shift, eight hands) and recommended the night-shift story as the spine, a burst of colour-block cuts in the middle and the real interface for the computer window. I said:
139
+
140
+ > Fine, go with your recommended structure.
141
+
142
+ On version 4:
143
+
144
+ > Good overall, but the first frame of the opening is poor; better to focus it on the typing.
145
+
146
+ On version 6:
147
+
148
+ > Really, really great!! I think huashu-motion has got much, much better since last night. …
149
+
150
+ </details>
151
+
152
+ <details>
153
+ <summary><b>huashu-design 3.0 launch film</b> · one line + a direction, accepted at the first cut, then pushed further</summary>
154
+
155
+ > Open two more FanBox windows and make the launch animations for huashu-design and darwin.skill. Don't ask for much; just use our latest huashu-motion skill.
156
+ >
157
+ > …
158
+
159
+ After the three direction key frames:
160
+
161
+ > I'd like a and b combined.
162
+
163
+ On version 3:
164
+
165
+ > Very good!
166
+
167
+ (the agent asked whether "60 styles" in the film should become 84)
168
+
169
+ > Yes, change it!
170
+
171
+ The next day, watching it again:
172
+
173
+ > This film is actually really good. But the examples — the fast cuts at the start, the three choices after, the app examples and so on — lack variety; it's monotonous. Look for whether we have better recent /huashu-design examples.
174
+ >
175
+ > And if not, you can open new terminal windows yourself and have Opus 5.5 design some examples for what your film is trying to do and its shot language. /huashu-motion is the lead on this design.
176
+ >
177
+ > I want to make this film 100% better again; this matters a lot to us!!!
178
+
179
+ </details>
180
+
181
+ <details>
182
+ <summary><b>huashu-motion's own launch film</b> · the hardest one: an hour and a half, ten versions</summary>
183
+
184
+ > … And I think we need to remake the /huashu-motion launch animation, right now!!! Have it make its abilities, workflow and features clear, and end on the huashu-motion repository address!
185
+
186
+ On version 2:
187
+
188
+ > Not bad, but two problems:
189
+ > 1. I'd like the opening to start with some fast cuts — different material, different camera moves, like a pile of material, a 3D view flowing, then quickly pushing in and cutting out of several launch films.
190
+ >
191
+ > Then start showing the huashu-motion workflow!
192
+ >
193
+ > And the workflow part is clear, but the 1, 2, 3, 4, 5 transitions feel very much like PowerPoint, not premium enough!
194
+
195
+ On version 3:
196
+
197
+ > [two material folders] There's a pile of material in these two folders; pick the best. And if that's not enough, go further!! Make what you think it needs yourself.
198
+ >
199
+ > Actually I think a detailed precision instrument or anatomical model, exploding, orbiting and so on, would look outstanding; consider it.
200
+
201
+ > [a contact sheet] This feels like plenty, but pay attention to the variety of the material and how it looks when it's put together!
202
+
203
+ On version 7, several in a row:
204
+
205
+ > [one frame] I think 01–06 still needs a big rework. If Steve Jobs wanted to launch this product, what would he demand of this part?
206
+
207
+ > Also, the rhythm of the opening feels strange!!
208
+
209
+ > The music and the picture rhythm are both off; the director needs to give more notes.
210
+
211
+ > (the agent wanted to keep the 01–06 bar at the top) I don't think it should stay; keeping it makes it look like PowerPoint.
212
+
213
+ > (the agent dropped a frame with a real face from the material wall) We're not against footage of real people.
214
+
215
+ On version 8:
216
+
217
+ > The music and effects around 37–38 s are really strange and bad. Like it suddenly stutters and then cuts out. I've noticed the same in other films. Let's find the cause and fix it!!!
218
+
219
+ That last one became a fix in the music engine. Version 10 is the clip at the top of this README.
220
+
221
+ </details>
222
+
223
+ The notes that keep coming up here (a weak opening, a part that looks like slides, flat rhythm, monotonous material) are now in the skill: when you give it one line, the agent runs those checks on itself before it shows you the film.
224
+
225
+
70
226
  ---
71
227
 
72
228
  ## Install
@@ -112,22 +268,25 @@ Requirements:
112
268
 
113
269
  Before a film it reads your past preferences and what earlier films taught; after it, it keeps what is worth keeping. Your preferences stay on your machine.
114
270
 
271
+ After the export, `om share` makes a share kit: a GIF under 10 MB (the opening plus the end frame — ready for a README header or a post) and a share.md with the post and the README snippet. Films of 4 s or more end with a small "Made with huashu-motion" for their last 1.2 s, in a free corner, in the film's own typeface and colour; ask your agent to switch it off if you'd rather not.
272
+
115
273
  ## How it works
116
274
 
117
275
  - **A film is one `index.html`.** GSAP, Canvas, Three.js, SVG, anything a browser draws. No video model; every frame is a function of the code and the time.
118
276
  - **Director rules, not templates.** Measured from 21 real launch films (cuts, beats, loudness, energy curves) and 142 high-engagement launch and motion films, organised into 20 motion languages. Every film starts with a rhythm sheet: a hook within 3 s, a burst in the middle, a beat of silence before the biggest hit.
119
277
  - **Sound is half of it.** Composer mode (the agent writes the score, sampled instruments play it), 12 product types × 3 fallback music directions, 23 sound effects placed on the line where the motion lands, narration from a system voice or your own recording.
120
278
  - **Its own render engine.** Several Chrome instances at once (by CPU count, up to 8 by default), picture and audio encoded in parallel, unchanged music reused. A 30-second film renders in about 12–15 s on my 14-core Mac; with motion blur, about 1–1.5 min.
121
- - **Checked before delivery.** `om check` (scripts, files, motion rules, cut-off or covered text), `om qa` (single-frame pops, dead time, motion curve), and the skill asks the agent to watch the frames and, when it can, have another agent review cold.
279
+ - **Checked before delivery.** `om check` (scripts, files, motion rules, cut-off or covered text), `om qa` (single-frame pops, dead time, motion curve; `--sheet` tiles the whole film into contact sheets), and the skill asks the agent to watch the frames and, when it can, have another agent review cold.
122
280
 
123
281
  | Command | What it does |
124
282
  |---|---|
125
- | `om new` · `om templates` | Start a project, from one of 10 templates |
283
+ | `om grab` | The product's real material into the project: page screenshots, logo, images, its colours and type, or the screenshots, icons and recordings in its own project folder |
284
+ | `om new` · `om templates` | Start a project, from one of 12 templates |
126
285
  | `om studio` | Live preview, scene strip, direct edits, frame comments |
127
286
  | `om inbox --wait` · `om look` · `om done` | Agent side: take the next comment, see the spot, report back |
128
287
  | `om sound` · `om voice` · `om samples` | Music and effects, narration, the instrument pack |
129
288
  | `om check` · `om qa` · `om still` | Before and after rendering |
130
- | `om render` · `om export html` · `om fork` | Export, share page, new frame size |
289
+ | `om render` · `om share` · `om export html` · `om fork` | Export, share kit (GIF + post), share page, new frame size |
131
290
  | `om learn` · `om undo` · `om doctor` | Experience, undo, environment check |
132
291
 
133
292
  ## What's inside
@@ -135,7 +294,7 @@ Before a film it reads your past preferences and what earlier films taught; afte
135
294
  | | |
136
295
  |---|---|
137
296
  | Motion languages, each with what it says, what it suits and how to build it | 20, `skills/huashu-motion/references/library/` |
138
- | Starter templates (keynote, finance chart, kinetic type, whiteboard, Vox collage, 3Blue1Brown, Kurzgesagt, talking-head package, …) | 10, `templates/` |
297
+ | Starter templates (keynote, finance chart, kinetic type, whiteboard, Vox collage, 3Blue1Brown, Kurzgesagt, talking-head package, interface in 3D space, objects in a Three.js studio, …) | 12, `templates/` |
139
298
  | Sound effects | 23 |
140
299
  | Fallback music directions | 12 product types × 3 |
141
300
  | Annotated example scores | 3, `skills/huashu-motion/references/scores/` |
package/README.md CHANGED
@@ -30,7 +30,7 @@ npx skills add alchaincyf/huashu-motion
30
30
 
31
31
  ## 看效果
32
32
 
33
- 这篇README里的每一段动画都是huashu-motion做的。上面那段取自它给自己做的53秒发布片,👉 [下载完整发布片(MP4,带声音)](https://github.com/alchaincyf/huashu-motion/releases/latest),下面Grok Bot、huashu-design、DeepSeek这几支的完整版也在同一个页面。
33
+ 这篇README里的每一段动画都是huashu-motion做的。上面那段取自它给自己做的53秒发布片,👉 [下载完整发布片(MP4,带声音)](https://github.com/alchaincyf/huashu-motion/releases/latest),下面Grok Bot(非官方)、huashu-design、DeepSeek、Claude Duet(非官方)这几支的完整版也在同一个页面。
34
34
 
35
35
  ### 指着画面改
36
36
 
@@ -67,6 +67,162 @@ Grok Bot(粉丝自制,非官方)· 30秒:傍晚交代任务,夜里几
67
67
 
68
68
  这支22秒的动效片,是把Claude Code背后的模型换成DeepSeek V4.1 Flash(1017版)做的。中间我给了三轮意见(比如加上DeepSeek的鲸鱼logo、删掉几个镜头),带配乐和音效,前后不到半小时,按当时的价格花了1块9毛5(缓存命中率99.4%)。统一的配色、贯穿全片的那颗圆点、卡在124BPM上的配乐,是skill带出来的,我一句都没提过。方法写进了skill,便宜的模型也能拍出像样的片子。
69
69
 
70
+ ### Claude Duet(粉丝自制,非官方):一次给足需求,全程没找我确认
71
+
72
+ <img src="docs/media/claude-duet.gif" alt="Claude Duet粉丝片:像素小人Claude Code在终端里等你敲键,炸散后收拢成Duet的图标,通知先来找你,入夜后一条连笔线穿过各个应用替你把活干完" width="100%" />
73
+
74
+ Anthropic发布Claude Duet当天做的,29秒英文版。像素小人Claude Code在终端里等你敲键,变形成Duet以后主动来找你,你睡着了它接着干。完整版在[Release页面](https://github.com/alchaincyf/huashu-motion/releases/latest)。
75
+
76
+ ---
77
+
78
+ ## 样片是怎么做出来的
79
+
80
+ 很多人问这些样片用的是什么提示词。下面是我当时的原话,一字没改,语音输入的错字也留着;本机路径和截图换成了方括号里的说明,跟这支片无关的话删掉了,用……标出;圆括号里是我补的上下文。
81
+
82
+ 可以看出来,效果不全来自第一句话:有的片子我一次把需求说清楚,就放手让它做;有的片子我盯着改了好几轮。一句话也能出片,想到这个水准,要么第一句给足,要么后面有人当导演。
83
+
84
+ <details>
85
+ <summary><b>Claude Duet</b>(非官方)· 一份需求、两条追加,中间没有修改意见</summary>
86
+
87
+ > anthropic刚刚发布了claude duet,我希望你帮我充分调研信息,然后帮我做三个版本的视频 /huashu-motion
88
+ > 版本一:16:9 英文版本,30秒以内
89
+ > 版本二:16:9 中文版本 我希望除了品牌信息外,主要元素都是中文 ,30秒以内
90
+ > 版本三:带中文口播,2:3比例,主要界面内容包含官方英文,以及我们制作的中文版本,目标是发在抖音上给用户介绍Claude duet,1分钟以内
91
+ >
92
+ > 这三个版本我们都需要体现三个方面,但你可以通过不同的方式强调和和体现:
93
+ > 1、Claude duet和Claude code这种coding agent之间的区别
94
+ > 2、目前的使用门槛:大致是pro、max会员可以用上,但是需要申请waitlist
95
+ > 3、ChatGPT dots、muse、grok bot这三个都是personal agent,一定程度上可以认为面对前面三个personal agent,claude选择了claude duet出击。[一张Claude Code像素形象的截图] 这是Claude code原本的形象,我觉得你可以用一个比较视觉化的,动效出色的语言比较有趣的去表达这件事。
96
+ > 三个版本都需要被认为超过了90分才能算制作完成。以及第三个版本我们做完后,你制作封面和标题简介,然后发到抖音和视频号
97
+ >
98
+ > 除了huashu-motion之外,你也可以使用 /huashu-video-pipeline /huashu-art-motion 这两个skill辅助你完成内容创作
99
+
100
+ 随后追加了两条,一条在11秒后,一条在5分钟后:
101
+
102
+ > 不需要找我做任何确认,请完全独立执行
103
+
104
+ > 用更多的动效和视觉隐喻去表达,而非用过多的字幕与语言。
105
+ >
106
+ > 抖音版本里可以用x截图之类的方式辅助口播去表达anthropic刚刚发布了这个新产品
107
+
108
+ 之后除了交代做完发到X,没再给过意见。方向是agent自己选的,「过了90分」由另开的评审agent按评分标准打分,英文版改到第9版拿到91分才交。
109
+
110
+ </details>
111
+
112
+ <details>
113
+ <summary><b>DeepSeek V4.1 Flash动效片</b> · 一句话+三轮意见,全程不到半小时</summary>
114
+
115
+ > 用 /huashu-motion skill尽情展示你的动效制作能力,不要关心传达什么,做尽可能多的快切和不同类型的动效展示,30秒以内。最后展示这个动画是由DeepSeek v4.1 flash 1017制作的即可
116
+
117
+ 做的过程中:
118
+
119
+ > 哦对,开头也可以加一点DeepSeek的logo、鲸鱼,然后快速转动画
120
+
121
+ 看第1版:
122
+
123
+ > [截了一帧] 这部分画面动效就去掉吧,我觉得很差,不需要展示。以及最后的结尾也长了一些。我觉得爆点可以更早开始!
124
+
125
+ 看第2版:
126
+
127
+ > [又截了两帧] 这两个动效画面也可以去掉,很差
128
+
129
+ 之后就没再改过,最后交的是第8版。
130
+
131
+ </details>
132
+
133
+ <details>
134
+ <summary><b>Grok Bot粉丝片</b> · 一句话+选方向+一轮意见</summary>
135
+
136
+ > 我们去给马斯克新推出的personal agent:grok bot做一个产品发布的宣传片
137
+
138
+ agent给了三个方向(团队上线、夜班、八只手),推荐用夜班的故事做骨架、中间插一段色块快切、电脑窗口用真界面。我回:
139
+
140
+ > 没问题,按你的推荐结构
141
+
142
+ 看第4版:
143
+
144
+ > 整体不错,但是第一帧开场的效果我觉得很差,还不如核心聚焦在typing呢
145
+
146
+ 看第6版:
147
+
148
+ > 非常非常棒!!我觉得我们的huashu-motion比昨晚又强了很多很多。……
149
+
150
+ </details>
151
+
152
+ <details>
153
+ <summary><b>huashu-design 3.0发布片</b> · 一句话+选方向,第一版就过了,后来又往上提</summary>
154
+
155
+ > 你再打开两个fanbox窗口,分别去做huashu-design、darwin.skill的宣传动画吧。不用要求太多,用上我们最新的huashu-motion skill即可。
156
+ >
157
+ > ……
158
+
159
+ 看完三个方向的关键帧:
160
+
161
+ > 我希望a和b结合
162
+
163
+ 看第3版:
164
+
165
+ > 非常不错!
166
+
167
+ (agent问片里的「60种风格库」要不要改成84种)
168
+
169
+ > 可以改!
170
+
171
+ 隔天重看:
172
+
173
+ > 我们这期视频做得其实非常出色。但是我觉得使用的案例,包括开头的快切,以及后面的三个选择的案例,app的案例等等,多样性都有些不足,很单调。你帮我找找我们最近是否有更好的 /huashu-design 的案例可用。
174
+ >
175
+ > 以及如果不行的话,你也可以自己调用新的终端窗口,让opus5.5再根据你的影片实现目标和镜头语言需要的设计,去做一些案例。 /huashu-motion 是这次设计的总负责人。
176
+ >
177
+ > 我希望能把我们这次宣传片的品质再提升100%,这对我们很重要!!!
178
+
179
+ </details>
180
+
181
+ <details>
182
+ <summary><b>huashu-motion自己的发布片</b> · 最折腾的一支:一个半小时,十个版本</summary>
183
+
184
+ > ……以及,我觉得我们需要现在,立刻重新做一个 /huashu-motion 的发布动画!!!让它把自己的能力,操作流程,特点都表达清楚,最后展示huashu-motion的仓库地址!
185
+
186
+ 看第2版:
187
+
188
+ > 还不错,但是有两个问题:
189
+ > 1、我希望开头部分先行做一些快速的切镜,包括不同素材,不同运镜方式,比如一堆素材,3d视角流动,然后快速拉进切出好几个产品发布篇。
190
+ >
191
+ > 接着开始展示huashu-motion的发布流程!
192
+ >
193
+ > 然后,我觉得现在的发布流程展示挺清晰的,但是1、2、3、4、5,那切换运动很像ppt,不够高级!
194
+
195
+ 看第3版:
196
+
197
+ > [两个素材文件夹] 我们这两个文件夹中一大堆素材,你可以选择其中最好的。以及如果觉得还不够的话,可以更进一步!!自己去做一些你认为需要的。
198
+ >
199
+ > 其实我觉得一个精细化的精密仪器或者生理结构的模型,然后爆炸,环绕之类的会能够展现出非常出色的效果,你可以考虑下
200
+
201
+ > [一张接触表] 这个感觉还挺多的,不过我希望你注意下素材的丰富性,以及这些素材凭借在一起时的审美表现!
202
+
203
+ 看第7版,连着说了几条:
204
+
205
+ > [截了一帧] 我觉得01-06这部分依然需要大改,如果乔布斯想要把这个产品发布出去,他会对这部分动画提什么要求?
206
+
207
+ > 另外,开头的节奏感我觉得很怪!!
208
+
209
+ > 音乐和视频节奏都不对,需要导演再提一些意见
210
+
211
+ > (agent说要保留顶部的01–06导航栏)我觉得不应该保留,这一保留就显得很ppt
212
+
213
+ > (agent说素材墙里有一张真人面孔,先剔除)我们不排斥真人素材
214
+
215
+ 看第8版:
216
+
217
+ > 37-38秒左右的音乐音效非常奇怪糟糕。像是突然卡了一下,然后断了。我发现别的视频制作也出现类似的问题。我们排查下原因并且修复掉!!!
218
+
219
+ 最后这条后来变成了配乐引擎的一个修复。第10版就是这篇README最上面那段。
220
+
221
+ </details>
222
+
223
+ 这些意见里反复出现的几条(开场不够强、整段像PPT、节奏平、素材单调),现在已经写进skill:用户只给一句话的时候,agent会先拿这几条自己挑一遍,再把片子给你看。
224
+
225
+
70
226
  ---
71
227
 
72
228
  ## 安装
@@ -128,6 +284,8 @@ skill里的`bin/om`会直接调用仓库里的命令行工具,改仓库就是
128
284
 
129
285
  开工前,它会先读你以前的偏好和过去片子留下的经验;每支片子做完,再把你这次说过的话、在编辑器里提的评论收一遍,值得留下的记下来。你的偏好只存在你自己电脑上。
130
286
 
287
+ 导出以后,`om share`会出一个分享包:一张10MB以内的GIF(开头加片尾,可以直接当README头图、发X),和一份写好发帖文案、README头图代码的share.md。4秒以上的片子,最后1.2秒会在片尾空着的角落出现一行小字「Made with huashu-motion」,用这支片自己的字体和颜色;不想要,跟agent说一声就关掉。
288
+
131
289
  ---
132
290
 
133
291
  ## 怎么做到的
@@ -166,7 +324,7 @@ skill最大的一块是导演方法:先读产品、找出它的气质,再选
166
324
  ### 交付前有人挑错
167
325
 
168
326
  - `om check`:渲染前查脚本、缺失的文件、违反规则的动画写法,再抽帧查被裁切、被盖住、对比度不够的字;
169
- - `om qa`:查成片里一闪而过的单帧、没东西在动的空档、硬切和整片的运动曲线;
327
+ - `om qa`:查成片里一闪而过的单帧、没东西在动的空档、硬切和整片的运动曲线,加 `--sheet` 把整片按每秒 4 帧铺成接触表,一眼看出哪段不动、哪段像幻灯片;
170
328
  - skill要求agent交付前真的看帧、按正常速度看一遍,能派独立的agent冷审就派。
171
329
 
172
330
  ### 常用命令
@@ -175,12 +333,13 @@ skill最大的一块是导演方法:先读产品、找出它的气质,再选
175
333
 
176
334
  | 命令 | 做什么 |
177
335
  |---|---|
178
- | `om new` · `om templates` | 新建项目,可以从10个模板起步 |
336
+ | `om grab` | 把产品的真实素材收进项目:网页截图、logo、配图、品牌色和字体,或本地工程里的截图、图标、录屏 |
337
+ | `om new` · `om templates` | 新建项目,可以从12个模板起步 |
179
338
  | `om studio` | 编辑器:实时预览、场景条、直接改值、在画面上留评论 |
180
339
  | `om inbox --wait` · `om look` · `om done` | agent那一侧:接下一条评论、看你点的位置、回报改了什么 |
181
340
  | `om sound` · `om voice` · `om samples` | 配乐和音效、口播、真乐器采样包 |
182
341
  | `om check` · `om qa` · `om still` | 渲染前检查、成片检查、任意时刻截一帧 |
183
- | `om render` · `om export html` · `om fork` | 导出、分享页、换画幅 |
342
+ | `om render` · `om share` · `om export html` · `om fork` | 导出、分享包(GIF+发帖文案)、分享页、换画幅 |
184
343
  | `om learn` · `om undo` · `om doctor` | 经验、撤回、环境检查 |
185
344
 
186
345
  ---
@@ -190,7 +349,7 @@ skill最大的一块是导演方法:先读产品、找出它的气质,再选
190
349
  | | 数量 |
191
350
  |---|---|
192
351
  | 运动语言(每种写清楚它在说什么、适合什么、怎么做) | 20种,`skills/huashu-motion/references/library/` |
193
- | 起步模板(发布会、财经图表、动态文字、白板、Vox拼贴、3Blue1Brown、Kurzgesagt、口播包装……) | 10个,`templates/` |
352
+ | 起步模板(发布会、财经图表、动态文字、白板、Vox拼贴、3Blue1Brown、Kurzgesagt、口播包装、界面3D空间、Three.js影棚物体……) | 12个,`templates/` |
194
353
  | 音效 | 23种 |
195
354
  | 兜底配乐方向 | 12类产品 × 3种 |
196
355
  | 示范谱 | 3份,`skills/huashu-motion/references/scores/` |
@@ -203,7 +362,7 @@ huashu-motion/
203
362
  ├── cli/ # om命令行:新建、编辑器、收件箱、配乐、口播、检查、渲染、导出
204
363
  ├── runtime/ # 片子里用的OM.*小工具,和逐帧渲染的引擎
205
364
  ├── studio/ # 浏览器里的编辑器
206
- ├── templates/ # 10个起步模板
365
+ ├── templates/ # 12个起步模板
207
366
  ├── fonts/ # 随附的开源字体
208
367
  ├── examples/ # 样片(om demo打开的那支)
209
368
  └── test/ # 测试
package/THIRD_PARTY.md CHANGED
@@ -5,6 +5,7 @@ huashu-motion's own code and docs are MIT. These bundled pieces keep their own l
5
5
  | Component | Where | License |
6
6
  |---|---|---|
7
7
  | GSAP 3.14.2 | `templates/blank/vendor/`, copied into new projects | GSAP Standard "no charge" License, see `GSAP-LICENSE.html` next to the file |
8
+ | three.js r186 (0.186.1) with its example add-ons (RoomEnvironment, GLTF/SVG/HDR/Font loaders, TextGeometry, RoundedBoxGeometry, EffectComposer, Render/Output/Bokeh/UnrealBloom/Shader passes, Reflector, BufferGeometryUtils), bundled into one script | `runtime/three/three.min.js` (built from `runtime/three/entry.js` with esbuild), copied into `object-3d` projects | MIT, see `runtime/three/LICENSE` (copied as `vendor/THREE-LICENSE.txt`) |
8
9
  | Font library: Noto Sans SC (GB2312 subsets, 500–900), LXGW WenKai, Inter, Playfair Display, Anton and 22 more | `fonts/`, copied into projects by `om new` / `om fonts add` | SIL Open Font License 1.1, per-font copyright in `fonts/LICENSES.md`, full text in `fonts/OFL.txt`; taken from huashu-art-motion |
9
10
  | huashu-art-motion engine (showcase film) | `examples/showcase/` | MIT, plus per-font licenses kept in that folder |
10
11
 
@@ -42,7 +42,7 @@ export async function openFilm(file, { chrome = findChrome(), transport = 'pipe'
42
42
  await Promise.all([page.send('Page.enable'), page.send('Runtime.enable'), page.send('Log.enable')]);
43
43
  await page.send('Emulation.setDeviceMetricsOverride', { width, height, deviceScaleFactor: 1, mobile: false });
44
44
  if (transparent) await page.send('Emulation.setDefaultBackgroundColorOverride', { color: { r: 0, g: 0, b: 0, a: 0 } });
45
- const boot = `window.__omConfig=${JSON.stringify({ video, lenient, paintWaits })};window.__omVariables=${JSON.stringify(variables || {}).replace(/</g, '\\u003c')};\n` + readFileSync(ENGINE, 'utf8');
45
+ const boot = `window.__omConfig=${JSON.stringify({ video, lenient, paintWaits, transparent })};window.__omVariables=${JSON.stringify(variables || {}).replace(/</g, '\\u003c')};\n` + readFileSync(ENGINE, 'utf8');
46
46
  await page.send('Page.addScriptToEvaluateOnNewDocument', { source: boot });
47
47
  const loaded = new Promise((ok) => page.on('Page.loadEventFired', ok));
48
48
  const nav = await page.send('Page.navigate', { url: pathToFileURL(target).href });
package/cli/lib/check.js CHANGED
@@ -112,6 +112,14 @@ export function checkSource(project) {
112
112
  warned.add(first.toLowerCase());
113
113
  add('warning', 'font-not-shipped', `font-family "${first}" has no @font-face in the film — it renders only where that font is installed (om fonts add)`, i);
114
114
  }
115
+ // A film about a product is made of the product: its logo as a file, its real interface, its pictures. A composition
116
+ // that loads no image, video or logo file at all drew everything itself (the grey-box UI of one-line films, 2026-10).
117
+ const media = [...html.matchAll(/(?:src|poster|href)\s*=\s*["'`]([^"'`]+\.(?:png|jpe?g|webp|gif|svg|avif|mp4|mov|webm))|url\(\s*["']?([^"')]+\.(?:png|jpe?g|webp|gif|svg|avif))|["'`]((?:\.\/)?(?:assets|materials|media|img|images)\/[^"'`]+\.(?:png|jpe?g|webp|gif|svg|avif|mp4|mov|webm))/gi)]
118
+ .map((m) => m[1] || m[2] || m[3]).filter((u) => u && !/^data:|vendor\/|om-/.test(u));
119
+ for (const m of html.matchAll(/placehold\.co|placeholder\.com|via\.placeholder|dummyimage\.com|picsum\.photos|placekitten|fakeimg\.pl|\blorem ipsum\b/gi)) add('warning', 'placeholder', `"${m[0]}" is a placeholder — use real content: the product's own images and text, a real one found online, or an openly licensed image (source in materials.md)`, m.index);
120
+ if (!media.length) add('warning', 'no-real-material', 'the film loads no image, video or logo file — if it is about a product, it is drawing the product instead of showing it. Collect the real material first (om grab <url|folder>) and build from it: the logo file, real screenshots or recordings, a rebuild only traced over a capture (SKILL.md step 1)');
121
+ else if (media.every((u) => /icon|logo|favicon|wordmark|avatar/i.test(u))) add('warning', 'only-logo', `the only files the film loads are icons or logos (${[...new Set(media)].slice(0, 3).join(', ')}) — the interface and pictures are drawn, not shown. Use real screenshots or recordings of the product (om grab), or rebuild only over a capture`);
122
+ else if (!existsSync(join(project.root, 'materials.md'))) add('warning', 'no-materials-list', 'no materials.md — list what the film is made of and where each piece came from (om grab writes it)');
115
123
  return found;
116
124
  }
117
125
 
@@ -153,6 +161,8 @@ const LAYOUT = (t) => `(() => {
153
161
  const seen = new Set();
154
162
  for (let n; (n = walker.nextNode());) {
155
163
  const el = n.parentElement;
164
+ // whitespace between tags is not text: it would judge the parent (or body) by all its children's text, hidden ones included
165
+ if (!n.nodeValue.trim()) continue;
156
166
  // single letters are kinetic type (split, stacked, flown in): judged as a word, not one by one
157
167
  if (!el || seen.has(el) || el.textContent.trim().length < 3 || /^(SCRIPT|STYLE|NOSCRIPT|TITLE)$/.test(el.tagName)) continue;
158
168
  seen.add(el);
@@ -246,6 +256,9 @@ export async function checkPage(project, { samples = 24, fps = 30, onLog = () =>
246
256
  }
247
257
  }
248
258
  for (const [img, at, what] of [[firstShot, 0, 'first'], [lastShot, last, 'last']]) if (img && flat(img)) add('warning', 'blank-frame', `the ${what} frame is a single flat colour — start moving / end on the brand`, at);
259
+ // the signature: the film is now at its last frame, where the engine has chosen a corner for it
260
+ const sig = await film.evaluate('window.__omEngine.signature ? window.__omEngine.signature() : null');
261
+ if (sig && sig.shown && !sig.shown.clear) add('warning', 'signature-covers', `the "Made with huashu-motion" signature finds no free corner in the last 1.2s and sits ${sig.shown.corner} over the film — leave one corner of the end frame clear, pin it with data-om-signature="top-left" (or another corner) on the root, or switch it off with data-om-signature="off"`, last);
249
262
  onLog(`sampled ${list.length} frames`);
250
263
 
251
264
  // the same frame reached two ways: after everything above, and straight away in a fresh page
@@ -5,7 +5,7 @@
5
5
  //
6
6
  // Fitting: every !mark:name! in the score lands on the timeline label `scene:name` (or `name`), or on a time
7
7
  // given in OM.music({ marks: { name: seconds } }). Instruments: any voice of score.js by name (inst=piano,
8
- // strings, horn, pizz, harp, marimba, synbass, supersaw…), and inst=drums with kit=pop|acoustic|808|cinematic.
8
+ // strings, horn, pizz, harp, marimba, synbass, supersaw…), and inst=drums with kit=pop|acoustic|808|cinematic|lofi|gated|chip|folk.
9
9
  import { parseAbc, perform, renderPerformance } from './composer.js';
10
10
  import { N, RATE, biquad, rng } from './dsp.js';
11
11
  import { plate } from './fx.js';
@@ -122,7 +122,7 @@ export function renderComposed(text, { labels = {}, marks = {}, duration, seed =
122
122
  const fitted = perf.fit;
123
123
  const report = {
124
124
  title: score.title || 'untitled', notes: perf.notes.length, voices: score.order.map((v) => `${v}:${score.voices[v].inst}`), end: perf.end,
125
- marks: (fitted?.marks || []).map((m) => `${m.name} ${m.at.toFixed(2)}s`), points: perf.cues.filter((c) => c.type === 'mark').map((c) => ({ name: c.name, at: c.at })), unmatched: score.cues.filter((c) => c.type === 'mark' && align[c.name] == null).map((c) => c.name),
125
+ marks: (fitted?.marks || []).map((m) => `${m.name} ${m.at.toFixed(2)}s`), points: perf.cues.filter((c) => c.type === 'mark').map((c) => ({ name: c.name, at: c.at })), unmatched: score.cues.filter((c) => c.type === 'mark' && align[c.name] == null).map((c) => c.name), warnings: score.warnings || [],
126
126
  stretches: fitted?.stretches || [], start: perf.start,
127
127
  };
128
128
  return { music: { L, R }, hits: sfx, perf, report };
@@ -11,7 +11,7 @@
11
11
  // !crescendo(! !crescendo)! !diminuendo(! !diminuendo)! !fermata! !accent! (or >), !ped! !ped-up!,
12
12
  // and two extensions: !rit(! … !rit)! (slow down by ~30 % across the span) and !breath!.
13
13
  //
14
- // For launch films: a voice with inst=drums (kit=pop|acoustic|808|cinematic) reads its notes on the General
14
+ // For launch films: a voice with inst=drums (kit=pop|acoustic|808|cinematic|lofi|gated|chip|folk) reads its notes on the General
15
15
  // MIDI drum map — C,, kick, ^C,, rim, D,, snare, ^D,, clap, ^F,, hat, ^A,, open hat, A,, tom, ^C, crash,
16
16
  // ^F, tambourine, ^A shaker. Cue marks become sound design on the beat: !hit! (impact on the reveal),
17
17
  // !rise(! … !rise)! (a riser that lands where it closes), !mark:name! (a named moment, for lining the score
@@ -82,10 +82,13 @@ export function parseAbc(text) {
82
82
  }
83
83
  if (!order.length) vdef('1');
84
84
  const [mn, md] = meterOf(head.M);
85
- const st = Object.fromEntries(order.map((v) => [v, { beat: 0, acc: {}, dyn: DYN.mf, ramp: null, tieFrom: null, repeatStart: 0, lastRepeat: -1 }]));
85
+ const st = Object.fromEntries(order.map((v) => [v, { beat: 0, acc: {}, dyn: DYN.mf, ramp: null, tieFrom: null, repeatStart: 0, lastRepeat: -1, bar: 1, barStart: 0 }]));
86
+ // A key change holds from its beat on, for every voice, whichever voice wrote it (voices are read one after
87
+ // another, so a key kept as running state leaked from the end of one voice into the start of the next).
88
+ const keys = [{ beat: 0, key: keySignature(head.K) }], warnings = [];
86
89
  const cues = [], riseOpen = {};
87
90
  const events = [], tempo = [{ beat: 0, qpm: qpmOf(head.Q) || 90 }], rits = [], breaths = [], fermatas = [], pedal = {}, ramps = [];
88
- let key = keySignature(head.K), meter = [mn, md], L = head.L ? frac(head.L.replace(/^1\//, '1/'), 0.125) : (mn / md < 0.75 ? 1 / 16 : 1 / 8);
91
+ let meter = [mn, md], L = head.L ? frac(head.L.replace(/^1\//, '1/'), 0.125) : (mn / md < 0.75 ? 1 / 16 : 1 / 8);
89
92
  let barLen = meter[0] * 4 / meter[1];
90
93
  let vcur = order[0], ritOpen = null;
91
94
 
@@ -118,6 +121,11 @@ export function parseAbc(text) {
118
121
  const k = toks[t];
119
122
  if (k.bar != null) {
120
123
  s.acc = {};
124
+ const got = s.beat - s.barStart;
125
+ if (got > 1e-6) { // a bar that is too long or too short moves everything after it off the other voices
126
+ if (Math.abs(got - barLen) > 1e-4 && !(s.bar === 1 && got < barLen)) warnings.push(`voice ${vid} bar ${s.bar} has ${+got.toFixed(3)} beats, the meter wants ${+barLen.toFixed(3)}`);
127
+ s.bar++; s.barStart = s.beat;
128
+ }
121
129
  if (k.bar.includes(':') && k.bar.indexOf(':') > k.bar.indexOf('|') && k.bar.startsWith('|')) repStart = t + 1;
122
130
  else if (/^:/.test(k.bar) && s.lastRepeat !== t) { s.lastRepeat = t; t = repStart - 1; continue; }
123
131
  else if (/:$/.test(k.bar)) repStart = t + 1;
@@ -125,7 +133,7 @@ export function parseAbc(text) {
125
133
  }
126
134
  if (k.field) {
127
135
  const [f, val] = [k.field[0], k.field.slice(2)];
128
- if (f === 'K') key = keySignature(val);
136
+ if (f === 'K') keys.push({ beat: s.beat, key: keySignature(val) });
129
137
  if (f === 'M') { meter = meterOf(val); barLen = meter[0] * 4 / meter[1]; }
130
138
  if (f === 'L') L = frac(val.replace(/^1\//, '1/'), L);
131
139
  if (f === 'Q') tempo.push({ beat: s.beat, qpm: qpmOf(val) || tempo.at(-1).qpm });
@@ -155,7 +163,8 @@ export function parseAbc(text) {
155
163
  const parts = k.note.startsWith('[') ? [...k.note.slice(1, -1).matchAll(/([\^_=]*)([A-Ga-g])([,']*)([0-9/]*)/g)] : [/^([\^_=]*)([A-Ga-gzxZ])([,']*)/.exec(k.note)];
156
164
  if (k.note.startsWith('[') && !k.len && parts[0]?.[4]) len = frac(parts[0][4], 1) * L * 4;
157
165
  if (tuplet) { len *= tuplet.q / tuplet.n; if (--tuplet.left <= 0) tuplet = null; }
158
- if (/[zxZ]/.test(k.note)) { s.beat += /Z/.test(k.note) ? barLen * frac(k.len, 1) : len; deco = []; continue; }
166
+ if (/Z/.test(k.note)) { const n = frac(k.len, 1); s.beat += barLen * n; s.bar += n - 1; s.barStart += barLen * (n - 1); deco = []; continue; } // Z4: four whole bars
167
+ if (/[zx]/.test(k.note)) { s.beat += len; deco = []; continue; }
159
168
  const fermata = deco.includes('fermata'), accent = deco.includes('accent') || deco.includes('>');
160
169
  if (fermata) fermatas.push(s.beat + len);
161
170
  const chordNotes = [];
@@ -163,14 +172,14 @@ export function parseAbc(text) {
163
172
  const U = letter.toUpperCase(), octave = (letter === U ? 4 : 5) + (oct.match(/'/g) || []).length - (oct.match(/,/g) || []).length;
164
173
  const id = `${U}${octave}`;
165
174
  if (acc) s.acc[id] = acc.startsWith('^') ? acc.length : acc.startsWith('_') ? -acc.length : 0;
166
- const a = s.acc[id] ?? (v.inst === 'drums' ? 0 : key[U] ?? 0);
167
- chordNotes.push(12 * (octave + 1) + LETTER[U] + a + v.transpose);
175
+ const keyed = s.acc[id] == null && v.inst !== 'drums'; // takes the key signature, resolved once every voice is read
176
+ chordNotes.push([12 * (octave + 1) + LETTER[U] + (s.acc[id] ?? 0) + v.transpose, keyed ? U : null]);
168
177
  }
169
178
  const tie = s.tieFrom && s.tieFrom.beat + s.tieFrom.dur >= s.beat - 1e-6;
170
- chordNotes.forEach((midi, ci) => {
171
- const prev = tie ? events.find((e) => e.voice === vid && e.midi === midi && Math.abs(e.beat + e.dur - s.beat) < 1e-6) : null;
179
+ chordNotes.forEach(([midi, keyed], ci) => {
180
+ const prev = tie ? events.find((e) => e.voice === vid && e.midi === midi && e.keyed === keyed && Math.abs(e.beat + e.dur - s.beat) < 1e-6) : null;
172
181
  if (prev) { prev.dur += len; return; }
173
- events.push({ voice: vid, beat: s.beat, dur: len, midi, vel: s.dyn, accent, fermata, top: ci === chordNotes.length - 1 && chordNotes.length > 1, chord: chordNotes.length });
182
+ events.push({ voice: vid, beat: s.beat, dur: len, midi, keyed, vel: s.dyn, accent, fermata, top: ci === chordNotes.length - 1 && chordNotes.length > 1, chord: chordNotes.length });
174
183
  });
175
184
  s.tieFrom = null;
176
185
  s.beat += len;
@@ -183,7 +192,7 @@ export function parseAbc(text) {
183
192
  const parts = item.text.split(/(\[V:[^\]]+\])/);
184
193
  for (const part of parts) {
185
194
  const vm = /^\[V:([^\]]+)\]$/.exec(part);
186
- if (vm) { vcur = vdef(vm[1].trim()); if (!st[vcur]) st[vcur] = { beat: 0, acc: {}, dyn: DYN.mf, ramp: null, tieFrom: null, lastRepeat: -1 }; continue; }
195
+ if (vm) { vcur = vdef(vm[1].trim()); if (!st[vcur]) st[vcur] = { beat: 0, acc: {}, dyn: DYN.mf, ramp: null, tieFrom: null, lastRepeat: -1, bar: 1, barStart: 0 }; continue; }
187
196
  if (part.trim()) run(part, vcur);
188
197
  }
189
198
  }
@@ -194,8 +203,14 @@ export function parseAbc(text) {
194
203
  const start = inside[0]?.vel ?? DYN.mf, endV = after && after.vel !== start ? after.vel : Math.max(0.15, Math.min(0.95, start + 0.2 * r.dir));
195
204
  for (const e of inside) e.vel = start + (endV - start) * ((e.beat - r.from) / Math.max(1e-6, r.to - r.from));
196
205
  }
206
+ keys.sort((a, b) => a.beat - b.beat);
207
+ for (const e of events) {
208
+ if (e.keyed) { let k = keys[0].key; for (const c of keys) if (c.beat <= e.beat + 1e-6) k = c.key; e.midi += k[e.keyed] ?? 0; }
209
+ delete e.keyed;
210
+ }
197
211
  const length = Math.max(0, ...Object.values(st).map((x) => x.beat));
198
- return { title: head.T, meter, barLen, events: events.sort((a, b) => a.beat - b.beat), voices, order, tempo, rits, breaths, fermatas, pedal, cues, length };
212
+ for (const v of order) if (st[v].beat > 0 && length - st[v].beat > 1e-4) warnings.push(`voice ${v} ends at beat ${+st[v].beat.toFixed(3)}, the score at ${+length.toFixed(3)}: write every bar in every voice`);
213
+ return { title: head.T, meter, barLen, events: events.sort((a, b) => a.beat - b.beat), voices, order, tempo, rits, breaths, fermatas, pedal, cues, length, warnings };
199
214
  }
200
215
 
201
216
  // Beats (quarter notes) → seconds, through the tempo changes, ritardandos (tempo eases down to 70 %),
@@ -319,6 +334,12 @@ export const DRUM_KITS = {
319
334
  acoustic: { kick: 'kicksoft', snare: 'snare', hat: 'hat', ohat: 'ohat', tamb: 'shaker' },
320
335
  808: { kick: 'kick808', snare: 'clap', hat: 'hat808', tamb: 'shaker' },
321
336
  cinematic: { kick: 'taiko', snare: 'snarebig', hat: 'shaker', ohat: 'crash', tom: 'taiko' },
337
+ // the rest of score.js's drum voices, reachable from a score: a dusty boom-bap kit, the gated 80s snare,
338
+ // the 8-bit kit, and body percussion (stomp, snaps, frame drum) for folk and acoustic songs
339
+ lofi: { kick: 'kicksoft', snare: 'snarelofi', clap: 'snap', hat: 'hat', ohat: 'ohat', tamb: 'shaker' },
340
+ gated: { kick: 'kick', snare: 'snaregated', clap: 'snaregated', hat: 'hat', ohat: 'ohat', tamb: 'shaker' },
341
+ chip: { kick: 'kickchip', snare: 'snarechip', clap: 'snarechip', hat: 'hatchip', ohat: 'hatchip', tamb: 'hatchip' },
342
+ folk: { kick: 'stomp', snare: 'snap', clap: 'clap', hat: 'shaker', ohat: 'shaker', tom: 'frame', rim: 'woodblock', tamb: 'shaker' },
322
343
  };
323
344
  // A bowed or blown note is shaped by the player, not the sample: the bow or breath eases in (slower when
324
345
  // soft), a long note swells and relaxes (messa di voce), and its tail eases out instead of stopping.