Skip to content

Art and animation, written as code. Illustrations, loops, interactive web art, launch-videos and scored films in dozens of styles, identical on every render.

docs: no held music features advertised; the launch template is 16:9 today

Alex Greenshpun778f8814b9e3
diff --git a/README.es-ES.md b/README.es-ES.md
index fbf39ca..30f27f4 100644
--- a/README.es-ES.md
+++ b/README.es-ES.md
@@ -101,7 +101,7 @@ Sin muestras ni grabaciones. Las notas se escriben como datos y cada sonido se s
| [Cinemático, asombro](assets/audio/sampler-cinematic-awe-8s.mp3) · [Lo-fi](assets/audio/sampler-lofi-nostalgic-8s.mp3) · [Marimba](assets/audio/sampler-marimba-curious-8s.mp3) · [Electrónica](assets/audio/sampler-drive-electronic-8s.mp3) | más estados de ánimo e instrumentos |
| [El tema del nocturno en 15 segundos](assets/audio/fit-theme-15s.mp3) | El compositor elige la forma que cabe en ese tiempo |
-Y además: **lo-fi electrónico**, relajado y alegre, con pads cálidos y desafinados, una melodía suave punteada y un leve vaivén de cinta (la banda sonora del vídeo de lanzamiento se compuso en él; [el vocabulario](skills/anidoodle/references/music/styles/lofi-electronic.md)), y un **kit de efectos de sonido**: catorce efectos en capas y con semilla, sincronizados con el fotograma exacto, con la música bajando bajo cada uno ([diseño de sonido](skills/anidoodle/references/music/sound-design.md)). Un estilo es un vocabulario con el que componer, nunca notas ya hechas: cada película recibe una banda sonora escrita para ella.
+Y además: un **kit de efectos de sonido**, catorce efectos en capas y con semilla, sincronizados con el fotograma exacto, con la música bajando bajo cada uno ([diseño de sonido](skills/anidoodle/references/music/sound-design.md)).
## Páginas web que se fijan en ti
@@ -227,7 +227,7 @@ Cuatro backends comparten un mismo núcleo de arte, y el núcleo vive felizmente
## La película de ejemplo
-`skills/anidoodle/example/` contiene **Mechanical Lepidoptera**: 1.410 fotogramas, 47 segundos, una mariposa de relojería que se dibuja a sí misma, cobra vida en acuarela y deja su plano entre la hierba. Es el motor entero en una sola pieza: puntos de control colocados a mano sobre anatomía real, una clave de caché que nombra cada entrada de la que depende un píxel, una banda sonora compuesta para ella, y un movimiento continuo desde el boceto hasta la vida. Las láminas de estilo están junto al motor en `skills/anidoodle/engine/src/canvas-core/`, cada una con su receta escrita en la parte de arriba. Abre cualquiera de ellas, cambia un número, y mira qué se mueve.
+`skills/anidoodle/example/` contiene **Mechanical Lepidoptera**: 1.410 fotogramas, 47 segundos, una mariposa de relojería que se dibuja a sí misma, cobra vida en acuarela y deja su plano entre la hierba. Es el motor entero en una sola pieza: puntos de control colocados a mano sobre anatomía real, una clave de caché que nombra cada entrada de la que depende un píxel, una banda sonora construida a partir de la receta, y un movimiento continuo desde el boceto hasta la vida. Las láminas de estilo están junto al motor en `skills/anidoodle/engine/src/canvas-core/`, cada una con su receta escrita en la parte de arriba. Abre cualquiera de ellas, cambia un número, y mira qué se mueve.
## Honesto por diseño
diff --git a/README.fr-FR.md b/README.fr-FR.md
index 77b20ba..fc0fa18 100644
--- a/README.fr-FR.md
+++ b/README.fr-FR.md
@@ -101,7 +101,7 @@ Ni échantillons ni enregistrements. Les notes sont écrites comme des données
| [Cinématique, émerveillement](assets/audio/sampler-cinematic-awe-8s.mp3) · [Lo-fi](assets/audio/sampler-lofi-nostalgic-8s.mp3) · [Marimba](assets/audio/sampler-marimba-curious-8s.mp3) · [Électronique](assets/audio/sampler-drive-electronic-8s.mp3) | d'autres ambiances et instruments |
| [Le thème du nocturne en 15 secondes](assets/audio/fit-theme-15s.mp3) | Le compositeur choisit la forme adaptée à la durée |
-Et aussi : **la lo-fi électronique**, détendue et enjouée, avec des nappes chaudes et désaccordées, une mélodie pincée tout en douceur et un léger flottement de bande (la musique du film de lancement a été composée dans ce style ; [le vocabulaire](skills/anidoodle/references/music/styles/lofi-electronic.md)), et un **kit de bruitages** : quatorze effets superposés et déterministes, calés sur l'image exacte, la musique s'effaçant sous chacun d'eux ([le design sonore](skills/anidoodle/references/music/sound-design.md)). Un style est un vocabulaire avec lequel composer, jamais des notes toutes faites : chaque film reçoit une musique écrite pour lui.
+Et aussi : un **kit de bruitages**, quatorze effets superposés et déterministes, calés sur l'image exacte, la musique s'effaçant sous chacun d'eux ([le design sonore](skills/anidoodle/references/music/sound-design.md)).
## Des pages web qui vous remarquent
@@ -227,7 +227,7 @@ Quatre moteurs de rendu partagent un même noyau artistique, et ce noyau ignore
## Le film d'exemple
-`skills/anidoodle/example/` contient **Mechanical Lepidoptera** : 1 410 images, 47 secondes, un papillon mécanique qui se dessine lui-même au trait technique, prend vie à l'aquarelle, et laisse son plan dans l'herbe. C'est tout le moteur réuni dans une seule pièce : des points de contrôle placés à la main sur une anatomie réelle, une clé de cache qui nomme chaque entrée dont dépend un pixel, une bande-son composée pour elle, et un mouvement ininterrompu du plan à la vie. Les planches de style se trouvent à côté du moteur dans `skills/anidoodle/engine/src/canvas-core/`, chacune avec sa recette écrite en haut. Ouvrez-en une, changez un chiffre, et regardez ce qui bouge.
+`skills/anidoodle/example/` contient **Mechanical Lepidoptera** : 1 410 images, 47 secondes, un papillon mécanique qui se dessine lui-même au trait technique, prend vie à l'aquarelle, et laisse son plan dans l'herbe. C'est tout le moteur réuni dans une seule pièce : des points de contrôle placés à la main sur une anatomie réelle, une clé de cache qui nomme chaque entrée dont dépend un pixel, une bande-son construite à partir de la recette, et un mouvement ininterrompu du plan à la vie. Les planches de style se trouvent à côté du moteur dans `skills/anidoodle/engine/src/canvas-core/`, chacune avec sa recette écrite en haut. Ouvrez-en une, changez un chiffre, et regardez ce qui bouge.
## Honnête par conception
diff --git a/README.ja-JP.md b/README.ja-JP.md
index cad4de3..52fe763 100644
--- a/README.ja-JP.md
+++ b/README.ja-JP.md
@@ -101,8 +101,7 @@ https://github.com/user-attachments/assets/1cf7f75c-b040-4c00-bf0c-cf1885f8b8da
| [シネマティック・畏敬](assets/audio/sampler-cinematic-awe-8s.mp3) · [ローファイ](assets/audio/sampler-lofi-nostalgic-8s.mp3) · [マリンバ](assets/audio/sampler-marimba-curious-8s.mp3) · [エレクトロニック](assets/audio/sampler-drive-electronic-8s.mp3) | ほかのムードと楽器 |
| [15秒に収めたノクターンのテーマ](assets/audio/fit-theme-15s.mp3) | 長さに合う構成を作曲家が選ぶ |
-さらに、**ローファイ・エレクトロニック**。温かくデチューンしたパッド、やわらかく爪弾くリード、かすかなテープの揺れで、落ち着いていて軽快(ローンチ映像の音楽はこのスタイルで作曲した。[語彙](skills/anidoodle/references/music/styles/lofi-electronic.md))。
-そして**効果音キット**。重ねて作るシード付きの効果音が十四種、フレーム単位で鳴り、そのたびに音楽が一歩引く([サウンドデザイン](skills/anidoodle/references/music/sound-design.md))。スタイルは作曲に使う語彙であって、できあいの音符ではない。どの映像にも、その映像のために書いたスコアがつく。
+さらに**効果音キット**。重ねて作るシード付きの効果音が十四種、フレーム単位で鳴り、そのたびに音楽が一歩引く([サウンドデザイン](skills/anidoodle/references/music/sound-design.md))。
## あなたに気づくウェブページ
@@ -228,7 +227,7 @@ Node 20以降が必要。一枚絵なら上記のブラウザだけで足りる
## サンプルのショートフィルム
-`skills/anidoodle/example/`には**Mechanical Lepidoptera(機械仕掛けの鱗翅目)**が入っている。1,410フレーム、47秒、自ら製図されていくぜんまい仕掛けの蝶が、水彩の中で命を得て、草の上に自分の設計図を残していく。これはエンジンのすべてが詰まった一作だ。実際の解剖学的構造の上に手で置かれた制御点、1ピクセルが依存するすべての入力に名前をつけるキャッシュキー、この作品のために作曲されたスコア、そして「組み立てられた状態」から「命を得た状態」へと途切れなく移り変わる動き。スタイルプレートは`skills/anidoodle/engine/src/canvas-core/`にエンジンと並んで置かれていて、それぞれの先頭にレシピが書かれている。どれでも開いて、数字をひとつ変えて、何が動くか見てみてほしい。
+`skills/anidoodle/example/`には**Mechanical Lepidoptera(機械仕掛けの鱗翅目)**が入っている。1,410フレーム、47秒、自ら製図されていくぜんまい仕掛けの蝶が、水彩の中で命を得て、草の上に自分の設計図を残していく。これはエンジンのすべてが詰まった一作だ。実際の解剖学的構造の上に手で置かれた制御点、1ピクセルが依存するすべての入力に名前をつけるキャッシュキー、レシピから組み立てられたスコア、そして「組み立てられた状態」から「命を得た状態」へと途切れなく移り変わる動き。スタイルプレートは`skills/anidoodle/engine/src/canvas-core/`にエンジンと並んで置かれていて、それぞれの先頭にレシピが書かれている。どれでも開いて、数字をひとつ変えて、何が動くか見てみてほしい。
## 正直に設計されている
diff --git a/README.ko-KR.md b/README.ko-KR.md
index 1bb1064..2b1469c 100644
--- a/README.ko-KR.md
+++ b/README.ko-KR.md
@@ -101,7 +101,7 @@ https://github.com/user-attachments/assets/1cf7f75c-b040-4c00-bf0c-cf1885f8b8da
| [영화 음악·경외감](assets/audio/sampler-cinematic-awe-8s.mp3) · [로파이](assets/audio/sampler-lofi-nostalgic-8s.mp3) · [마림바](assets/audio/sampler-marimba-curious-8s.mp3) · [일렉트로닉](assets/audio/sampler-drive-electronic-8s.mp3) | 더 많은 분위기와 악기 |
| [15초로 맞춘 녹턴 주제](assets/audio/fit-theme-15s.mp3) | 작곡기가 길이에 맞는 형식을 골라요 |
-그리고 **로파이 일렉트로닉**도 있어요. 따뜻하게 디튠한 패드, 부드럽게 튕기는 리드, 살짝 흔들리는 테이프 질감으로 차분하면서도 경쾌해요 (런칭 영상의 음악도 이 스타일로 작곡했어요. [어휘](skills/anidoodle/references/music/styles/lofi-electronic.md)). **효과음 키트**도 있어요. 여러 겹으로 만든 시드 기반 효과음 열네 가지가 정확한 프레임에 맞춰 울리고, 그때마다 음악이 살짝 물러나요 ([사운드 디자인](skills/anidoodle/references/music/sound-design.md)). 스타일은 작곡에 쓰는 어휘일 뿐, 미리 만들어 둔 음표가 아니에요. 모든 영상은 그 영상을 위해 쓴 스코어를 받아요.
+**효과음 키트**도 있어요. 여러 겹으로 만든 시드 기반 효과음 열네 가지가 정확한 프레임에 맞춰 울리고, 그때마다 음악이 살짝 물러나요 ([사운드 디자인](skills/anidoodle/references/music/sound-design.md)).
## 나를 알아채는 웹페이지
@@ -227,7 +227,7 @@ Node 20 이상이 필요해요. 스틸컷은 위에서 설치한 브라우저만
## 예제 영화
-`skills/anidoodle/example/` 폴더에는 **Mechanical Lepidoptera**가 들어있어요: 1,410개 프레임, 47초 분량으로, 스스로 설계도를 그리다가 수채화 속에서 살아나고, 풀밭에 자신의 청사진을 남기고 떠나는 태엽 나비 이야기예요. 엔진 전체가 이 한 작품 안에 담겨 있어요. 실제 해부 구조 위에 손으로 찍은 제어점, 픽셀 하나가 무엇에 의존하는지 전부 이름 붙인 캐시 키, 이 작품을 위해 작곡한 스코어, 그리고 설계도에서 생명으로 끊김 없이 이어지는 움직임까지요. 스타일 플레이트는 `skills/anidoodle/engine/src/canvas-core/` 안에 엔진과 나란히 놓여 있고, 각각 맨 위에 레시피가 적혀 있어요. 아무거나 열어서 숫자 하나만 바꿔보면, 뭐가 움직이는지 바로 보여요.
+`skills/anidoodle/example/` 폴더에는 **Mechanical Lepidoptera**가 들어있어요: 1,410개 프레임, 47초 분량으로, 스스로 설계도를 그리다가 수채화 속에서 살아나고, 풀밭에 자신의 청사진을 남기고 떠나는 태엽 나비 이야기예요. 엔진 전체가 이 한 작품 안에 담겨 있어요. 실제 해부 구조 위에 손으로 찍은 제어점, 픽셀 하나가 무엇에 의존하는지 전부 이름 붙인 캐시 키, 레시피로 만든 스코어, 그리고 설계도에서 생명으로 끊김 없이 이어지는 움직임까지요. 스타일 플레이트는 `skills/anidoodle/engine/src/canvas-core/` 안에 엔진과 나란히 놓여 있고, 각각 맨 위에 레시피가 적혀 있어요. 아무거나 열어서 숫자 하나만 바꿔보면, 뭐가 움직이는지 바로 보여요.
## 설계부터 정직하게
diff --git a/README.md b/README.md
index 9c21786..9521c29 100644
--- a/README.md
+++ b/README.md
@@ -101,7 +101,7 @@ No samples and no recordings. The notes are written as data, and every sound is
| [Cinematic, awe](assets/audio/sampler-cinematic-awe-8s.mp3) · [Lo-fi](assets/audio/sampler-lofi-nostalgic-8s.mp3) · [Marimba](assets/audio/sampler-marimba-curious-8s.mp3) · [Electronic](assets/audio/sampler-drive-electronic-8s.mp3) | more moods and instruments |
| [The nocturne's theme in 15 seconds](assets/audio/fit-theme-15s.mp3) | the composer picks the form that fits the length |
-Also in the box: **lo-fi electronic**, chill and upbeat, with warm detuned pads, a soft plucked lead and a little tape wobble (the launch film's score was composed in it; [the vocabulary](skills/anidoodle/references/music/styles/lofi-electronic.md)), and a **sound-effects kit**: fourteen layered, seeded effects cued to the exact frame, the score ducking under each one ([sound design](skills/anidoodle/references/music/sound-design.md)). A style is a vocabulary to compose from, never ready-made notes: every film gets a score written for it.
+Also in the box: a **sound-effects kit**, fourteen layered, seeded effects cued to the exact frame, the score ducking under each one ([sound design](skills/anidoodle/references/music/sound-design.md)).
## Web pages that notice you
@@ -227,7 +227,7 @@ Four backends share one art core, and the core stays blissfully unaware of which
## The example film
-`skills/anidoodle/example/` holds **Mechanical Lepidoptera**: 1,410 frames, 47 seconds, a clockwork butterfly that drafts itself, comes alive in watercolour, and leaves its blueprint in the grass. It is the whole engine in one piece: control points placed by hand over real anatomy, a cache key that names every input a pixel depends on, a score composed for it, and one unbroken move from built to alive. The style plates sit beside the engine in `skills/anidoodle/engine/src/canvas-core/`, each with its recipe written at the top. Open any of them, change a number, and watch what moves.
+`skills/anidoodle/example/` holds **Mechanical Lepidoptera**: 1,410 frames, 47 seconds, a clockwork butterfly that drafts itself, comes alive in watercolour, and leaves its blueprint in the grass. It is the whole engine in one piece: control points placed by hand over real anatomy, a cache key that names every input a pixel depends on, a score built from the recipe, and one unbroken move from built to alive. The style plates sit beside the engine in `skills/anidoodle/engine/src/canvas-core/`, each with its recipe written at the top. Open any of them, change a number, and watch what moves.
## Honest by design
diff --git a/README.zh-CN.md b/README.zh-CN.md
index d9e58e1..eb5b2c9 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -101,8 +101,7 @@ https://github.com/user-attachments/assets/1cf7f75c-b040-4c00-bf0c-cf1885f8b8da
| [电影感·敬畏](assets/audio/sampler-cinematic-awe-8s.mp3) · [低保真](assets/audio/sampler-lofi-nostalgic-8s.mp3) · [马林巴](assets/audio/sampler-marimba-curious-8s.mp3) · [电子乐](assets/audio/sampler-drive-electronic-8s.mp3) | 更多情绪与乐器 |
| [15 秒版夜曲主题](assets/audio/fit-theme-15s.mp3) | 作曲器会选择适合时长的曲式 |
-另外还有**低保真电子乐**:温暖的失谐铺底、轻柔的拨弦主旋律和一点磁带晃动,放松又轻快(发布片的配乐就是用这种风格创作的,[词汇表](skills/anidoodle/references/music/styles/lofi-electronic.md));
-以及**音效套件**:十四种分层、带种子的音效,精确到帧触发,每一次音乐都会让开一点([声音设计](skills/anidoodle/references/music/sound-design.md))。风格是用来作曲的词汇,从来不是现成的音符:每部片子都有专门为它写的配乐。
+另外还有**音效套件**:十四种分层、带种子的音效,精确到帧触发,每一次音乐都会让开一点([声音设计](skills/anidoodle/references/music/sound-design.md))。
## 会注意到你的网页
@@ -228,7 +227,7 @@ node tools/verify-export.mjs intro --file out/intro.mp4 # the file you ship, d
## 示例短片
-`skills/anidoodle/example/` 目录里放着**机械鳞翅目**(Mechanical Lepidoptera):1,410 帧,47 秒,一只机械蝴蝶自己画出自己的图纸,在水彩中苏醒过来,又把蓝图留在了草丛里。这一部作品,就是整个引擎的缩影:控制点是按照真实解剖结构手工摆放的,缓存键记录了每个像素依赖的每一个输入,配乐专为它创作,从画成到活过来,是一气呵成的一个动作。风格样图和引擎放在一起,都在 `skills/anidoodle/engine/src/canvas-core/` 里,每一张的顶部都写着自己的配方。随便打开一个,改一个数字,看看会发生什么变化。
+`skills/anidoodle/example/` 目录里放着**机械鳞翅目**(Mechanical Lepidoptera):1,410 帧,47 秒,一只机械蝴蝶自己画出自己的图纸,在水彩中苏醒过来,又把蓝图留在了草丛里。这一部作品,就是整个引擎的缩影:控制点是按照真实解剖结构手工摆放的,缓存键记录了每个像素依赖的每一个输入,配乐按照配方生成,从画成到活过来,是一气呵成的一个动作。风格样图和引擎放在一起,都在 `skills/anidoodle/engine/src/canvas-core/` 里,每一张的顶部都写着自己的配方。随便打开一个,改一个数字,看看会发生什么变化。
## 诚实是设计出来的
diff --git a/skills/anidoodle/SKILL.md b/skills/anidoodle/SKILL.md
index 5e5c665..9dbb02f 100644
--- a/skills/anidoodle/SKILL.md
+++ b/skills/anidoodle/SKILL.md
@@ -42,9 +42,9 @@ say why in one line. Write the answers into a short brief before drawing.
| A style matched from their image | `references/workflows/adapt-a-style.md` |
| A score or soundtrack | `references/music/README.md` |
-- Music: pick a style vocabulary and mood, compose your own harmony, motif and form (references/music/compose.md), then node tools/music.mjs check <score.ts#export> must PASS before a human listens. Styles give sound, never notes.
+- Music: write your own score for the film (references/music/README.md); node tools/music.mjs check <score.ts#export> must PASS before a human listens.
- Sound effects: references/music/sound-design.md. 14 layered, seeded effects cued by film frame (filmSfx); the score ducks, and every cue must be within 6 dB of it. Effects only on real direction changes, one riser + one impact per film.
-- Launch films: `launchTemplate.ts` renders a product's launch from data: prompts, plates drawn for it, a score composed for it, words, install lines; habits that save tokens are in `references/working-method.md`.
+- Launch films: `launchTemplate.ts` renders a product's launch from data: prompts, plates drawn for it, a score written for it, words, install lines; habits that save tokens are in `references/working-method.md`.
## The seven laws
@@ -123,7 +123,7 @@ node tools/emit.mjs intro --out out/intro.html # one self-co
| `docs-check.mjs` | fails when any doc's style count, length or path disagrees with the code |
| `verify-export.mjs` | QA on the rendered file: frames, duration, score; opt-in first frame, loop seam, `--delivery` |
| `test.mjs` (`npm test`) | unit suites in `engine/test/`, no browser |
-| `music.mjs` | `vocab` prints a style's vocabulary; `check` gates your composed score; `render`, `meter` |
+| `music.mjs` | renders and meters a score; `check` gates it (key, master, guards, stems, novelty) |
| `sfx.mjs` | the sound-effects kit: `list`, `one`, `kit <dir>`, `test` |
Four backends, one art core: `playwright`, `html-player`, `remotion`, `hyperframes`.
diff --git a/skills/anidoodle/references/music/README.md b/skills/anidoodle/references/music/README.md
index 7ff0b0a..da02f03 100644
--- a/skills/anidoodle/references/music/README.md
+++ b/skills/anidoodle/references/music/README.md
@@ -5,25 +5,10 @@ and synthesizes them in code. No samples, no recordings, no licensed audio, ever
what you make, so every choice is a number, every number is measured, and a human hears 8 seconds
before anything ships.
-Code: `engine/src/canvas-core/music/`. Tool: `engine/tools/music.mjs`.
-
-**Start here: [`compose.md`](compose.md).** It takes you from a brief to an original score. A style
-is a vocabulary: sound, grooves, harmony language, melody rules, arrangement grammar. It is never
-notes. You compose every note, and nothing is filled in for you. There is no default style.
-
-Pages:
-- [`compose.md`](compose.md): the workflow, the material format, craft, and the never-reuse rule.
-- [`styles/vocabularies.md`](styles/vocabularies.md): all 21 style vocabularies, the 15 groove
- families and the section kinds. It is generated from the code.
-- [`styles/lofi-electronic.md`](styles/lofi-electronic.md): the lo-fi electronic vocabulary in
- depth, and the stem balance meter.
-- [`styles/music-box.md`](styles/music-box.md): the original music-box recipe's sound numbers and
- the scar story behind the guards.
-
-**Demos are not scores.** The pieces in `pieces/` (samplers, families, nocturne, our launch scores)
-were written to prove the synth and the meters, and one of them is our own film's score. They are
-listening references and the novelty corpus (`node tools/music.mjs list`). A film never plays them:
-`node tools/music.mjs novelty` fails a score that sounds like them or quotes them.
+Code: `engine/src/canvas-core/music/`. Tool: `engine/tools/music.mjs`. The old music-box recipe
+lives on, verbatim, as the default style preset: [`styles/music-box.md`](styles/music-box.md).
+Sound effects on picture (clicks, whooshes, impacts, placed by film frame over the score) are in
+[`sound-design.md`](sound-design.md).
## The pipeline
@@ -36,16 +21,18 @@ MusicPlan + notes (you write) -> perform -> instruments (one stem per part)
harmony list.
- The plan names:
- one **style**;
- - a tempo and a meter (2/4, 3/4, 4/4, 5/4, 6/8, 7/8, 9/8, 12/8);
+ - a tempo and a meter (3/4, 4/4, 6/8, 12/8);
- **sections**, each with a mood (or a blend `[a, b, w]`), a key and mode, the melody types,
a dynamic level `[start, end]` 0..1, and an ending;
- `repeatable` / `optional` / `pickup` / `variations` flags, which let it fit any length.
- - Notes are written in a bar-checked notation. A bar that doesn't add up to the meter throws:
+ - Notes are written in a bar-checked notation. A bar that doesn't add up to the meter throws,
+ the last one too (a line that ends mid-bar writes its rest: `C2:3 r:1`). A one-bar sting on any
+ beat says so with `hit: true`:
```ts
- line(<start beat>, "<NOTE>:<beats> <NOTE>:<beats> | [<NOTE> <NOTE>]:<beats>@<vel> | r:<beats>", { role, bpb })
+ line(3, "C5:2 Bb4:.5 Ab4:.5 | Bb4:2 Eb4:1 | [Ab1 Eb2 Ab2]:[email protected]", { role: "melody", bpb: 3 })
```
- Roles: `melody`, `inner`, `bass`, `accomp`, `color`, `drum`.
- - Nothing generates notes. **You compose** (compose.md):
+ - Generators may draft. **You compose**:
- real harmony and voice-leading;
- a memorable motif and phrases that ask and answer;
- cadences.
@@ -72,16 +59,6 @@ MusicPlan + notes (you write) -> perform -> instruments (one stem per part)
| `fmBell`, `ePiano` | 2-operator FM |
| `pulse`, `triangle`, `noiseDrum` | NES-style chip voices |
| `kick`, `snare`, `hat`, `bass`, `vinyl` | Drums, bass and texture |
- | `warmPad`, `softPluck`, `sub` | The lo-fi electronic kit (`lofiKit.ts`): detuned-saw pad, filtered pluck with ping-pong delay, sine sub |
- | `organ` | Drawbar ranks (harmonics 1 2 3 4 6 8), chorus, tremulant |
- | `brass` | PolyBLEP saw, a low-pass that opens with loudness, a pitch scoop, delayed vibrato |
- | `woodwind` | Flute (sine + breath noise) or `reed: true` clarinet (odd harmonics) |
- | `choir` | Detuned saws through vowel formants (`vowel`: a o u e i). Texture, never a lead |
- | `timpani` | Tuned membrane modes, a pitch settle, a mallet thump (`pitch` tunes it in a drum lane) |
- | `leadSynth` | Mono saw + square, portamento, a filter envelope, blooming vibrato |
- | `bowedSolo` | One bowed voice (violin, or `cello: true`): vibrato, bow noise, body resonances |
-
- The acoustic voices are procedural approximations. A human listens before one carries a film.
4. **Room.** The style chooses it:
- music box: one reflection, no tail;
- nocturne and lullaby: a small room;
@@ -90,20 +67,13 @@ MusicPlan + notes (you write) -> perform -> instruments (one stem per part)
5. **Master.**
- **Gentle styles:** one static gain to **-16 LUFS**, true peak <= -1 dBTP, never a compressor.
If the peak blocks the gain, the loudness goes down. The cure is musical (see "Peaks" below).
- - **Dense styles** (lofiElectronic, lofi, drive, house, synthwave, hipHop, rock, chiptune): **-14 LUFS** through a look-ahead true-peak limiter, then a static trim if an inter-sample peak still passes -1 dBTP.
+ - **Dense styles** (chiptune, lo-fi, drive): **-14 LUFS** through a look-ahead true-peak limiter.
A film's `audio` is `filmAudio(piece, seconds)`, which returns `(sampleRate) => [L, R]` at exactly
-the film's length. It fits the score first (`fitScore`, below), so the music ends on its phrase at
-the last frame and is never chopped. Any film mix that renders a score (sound effects included) must
-fit it the same way. `engine/src/canvas-core/score.ts` is an empty skeleton: `filmScore(material,
-fps, frames)` composes your material and fits it.
+the film's length. `engine/src/canvas-core/score.ts` is the scaffold example.
## Any length, never hard-coded
-`fitScore(piece, seconds)` first calls the piece's own `refit(seconds)` if it has one. A composed
-piece repeats or drops its `stretch` section, so it still lands on its outro. Then it runs
-`fitToDuration`.
-
`fitToDuration(piece, seconds)` tries every form:
- with some `optional` sections dropped (dropping music costs more than nudging the tempo);
- with the `repeatable` group restated 0..n times, as "A B A B" or "A A B" (restatements take the
@@ -114,42 +84,34 @@ It picks the form whose tempo is closest to the written one. If no full form fit
the piece's `shortForm`. A section's `pickup` travels with it: wherever a section lands, its own
upbeat leads into it.
-A hand-written piece with a short form, repeatable sections and optional sections can fit anything
-from a quarter of its length to many times it, and it still ends on its cadence.
+Example: the nocturne "Window Light" gives
+- the short form (the 8-second phrase, restated) at 15 s;
+- the full piece at 45 s;
+- intro, theme, theme (in octaves), build, coda at 60 s;
+- six theme/climax cycles with rotating variations at 180 s.
-## Styles (21) and moods (21)
+## Styles (11) and moods (15)
-Both are rows of numbers in `tables.ts`. The vocabularies are in `vocab.ts` and `vocabMore.ts`, and
-[`styles/vocabularies.md`](styles/vocabularies.md) is generated from them. A brief names rows,
-never adjectives. Each row stays `unconfirmed` until a human has listened to 8 seconds of it; the
-listener's words then go into `confirmedBy`.
+Both are rows of numbers in `tables.ts`. A brief names rows, never adjectives. Each row stays
+`unconfirmed` until a human has listened to 8 seconds of it; the listener's words then go into
+`confirmedBy`.
-| Style | Atmosphere | Master |
-|---|---|---|
-| lofiElectronic | chill, upbeat, clean electronic | dense |
-| lofi | dusty lo-fi hip-hop (e-piano, vinyl) | dense |
-| drive | driving electronic, four-on-the-floor | dense |
-| house | euphoric house / EDM | dense |
-| synthwave | neon-retro, gated snare, soaring lead | dense |
-| hipHop | head-nod or dark trap, heavy 808 | dense |
-| rock | band energy, driven guitars, tight kit | dense |
-| chiptune | 8-bit, two pulses, triangle, noise | dense |
-| cinematic | string swells, ostinatos, harp and bell colour | gentle |
-| orchestral | heroic/epic: brass theme, string engine, choir, timpani | gentle |
-| suspense | drones, heartbeat pulse, bowed harmonics, stingers | gentle |
-| ambient | airy, spacious, bells and pads | gentle |
-| choral | voices in parts, organ, bells | gentle |
-| folk | tender acoustic: guitar, piano, harp, brushes | gentle |
-| world | drone, modal melody, hand percussion, odd meters | gentle |
-| playful | bouncy mallets, skipping kit | gentle |
-| jazz | swing ride, walking bass, comping | gentle |
-| nocturne | solo piano, rubato | gentle |
-| minimalist | interlocking ostinatos | gentle |
-| lullaby | soft, rocking, nothing percussive | gentle |
-| musicBox | clockwork plucks, no sustain | gentle |
+| Style | Tempo, meter | Natural moods | Master |
+|---|---|---|---|
+| musicBox (default) | 110-130, 12/8 | joy, curious, tender, playful, wistful | gentle |
+| nocturne (piano) | 50-72, 3/4 or 6/8 | tender, melancholy, wistful, romantic | gentle |
+| cinematic | 60-120 | awe, triumph, melancholy, tension, hopeful | gentle |
+| lullaby | 60-75, 3/4 or 6/8 | tender, calm | gentle |
+| folk | 80-120, 6/8, 3/4, 4/4 | calm, wistful, joy, nostalgic | gentle |
+| minimalist | 100-140 | curious, tension, awe | gentle |
+| jazz | 90-180, swing | playful, nostalgic, romantic, curious | gentle |
+| ambient | 50-80 | awe, calm, dread (highest ghost risk) | gentle |
+| chiptune | 120-160 | joy, playful, drive, tension | dense |
+| lofi | 70-90, swing 55-62 % | nostalgic, calm, wistful | dense |
+| drive | 110-140 | drive, triumph, tension, awe | dense |
Moods: joy, playful, tender, wistful, melancholy, hopeful, curious, tension, dread, awe, triumph,
-drive, calm, nostalgic, romantic, anger, eerie, mischief, heroic, sensual, grief.
+drive, calm, nostalgic, romantic.
- Each row has columns for:
- modes and tempo;
- harmonic rhythm and lead register;
@@ -174,18 +136,34 @@ per-mode guards are in `theory.ts`.
Melody types (9): arpeggio, stepwise, hook, ostinato, drone, call and response, counter-melody,
sequence, theme transformation.
-## How to write a score
-
-Follow [`compose.md`](compose.md). In short:
-1. brief -> numbers (length, picture beats, feeling);
-2. one style + one mood + five mood controls;
-3. compose YOUR harmony, bass lines, motif(s), groove choice and form as `Material`;
-4. `node tools/music.mjs check <file>.ts#<export>` must PASS (key, master, ghost/reverb/masking guards, stems, novelty);
-5. `node tools/music.mjs render <file>.ts#<export> out.wav` (use wav for loops: mp3 is not gapless);
-6. 8 seconds (then the whole piece) to a human, as an mp3 on a page.
-
-Hand-written `Piece`s (the nocturne, the samplers) are still valid for styles without a vocabulary
-builder. Write them with `line()` and render them with `renderPiece`.
+## How to plan a score
+
+1. **Spot the film.** Find its 3-5 true sync points, and an arc per section (for example tender, then
+ swelling, then a sudden hush at about 2/3, then a soft close).
+2. **Pick one style.** Give each section a mood, a key and a mode.
+3. **Write the motif first.** A 2-5 note cell with its own rhythm. Then build the harmony under it,
+ with voice-leading by step. Then the phrases:
+ - the question ends off the tonic;
+ - the answer ends on it, straight away;
+ - the high point falls in the second half of the phrase.
+4. **Arrange.** Add density, not length (more notes, never longer notes). Let the motif return:
+ transformed, at the climax, and at the close.
+5. **Print the score and check it.** `<piece>` is a shipped piece's name or your own module,
+ `path/to/score.ts#export` (a `Piece`, or a function returning one):
+ ```
+ node tools/music.mjs score <piece>
+ node tools/music.mjs check <piece> --fit --seconds 45 # key/mode, master, guards, stems, novelty: must PASS
+ node tools/music.mjs render <piece> out.wav --seconds 45 --fit
+ ```
+ - **Stems.** Give the piece `stemTargets` (each part's RMS in dBFS over the samples where it
+ plays) and `node tools/music.mjs stems <piece>` flags any part more than 3 dB off. Balance by
+ stems, then master: integrated LUFS once looked right while a sub sat 7-10 dB too hot.
+ - **Novelty.** Your score must not sound like one we shipped. `node tools/music.mjs novelty
+ <piece>` compares its rhythm, contour, intervals, drums and chord colours with every shipped
+ piece and fails above 0.5, or on any reused 6-note melody fragment, transposed or not.
+ - **Loops.** A `plan.loop` piece renders as a seamless loop (`--loop`): its tail folds back onto
+ the start. Ship loops as wav; mp3 padding clicks at the seam.
+6. **8 seconds to a human.** Include the most important mood change.
**Peaks are a composing problem.** Octaves in both hands landing on one downbeat make a true peak
that caps a gentle master. Fix it in the notes:
diff --git a/skills/anidoodle/references/music/compose.md b/skills/anidoodle/references/music/compose.md
deleted file mode 100644
index 454e570..0000000
--- a/skills/anidoodle/references/music/compose.md
+++ /dev/null
@@ -1,238 +0,0 @@
-# Compose: from a brief to an original score
-
-A style is a **vocabulary**. It gives you:
-- sound: voices, levels and fx;
-- groove families;
-- a harmony language;
-- melody rules;
-- an arrangement grammar.
-
-It never gives you notes. **You write every note**:
-- the chords and their voicings;
-- the bass lines;
-- the motifs and lines;
-- the form.
-
-The engine refuses to fill gaps. Missing harmony, melody, grooves or form is an error that tells you
-what to compose. The engine then performs, synthesizes, mixes and masters, deterministically, in code.
-
-> **Never reuse shipped material.** The demos (`node tools/music.mjs list`) and our own film scores
-> are listening references and the novelty corpus. They are never a film's score or a template. Don't
-> copy them, transpose them or re-rhythm them. `node tools/music.mjs novelty` fails a score that
-> sounds like any shipped piece, or that quotes a 6-note fragment of one (transposed or not).
->
-> **Idioms are fine.** A ii-V-I, a plagal amen, a two-chord vamp, a I-bVII-IV are vocabulary. The
-> style pages name them so you can use them. What is not fine is reusing the same music: a
-> multi-bar progression together with its rhythm, groove, contour and form, or a quoted melody.
->
-> Why this rule exists: a "new" example once changed the key, chords and pitches of the launch
-> score but kept its rhythms, contour, drums and form. It was heard at once as the same song. The
-> novelty fingerprint weighs exactly those things.
-
-## The workflow
-
-1. **Read the brief as numbers.** Write down:
- - the use case (launch film, explainer, loop for a site, game, ad);
- - the length in seconds, and whether it must loop;
- - 3-5 picture beats with their times (the reveal, the claim, the cut to the end card);
- - the words the person used for the feeling.
-2. **Pick one style and one mood.** Styles:
- ```
- node tools/music.mjs vocab
- node tools/music.mjs vocab <style>
- ```
- For the details, see [styles/vocabularies.md](styles/vocabularies.md). The mood is a row in
- `tables.ts` (see the README's mood list). Then set the five **mood controls**, each 0..1, where
- 0.5 = the calibrated palette:
-
- | Control | What it moves |
- |---|---|
- | `energy` | groove density, drum level, sidechain depth, dynamics |
- | `warmth` | filters darker, tape drive and wow, a little more bass |
- | `brightness` | filters and pluck brightness open, hats up |
- | `tension` | pad detune wider, string attacks shorter, lead decays shorter |
- | `space` | reverb sends, delay mix, pad release |
-
- Controls change the sound only. Harmonic tension is yours to write (step 3).
-3. **Compose the harmony.** Work inside the style's harmony language: its modes, chord qualities,
- tendencies and voicing rule. Decide the key and mode from the mood, not from habit.
- - Write a progression **for this brief**. Choose its length (2, 3, 4, 5, 6 or 8 bars) and its
- harmonic rhythm (one chord per bar, two per bar, or one per two bars) on purpose.
- - Voice each chord yourself. Move the voices by step and hold common tones. The bass owns the
- root.
- - Write each chord's bass line (one bar) in the style's bass idiom: held root, root and fifth,
- walking, offbeat 8ths, a syncopated 808 figure. Make the rhythm YOURS.
- - **Tension and release as a curve.** Stable (tonic), moving away (subdominant, relative,
- borrowed), leaning (dominant, suspension, pedal), home. Put home on the picture's key beat.
-4. **Compose the motif(s).** A motif is 2-5 notes with its own rhythm. Invent the rhythm first:
- - Which beats does it avoid?
- - Does it start on an upbeat?
- - Where is the long note?
-
- Then the pitches: the contour, one leap, then steps back.
-
- Develop the motif. Don't photocopy it:
- - **repeat**, then **vary**: change the last interval, displace it by an eighth, extend it;
- - **sequence**: the same shape a step or a third higher;
- - **call and response**: the question ends off the tonic, the answer lands on it, or another
- instrument answers;
- - **fragment** it in a build, **augment** it (slower, longer notes) at the climax;
- - put it in the bass for menace, or high and quiet at the close.
-
- The phrase's high point goes in its second half. A phrase is 2 or 4 bars; a period is two phrases
- (question, answer). The line must respect the style's range and density.
-5. **Choose or write the groove.** Pick a family from the style's list (`bounce`, `trap`,
- `brushes`, `hand`, ...). Set `density` 0..1, `variation` 0..1 and `fill` (a fill on a section's
- last bar). The seed varies every bar, so no two pieces share a loop. You can also write the drum
- bars yourself as notation, one or more bars per lane: `kick`, `snare`, `ghost`, `hat`, `perc`.
- Use a second groove for contrast (`half`, `build`).
-6. **Write the form.** Sections are `{ kind, bars, harmony, lead, counter, arp, groove, bass,
- chordVel, energy, repeat, stretch }`.
- - The **kind** sets which layers may sound: intro, verse, groove, hook, build, half, breakdown,
- drop, bridge, swell, breath, outro. See the arrangement grammar in vocabularies.md.
- - Lines sound only where you write them.
- - Land each section change on a picture beat. At `bpm`, a bar lasts `beatsPerBar x 60 / bpm`
- seconds, and at 30 fps a beat is `1800 / bpm` frames.
- - Mark one section `stretch: true`: a film fit repeats or drops it to reach the exact length and
- still end on your outro.
-7. **Check, render, listen:**
- ```
- node tools/music.mjs check <file>.ts#<export> [--fit --seconds 62] # EVERYTHING, must PASS (below)
- node tools/music.mjs render <file>.ts#<export> out.mp3 --stems # the file, plus the same report
- node tools/music.mjs novelty <a>.ts#x <b>.ts#y # several scores: vs shipped AND pairwise
- node tools/music.mjs score <file>.ts#<export> # the text score, bar by bar
- ```
- `check` runs everything:
- - key/mode problems and composer warnings (for example, a line shorter than its section);
- - the master: loudness vs target, true peak, and a note when the -1 dBTP ceiling stopped the
- gain short;
- - the **ghost, reverb and masking guards**;
- - the stems;
- - novelty.
-
- It exits non-zero on any failure. `render` prints the same report (stems with `--stems`), except
- novelty.
- - **Stems:** fix any part flagged more than 3 dB off with `levels`. `levels` is a **dB offset** per
- slot (+2 = two dB louder), added on top of the calibrated gain, the trims and the mood controls'
- shifts. LUFS alone once hid a sub 7-10 dB too hot.
- - **When the guards and the stems disagree, the guards win.** If masking fails (the melody isn't
- heard), raise the lead. The stem meter lets the lead sit up to +3 dB above its tolerance for
- this. You can also lower or thin what sits in the melody's register. Mood controls shift the
- stem targets with the sound (for example, brightness lifts the hats and their target); the
- printed targets already include that.
- - **Master short of target:** a gentle master (-16 LUFS) never compresses. If one peak blocks the
- gain, the whole piece stays quieter, and `check` says by how much. Fix it in the notes: stagger
- the bass under the loudest downbeat, roll the big chord, don't double the climax note.
- - **Novelty:** if it fails, change what the numbers point at. The per-feature scores name it:
- the lead's rhythm, the contour, the groove, the chord colours, the form. Changing the key fixes
- nothing.
- - **Listen:** the person hears it before it is used. Meters prove you aren't obviously wrong.
- Only an ear says right. For a **loop**, deliver a `.wav`: mp3 adds encoder padding, so it clicks
- or gaps at the loop point.
-
-## The material format
-
-Write the score in the film's own file, next to the film module: `src/canvas-core/<film>Score.ts`
-in a scaffolded project (`engine/src/canvas-core/<film>Score.ts` inside the skill), and export it:
-
-```ts
-import type { Material } from "./music";
-export const score = (): Material => ({
- style: "<style id>", title: "<this film's score>", seed: <any integer>, mood: "<mood id>",
- bpm: <tempo in the style's range>, key: "<tonic>", mode: "<mode id>", meter: "<meter>",
- moodControls: { energy: <0..1>, warmth: <0..1>, brightness: <0..1>, tension: <0..1>, space: <0..1> },
- swing: <0.5 straight .. 0.67 hard>, dyn: [<start 0..1>, <end 0..1>], tail: <seconds of ring-out>,
- chords: { "<name>": { voicing: "[<note> <note> <note>]", bass: "<one bar of notation>" }, /* ... */ },
- motifs: { "<motif>": "<one or more bars of notation>", /* your variations are motifs too */ },
- grooves: { main: { family: "<family>", density: <0..1>, variation: <0..1> }, half: { family: "<family>" } },
- sections: [
- { kind: "intro", bars: <n>, harmony: ["<chord>", /* per bar, cycled */], chordVel: <0..1> },
- { kind: "hook", bars: <n>, harmony: [/* ... */], lead: ["<motif>", "<motif variant>", "r:<beats>"], stretch: true, energy: <0..1> },
- { kind: "groove", bars: <n>, harmony: [/* ... */], lead: ["<2-bar motif>"], loopLines: true },
- { kind: "bridge", bars: <n>, key: "<new tonic>", mode: "<mode>", harmony: [/* in the new key */], lead: [/* ... */] },
- /* ... */
- { kind: "outro", bars: <n>, harmony: ["<home chord>"], lead: ["<the motif's last word>"] },
- ],
-});
-```
-
-A film plays it with `filmScore(score(), fps, frames)` from `canvas-core/score.ts`. That fits your
-form to the exact length. `score.ts` is an empty skeleton to copy.
-
-- **Voices:** `voices: { lead: "<alternate name>" }` swaps a slot for one of the style's
- alternates. Or give your own `{ inst, role, gainDb, opts }` (instruments: README table).
-- **Loops:** `loop: true`, and the form length is the loop. `render` makes it seamless.
-- **Split bars:** `harmony: ["<chord> <chord>"]` splits a bar in two. Give that section a `bass`
- override for it.
-- **Lines play once.** `lead`, `counter` and `arp` start at the section's first bar and play ONCE,
- even though `harmony` cycles. A shorter line leaves rests, and `check` warns. Set
- `loopLines: true` to repeat the line until the section is full. `repeat: n` replays the whole
- section, lines included.
-- **Section `energy`** (0..1, 0.5 = as written) sets the section's dynamics for every part,
- hand-written lines included. It scales velocity from 0.55x to 1.45x, roughly -5 to +3 dB. It
- also sets the density of generated grooves.
-- **`dyn`** is the whole piece's dynamic level `[start, end]`, ramped (default `[0.62, 0.66]`).
- `swing` and `tail` default to the style's lower swing bound and 3.2 s.
-- **Modulation:** give a section its own `key` and `mode`. The key check then reads each key region
- on its own. A lift of a step for the last chorus is fine when that section declares the new key.
-- **The key check weighs the tonic.** It accepts your declared tonic and mode when the mode's scale
- explains the notes as well as any other reading, and the tonic is heard (at least 8 % of note
- time). A lydian or dorian passage whose notes lean on another degree gets read as that degree's
- major. Put the bass on the tonic at section starts and cadences, and state the mode's colour note.
-- **Written drums:**
- - A `LiteralGroove` gives notation bars per lane (`kick`, `snare`, `ghost`, `hat`, `perc`).
- - The bars cycle from each section's first bar; `cycle: "piece"` cycles on the piece's bar count
- instead.
- - Unpitched drums ignore the written pitch: write `C4`.
- - A timpani in a drum lane (orchestral, choral, suspense, world) is tuned to the tonic of `key`,
- generated grooves included (`epic`).
-
-**Notation** (bar-checked; a bar that doesn't add up throws, the last bar too: a line that ends
-mid-bar writes its rest, `C2:3 r:1`, never a silent gap):
-- A token is `NOTE:DUR[@VEL]` (a pitch name with an octave, e.g. `F#4`), `[NOTE NOTE ...]:DUR` (a
- chord) or `r:DUR` (a rest).
-- Bars are separated by `|`, or given as array items.
-- Durations are in beats. In 6/8, 9/8 and 12/8 a beat is a dotted quarter, so an eighth is `1/3`.
- In 7/8 a beat is a quarter, so an eighth is `.5` and a bar is 3.5.
-- `@VEL` scales the line's velocity (0..1).
-- In a hand-written piece, a one-bar sting on any beat says so: `line(t, "G6:1", { ..., hit: true })`.
-
-## Craft notes (what makes it good, not just valid)
-
-- **One idea, developed.** Most memorable scores have one motif, heard 6-12 times, never the same
- way twice. Two motifs at most; the second answers or contrasts the first.
-- **Contrast by section:**
- - change the density (layers in and out);
- - change the register (the motif up an octave);
- - change the harmonic rhythm (twice as fast into a cadence);
- - change the groove (half-time).
-
- A section that only repeats the previous one is dead air.
-- **Cadences on picture beats.** The strongest arrival (home chord, full layers, the motif's peak)
- goes on the most important frame. The claim, the reveal and the logo each get a structural
- downbeat. Use a breakdown or a breath (drums out, one bar of silence) right before it.
-- **Tension curve.** Plan energy 0..1 per section before writing notes: rise, a dip before the peak,
- then release. Match it with density, register and harmony (leaning chords before home).
-- **Endings.** End on a phrase, never on the last frame by accident:
- - a held home chord with the motif's last word;
- - a button (a short tutti hit);
- - an unresolved hold (suspense only).
-- **Mood fit.** Match the mode, tempo and brightness to the words. If the listener names a different
- emotion from the one you declared, the choice was wrong, not the listener.
-- **Breadth.** Across projects, vary the meter, the harmonic rhythm, the groove family and the form
- length. Two scores for two products should not be siblings.
-
-## What checks what
-
-| Check | Runs in | Fails when |
-|---|---|---|
-| key/mode (`planProblems`) | `check`, `render` | a key region's notes don't support its declared tonic and mode |
-| composer warnings | `check`, `render` | (warns only) a line is shorter than its section, ... |
-| master | `check`, `render` | (notes only) the peak ceiling stopped the gain short of the target |
-| ghost guard | `check`, `render` | 4-bar windows are formless (few onsets, sustained, wet, no cadence) |
-| reverb guard | `check`, `render` | the late tail sits within 10 dB of the dry sound |
-| masking guard | `check`, `render` | the melody doesn't clear the other parts in 500 Hz-4 kHz |
-| stems | `check`, `render --stems`, `stems` | a part is more than 3 dB off target (lead: up to +6 dB allowed); advisory for uncalibrated styles |
-| novelty | `check`, `novelty` | similarity above 0.5 to a shipped piece (or to each other), or a reused 6-note melody fragment |
-
-`tools/music-unit.mjs` keeps the engine honest: determinism, no defaults, every vocabulary renders.
diff --git a/skills/anidoodle/references/music/sound-design.md b/skills/anidoodle/references/music/sound-design.md
index 27f1def..ffee6ac 100644
--- a/skills/anidoodle/references/music/sound-design.md
+++ b/skills/anidoodle/references/music/sound-design.md
@@ -56,9 +56,9 @@ approach, a riser's build) is rendered before the frame. If it would start befor
the plan throws and names the earliest legal frame.
```ts
-import { filmSfx, filmAudio, composePiece, type SfxPlan } from "./music";
-import { myScore } from "./myScore"; // the Material YOU composed for this film (compose.md)
-const score = composePiece(myScore);
+import { filmSfx, filmAudio, type SfxPlan } from "./music";
+import { myScore } from "./myScore"; // the Piece YOU wrote for this film (README.md)
+const score = myScore();
const plan: SfxPlan = {
fps: 30, frames: 450, score: { piece: score }, beatZeroS: 0, seed: 7, // key, bpm, bar from the score
cues: [
diff --git a/skills/anidoodle/references/music/styles/lofi-electronic.md b/skills/anidoodle/references/music/styles/lofi-electronic.md
deleted file mode 100644
index 9a5763f..0000000
--- a/skills/anidoodle/references/music/styles/lofi-electronic.md
+++ /dev/null
@@ -1,109 +0,0 @@
-# Style: lo-fi electronic (chill, upbeat, clean)
-
-> A vocabulary, not a song. The data is `VOCAB.lofiElectronic` in `engine/src/canvas-core/music/vocab.ts`
-> (print it: `node tools/music.mjs vocab lofiElectronic`). You compose the notes with
-> [../compose.md](../compose.md). Our launch film was scored in this style (`launchLofi3`). That
-> score is ours and is in the novelty corpus. Never reuse its progression, hook, rhythms, drums or
-> form.
-
-## The sound
-
-Chill but **upbeat**, **clear**, **not noisy**:
-- a warm pad that breathes with the kick;
-- a plucked lead through a dotted-eighth ping-pong delay;
-- a high counter-line;
-- a round sine sub;
-- a bouncy, clean kit.
-
-**Never:**
-- synth electric piano;
-- vinyl crackle;
-- bit-crush;
-- a dark master low-pass;
-- heavy tape.
-
-Those read as dusty lo-fi hip-hop (the `lofi` style), not clean electronic.
-
-| Slot | Voice | How it's made | Stem RMS target |
-|---|---|---|---|
-| chords | `warmPad` | 7 PolyBLEP saws, spread 0.55 x +-14 cents, slow per-voice drift, 12 dB low-pass at 2.6 kHz, 0.5 s attack, 1.4 s release | -21 dB |
-| lead | `softPluck` | triangle + square an octave down, filter snaps open, 0.42 s decay, dotted-eighth ping-pong (feedback 0.28, mix 0.24) | -16.5 dB |
-| counter | `softPluck` | brighter, panned 0.35, more delay and room | -24 dB |
-| bass | `sub` | sine + a whisper of the 2nd harmonic, low-passed at 150 Hz | -18 dB |
-| kick / snare / ghost / hat | kit | a bouncy kick, a snare, rim ghosts about 11 dB under, 16th hats | -14 / -20 / - / -28 dB |
-| arp, perc | `softPluck`, `hat` | optional extra layers | - |
-
-Alternates:
-- lead: `bell`, `mallet`, `guitar`;
-- chords: `strings`, `piano`;
-- bass: `warm`.
-
-Bus:
-- the kick ducks the chords and the counter (depth 0.38, release 0.24 s);
-- tape is barely there (2.5 cents of wow);
-- clean master at **-14 LUFS**, true peak **<= -1 dBTP**.
-
-The stem targets were calibrated on a listened score, and they are the only calibrated targets.
-
-## Grooves
-
-`bounce`, `halfTime`, `broken`, `skip`, `pulse`, `build`. Pick one per section role (`main`,
-`half`, `build`) and set `density` and `variation`. The seed varies every bar. Swing 0.52-0.56.
-
-## Harmony language (write your own progression)
-
-- **Modes:** major, dorian, lydian, aeolian, mixolydian.
-- **Qualities:** 7ths, 9ths, 11ths, 13ths, add9, sus2 and sus4. Keep bare triads for the landing.
-- **Tendencies:**
- - loops of 2, 4 or 8 bars;
- - ii-V motion;
- - drifting IV-iii-vi motion;
- - modal vamps (i-IV in dorian, I-II in lydian);
- - a borrowed iv or bVII for a wistful turn.
-- **Harmonic rhythm:** one chord per bar or two. A change may anticipate the bar by an eighth.
-- **Voicing:** rootless 3-4 note voicings between about E3 and E4, moving by step. The sub owns the
- root.
-- **Tension:** sus4 and 13ths lean, maj7#11 floats, 7b9 or a borrowed iv aches. Release by stepping
- the leaning voice down.
-
-## Melody rules (write your own motif)
-
-- Lead in C4-A5, counter an octave above.
-- Short arches, with the high point late in the phrase.
-- 1-3 notes per beat, with rests so the echo can answer.
-- A 2-5 note cell with its own rhythm: repeat it, then vary it (a step up, the last interval
- inverted, displaced by an eighth).
-- Call and response between the lead and the counter.
-
-## Arrangement grammar
-
-A typical shape: intro -> groove -> hook -> (half-time or breakdown) -> drop on home -> outro. Add
-or remove one layer at a time. Put the drop (everything back, home chord) on the picture's strongest
-beat.
-
-**Transitions:**
-- a fill bar;
-- a half-time bar;
-- drums out for a breakdown.
-
-**Endings:**
-- the home chord held, with the motif's last note;
-- a clean button.
-
-## Mixing: balance by stem RMS, then master
-
-```
-node tools/music.mjs check <file>.ts#<export> # the whole gate, stems included
-node tools/music.mjs stems <file>.ts#<export> # the stem table alone, while you balance
-node tools/music.mjs render <file>.ts#<export> out.mp3 --stems
-```
-
-A stem is a part's own signal:
-- unmastered, pre-room, after its gain and the duck;
-- measured as RMS over its **active** samples (|x| > 1e-4), left channel, at 24 kHz.
-
-Fix a flagged part with `levels`, never with the master.
-
-**The lesson:** integrated LUFS only says how loud the whole mix is. On the launch score the mix read
-a healthy -14 LUFS while the sub sat **7-10 dB too hot**. `tools/music-unit.mjs` keeps this as a
-regression: a sub 9 dB hot still masters to -14.0 LUFS, and only the stem meter flags it.
diff --git a/skills/anidoodle/references/music/styles/music-box.md b/skills/anidoodle/references/music/styles/music-box.md
index cfe571f..8bfba70 100644
--- a/skills/anidoodle/references/music/styles/music-box.md
+++ b/skills/anidoodle/references/music/styles/music-box.md
@@ -1,11 +1,10 @@
-# Style: music box
+# Style preset: music-box (the default)
-> The original anidoodle music recipe, kept below for its SOUND numbers (the `musicBox` and `bell`
-> instruments implement them) and its scar story (why the guards exist). It is one style among the
-> vocabularies in `engine/src/canvas-core/music/vocab.ts` (`VOCAB.musicBox`), not a default: there is
-> no default style. Its fixed composing choices (one progression, one scale, one accompaniment
-> figure) were rewritten below as ranges: the composer writes the notes ([../compose.md](../compose.md)).
-> Its ban list is the rule for THIS style only; for other styles the bans became measured guards.
+> The original anidoodle music recipe, kept **verbatim** below as one style preset among the eleven
+> in `engine/src/canvas-core/music/tables.ts` (`STYLES.musicBox`). Its numbers are what the
+> `musicBox` and `bell` instruments implement. Its ban list is now the rule for THIS preset only;
+> for every other style the bans became measured guards (see `../README.md`, "Guards"). The scar
+> story is kept because it is why the guards exist.
---
@@ -28,11 +27,11 @@
- bass: same pluck one to two octaves down with only the first two partials, gain 0.5. It is still a pluck. It never sustains.
- "room": ONE early reflection, 30 ms late, 14 dB down. No tail.
-**Key, register, harmony.** Any major, lydian, dorian or minor key you choose for the mood (a minor music box is a real, uncanny sound). Melody between C5 and C7, bass C3 to G3. Harmonic rhythm one chord per bar; the progression is yours (plagal and deceptive turns read well; the original film used the plainest possible one and said "nothing cleverer", which is a choice, not a rule). For a lift at the payoff, move the key up a step.
+**Key, register, harmony.** C, G or D major. Melody between C5 and C7, bass C3 to G3. One chord per bar, **I, IV, V, I**, and nothing cleverer. If you want a lift for the payoff, go up a whole step and play the same thing.
-**Melody.** Chord tones plus the mode's scale, mostly steps, leaps onto chord tones. Four-bar phrases in pairs: the QUESTION ends off the tonic, the ANSWER lands on it, **and the answer follows immediately.** Your own motif, with its own rhythm.
+**Melody.** Chord tones and the major pentatonic (1 2 3 5 6). Mostly steps, leaps only onto chord tones. Four-bar phrases in pairs: the QUESTION ends on the 5th over V, the ANSWER ends on the root over I, **and the answer follows immediately.** The story may hold its resolution back for a minute; the tune may not. What you hold back is the ARRANGEMENT: the octave doubling, the full arpeggio and the bell arrive with the payoff.
-**Rhythm.** At 120 bpm and 30 fps a beat is 15 frames and a straight eighth is 7.5 frames, which does not exist. Use triplet eighths, 5 frames: 12/8, which is what a music box plays anyway. Accompaniment is an arpeggio figure you design on the triplets (choose its order of chord tones and its cycle length; a 4-note cell over 3-note groups makes a gentle hemiola); melody mostly on beats. Every onset is a row in a cue table with its FRAME, and the module asserts at load that each sample index equals `round(frame / fps * sampleRate)`.
+**Rhythm.** At 120 bpm and 30 fps a beat is 15 frames and a straight eighth is 7.5 frames, which does not exist. Use triplet eighths, 5 frames: 12/8, which is what a music box plays anyway. Accompaniment is a rolling 1-5-3-5 arpeggio on the triplets; melody mostly on beats. Every onset is a row in a cue table with its FRAME, and the module asserts at load that each sample index equals `round(frame / fps * sampleRate)`.
**Sound events ride on top, quietly:** a tick is a 2 ms noise burst through a band-pass at 3 kHz, the tock at 2 kHz, 20 dB under the melody. A landing is one soft pluck on its beat. The DING is a bell on the tonic (partials 1, 2, 3, 4.2, tau 1.2 s, doubled an octave down) on the final downbeat, with at least four beats of film after it.
diff --git a/skills/anidoodle/references/music/styles/vocabularies.md b/skills/anidoodle/references/music/styles/vocabularies.md
deleted file mode 100644
index 6f24f48..0000000
--- a/skills/anidoodle/references/music/styles/vocabularies.md
+++ /dev/null
@@ -1,537 +0,0 @@
-# Style vocabularies
-
-> GENERATED by `node tools/music.mjs vocab --md` from `engine/src/canvas-core/music/vocab.ts` and `vocabMore.ts`. Do not edit by hand.
-> A style is a vocabulary: sound, grooves, harmony language, melody rules, arrangement grammar. It never
-> contains notes. You compose the notes ([../compose.md](../compose.md)).
-
-| Style | Atmosphere | Tempo, meters | Moods | Grooves |
-|---|---|---|---|---|
-| `lofiElectronic` | warm, chill but upbeat, clean: a breathing pad, a plucked hook through ping-pong echoes, a round sub, a bouncy kit | 80-100 bpm; 4/4 | calm, joy, hopeful, nostalgic, wistful, curious | bounce, halfTime, broken, skip, pulse, build |
-| `drive` | forward, bright, confident: four-on-the-floor, a pumping supersaw bed, a gritty bass line, a plucked arp | 110-140 bpm; 4/4 | drive, triumph, tension, joy, awe | fourFloor, broken, build, halfTime, tension |
-| `cinematic` | wide and emotional: string swells, low ostinatos for tension, harp and bell colour, a low boom on the arrival | 60-120 bpm; 4/4, 3/4, 6/8 | awe, triumph, tension, melancholy, hopeful, dread | pulse, tension, build, halfTime |
-| `ambient` | floating, spacious, luminous: long pads, bells and plucks with space around them, a soft heartbeat at most | 50-80 bpm; 4/4, 3/4 | awe, calm, hopeful, tender, dread | pulse, brushes |
-| `folk` | intimate and warm: fingerpicked guitar, soft piano, a harp or celesta line, brushes | 60-110 bpm; 6/8, 3/4, 4/4 | tender, calm, wistful, nostalgic, hopeful, romantic | brushes, pulse, shuffle |
-| `playful` | light, cheeky, springy: marimba and pizzicato-like plucks, a bouncy bass, a skipping kit | 100-150 bpm; 4/4, 6/8 | playful, joy, curious | skip, shuffle, bounce, fourFloor |
-| `musicBox` | small, bright, clockwork, innocent; plucked and never sustained | 100-132 bpm; 12/8, 3/4, 6/8 | joy, curious, tender, playful, wistful, eerie | none (no drums) |
-| `nocturne` | intimate, expressive, late-night: one piano, rubato, pedal | 50-76 bpm; 3/4, 6/8, 4/4 | tender, melancholy, wistful, romantic, grief | none (no drums) |
-| `minimalist` | hypnotic, curious, clean: interlocking ostinatos that change slowly | 96-144 bpm; 4/4, 12/8, 5/4, 7/8 | curious, tension, awe, calm | pulse |
-| `jazz` | loose, warm, clever: swing ride, walking bass, comping piano | 80-200 bpm; 4/4, 3/4 | playful, nostalgic, romantic, curious, sensual, mischief | swing, brushes, shuffle |
-| `lullaby` | soft, rocking, safe | 56-78 bpm; 3/4, 6/8 | tender, calm | none (no drums) |
-| `chiptune` | 8-bit, bright, game-like: two pulses, a triangle, noise drums | 110-170 bpm; 4/4, 6/8 | joy, playful, drive, tension, mischief | fourFloor, bounce, shuffle, skip |
-| `lofi` | hazy, nostalgic, crackly: FM e-piano, vinyl, a lazy swung beat (the dusty cousin of lo-fi electronic) | 68-90 bpm; 4/4 | nostalgic, calm, wistful, sensual | bounce, halfTime, shuffle |
-| `orchestral` | big and heroic: brass theme, string ostinato engine, choir, timpani | 70-140 bpm; 4/4, 3/4, 6/8 | heroic, triumph, awe, tension, grief | epic, build, tension, pulse |
-| `suspense` | unsettling, cold, withheld: low drones, heartbeat pulse, high bowed harmonics, stingers | 50-110 bpm; 4/4, 5/4, 3/4 | tension, dread, eerie | pulse, tension, epic |
-| `rock` | live-band energy: driven guitars, bass locked to the kick, a tight kit, maybe organ | 90-160 bpm; 4/4, 6/8 | drive, anger, triumph, joy, heroic | rock, halfTime, shuffle, fourFloor |
-| `hipHop` | head-nod or dark trap: heavy 808, crisp clap, rolling hats, a moody loop on top | 70-100 bpm; 4/4 | drive, calm, nostalgic, sensual, anger, tension | trap, bounce, halfTime, broken |
-| `house` | euphoric, dancing, bright: four-on-the-floor, offbeat bass, stabs, a big pad | 118-128 bpm; 4/4 | joy, drive, sensual, hopeful | fourFloor, build, broken |
-| `synthwave` | neon-nostalgic, cinematic 80s: big gated snare, pulsing 8th bass, lush pads, a soaring lead | 80-118 bpm; 4/4 | nostalgic, drive, heroic, romantic, tension | fourFloor, halfTime, rock, build |
-| `world` | rooted, spacious, rhythmic: a drone, a modal melody on plucked strings or a flute, hand percussion cycles (write your own melody; name the tradition you draw on) | 60-150 bpm; 7/8, 9/8, 12/8, 6/8, 4/4, 5/4 | calm, joy, curious, mischief, awe, sensual | hand, pulse, brushes |
-| `choral` | vast, human, reverent: voices in parts, organ, bells, a slow swell | 50-90 bpm; 4/4, 3/4 | awe, grief, hopeful, tender, heroic | pulse |
-
-## Groove families
-
-Pick a family and its knobs (`density`, `variation`, `fill`, `accent`); the seed varies every bar. Or write the drum bars yourself.
-
-- `bounce`: lo-fi / hip-hop bounce: kick on 1 plus syncopated pickups, backbeat on 2 and 4, ghost notes, 8th or 16th hats with accents
-- `fourFloor`: house / drive: kick on every beat, clap on 2 and 4, off-beat open hats, 16ths when dense
-- `halfTime`: half-time: kick on 1 (and a pickup), snare on 3; the same tempo feels twice as slow (a breath, a scene change)
-- `broken`: broken beat / garage: kicks displaced off the grid, backbeat kept, ghosted 16ths; restless, modern
-- `shuffle`: shuffle: triplet grid, swung hats, kick on 1 and 3 with a skip; playful, bouncy
-- `pulse`: pulse: a soft heartbeat kick, no backbeat, sparse shaker; ambient and cinematic under-scoring
-- `brushes`: brushes: soft rim on 2 and 4, shaker swishes, a gentle kick; tender, acoustic
-- `build`: build: snare 8ths then 16ths rising in velocity across the section, kick on quarters; ends on the next downbeat
-- `tension`: tension: 3-3-2 kick ostinato, accent on 4, quiet 16th hats; cinematic urgency, chases
-- `skip`: skip: kick on 1 and the and-of-2, clap on 2 and 4, a skipping 16th perc; playful, light
-- `trap`: trap: sparse syncopated kicks (the 808 bass follows them), clap on 3, 16th hats with velocity ramps and bursts, an open hat now and then
-- `epic`: epic: big low hits (kick / timpani in perc) in a 3-3-2 or 1-and-3 figure, a snare accent on 4; orchestral and trailer weight
-- `hand`: hand percussion: dum (low) on each group start, tek (rim) inside, ka (perc) fills; groups follow the meter (7/8 = 2+2+3, 9/8 = 2+2+2+3, 5/4 = 3+2)
-- `rock`: rock: kick on 1 and 3 with an 8th pickup, snare backbeat, 8th hats, a crash (perc) on section starts
-- `swing`: jazz swing: ride on the beats and the swung skip of 2 and 4, foot hi-hat (perc) on 2 and 4, feathered kick, snare comping ghosts
-
-## Section kinds (the arrangement grammar)
-
-A kind decides which layers may sound; your lines sound only where you write them.
-
-- `intro` (drums: none, bass: no): chords (and any line you write) without drums or bass: set the colour, state the key
-- `verse` (drums: main, bass: yes): the groove under a lighter line: room for picture and words
-- `groove` (drums: main, bass: yes): chords, bass, drums: the bed, no lead unless you write one
-- `hook` (drums: main, bass: yes): full groove under the motif: the memorable part
-- `build` (drums: build, bass: yes): rising density (snare 8ths to 16ths), rising line, lands on the next downbeat
-- `half` (drums: half, bass: yes): half-time drums: the same tempo feels slower (a scene change, a breath with pulse)
-- `breakdown` (drums: none, bass: no): drums and bass out, chords and a thin line: the held breath before a landing
-- `drop` (drums: main, bass: yes): everything back on a strong chord: the landing, put it on the picture's key beat
-- `bridge` (drums: main, bass: yes): new harmony away from home (a borrowed or relative area) before the return
-- `swell` (drums: none, bass: yes): long notes crescendo over 2-8 bars (orchestral swell), peaks on the downbeat after
-- `breath` (drums: none, bass: no): near silence: one held chord or nothing, authored (max 2 bars)
-- `outro` (drums: none, bass: yes): home chord held, the motif's last word, then the tail
-
-## `lofiElectronic`: lo-fi electronic
-
-warm, chill but upbeat, clean: a breathing pad, a plucked hook through ping-pong echoes, a round sub, a bouncy kit. Tempo 80-100 bpm, meters 4/4, swing 0.52-0.56.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `warmPad` | -3 | -21 | strings (`strings`, -6 dB), piano (`piano`, -4 dB) |
-| lead | `softPluck` | 6 | -16.5 | bell (`fmBell`, 0 dB), mallet (`marimba`, 2 dB), guitar (`guitar`, 2 dB) |
-| counter | `softPluck` | 8 | -24 | - |
-| bass | `sub` | -6 | -18 | warm (`bass`, -2 dB) |
-| kick | `kick` | 0.5 | -14 | - |
-| snare | `snare` | 8 | -20 | - |
-| ghost | `snare` | 4 | - | - |
-| hat | `hat` | 20 | -28 | - |
-| arp | `softPluck` | 4 | - | - |
-| perc | `hat` | 14 | - | - |
-
-Stem targets: calibrated on a listened score.
-
-- **Harmony language.** Modes: major, dorian, lydian, aeolian, mixolydian. Qualities: 7ths, 9ths, 11ths and 13ths; add9; sus2/sus4 for air; avoid bare triads except on the landing. Tendencies: loops of 2, 4 or 8 bars; ii-V motion, IV-iii-vi drifts, modal vamps (i-IV in dorian, I-II in lydian), borrowed iv or bVII for a wistful turn; the home chord arrives on a structural beat. Harmonic rhythm: one chord per bar or two per bar; the change can anticipate the bar by an eighth. Voicing: rootless 3-4 note voicings between E3 and E4 moving by step (common tones held); the bass owns the root. Tension and release: sus4 and 13ths lean, maj7#11 floats, a dominant 7b9 or a borrowed iv aches; release by resolving the lean voice down a step.
-- **Melody.** Range C4-A5 for the lead, the octave above for counter lines. Contour: short arches; the high point in the second half of a phrase; answer phrases end lower. Density: 1-3 notes per beat; leave rests so the echo answers. Motif: a 2-5 note cell with its own rhythm; repeat it, then vary it (shift it up a step, invert the last interval, displace it by an eighth); call and response between lead and counter.
-- **Arrangement.** intro -> groove -> hook -> (half-time or breakdown) -> drop on home -> outro; add or remove one layer at a time. Transitions: a fill bar, a half-time bar, drums out for a breakdown, then everything back on a downbeat. Endings: home chord held with the motif's last note, or a clean button on 1.
-- **Grooves:** bounce, halfTime, broken, skip, pulse, build. **Avoid:** synth ePiano, vinyl crackle, bit-crush, a dark master low-pass: that is dusty lo-fi hip-hop, not clean electronic.
-
-## `drive`: driving electronic
-
-forward, bright, confident: four-on-the-floor, a pumping supersaw bed, a gritty bass line, a plucked arp. Tempo 110-140 bpm, meters 4/4, swing 0.5-0.52.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `strings` | -2.7 | -22 | - |
-| lead | `strings` | 5.4 | -16 | pluck (`softPluck`, 5 dB) |
-| counter | `fmBell` | 6 | -27.3 | - |
-| bass | `bass` | 0.1 | -16 | sub (`sub`, -5 dB) |
-| kick | `kick` | 2.5 | -12 | - |
-| snare | `snare` | 10.5 | -18 | - |
-| ghost | `snare` | -2 | - | - |
-| hat | `hat` | 12 | -26 | - |
-| arp | `softPluck` | 4.2 | -21 | - |
-| perc | `hat` | 18.3 | -27 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: aeolian, dorian, mixolydian, major. Qualities: triads and power voicings, sus2, add9; minor with a major IV (dorian) for lift. Tendencies: i-VI-III-VII, i-v-VI-IV, bVI-bVII-i climbs; long pedal tones under changing chords; a key lift of a step for the last chorus. Harmonic rhythm: one chord per bar or per two bars; stabs on off-beats. Voicing: wide: root-fifth-octave low, tight triads above C4; the bass line is 8ths or offbeat. Tension and release: a pedal under a moving chord, a build that withholds the kick, a riser into a drop; release on the downbeat with everything.
-- **Melody.** Range A3-E6. Contour: repeated cells climbing by step; big leaps at the drop. Density: 8ths and 16ths; arps in 3-note cells across 4/4 (hemiola). Motif: a rhythmic riff of 3-6 notes, repeated with the last note changed; sequence it up the scale in the build.
-- **Arrangement.** intro (filtered) -> build -> drop -> breakdown -> build -> bigger drop -> outro. Transitions: builds of 4-8 bars, a one-beat breath before the drop. Endings: a button on 1 or a filtered fade of the groove.
-- **Grooves:** fourFloor, broken, build, halfTime, tension. **Avoid:** swing, soft attacks on the lead, more than 4 layers in the breakdown.
-
-## `cinematic`: cinematic / orchestral
-
-wide and emotional: string swells, low ostinatos for tension, harp and bell colour, a low boom on the arrival. Tempo 60-120 bpm, meters 4/4, 3/4, 6/8, swing 0.5-0.5.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `strings` | 1.2 | -18 | - |
-| lead | `strings` | 4.5 | -17 | piano (`piano`, 0 dB), bell (`fmBell`, -4 dB), celesta (`celesta`, 0 dB) |
-| counter | `harp` | 12 | -36.7 | piano (`piano`, -3 dB) |
-| bass | `strings` | 1.3 | -19 | - |
-| arp | `strings` | 3.4 | -21 | - |
-| kick | `kick` | -2.4 | -16 | - |
-| snare | `snare` | -2 | -24 | - |
-| ghost | `snare` | -4 | - | - |
-| hat | `hat` | 6 | -32 | - |
-| perc | `fmBell` | -8 | - | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: aeolian, harmonicMinor, lydian, major, phrygian, dorian. Qualities: open fifths, add9, sus2/sus4, minor with a major IV; chromatic mediants (C to E, C to Ab) for awe. Tendencies: slow harmonic rhythm (1-2 bars per chord); i-bVI-bVII-i for epic, i-iv-V for drama, lydian II for wonder, a pedal bass under moving chords for tension; big arrivals on chromatic mediants. Harmonic rhythm: one chord per 1-2 bars; tension sections hold one chord over an ostinato. Voicing: spread wide: bass octaves below C3, open fifths, the melody doubled an octave on the climax (stagger the bass to keep peaks musical). Tension and release: minor seconds against a pedal, a b6 leaning to 5, suspended 4ths held long, harmonic minor's raised 7th; release to a major chord or a picardy third.
-- **Melody.** Range G3-C6 (strings), harp and bell above. Contour: long arcs over 4-8 bars, a big leap (6th, octave) then stepwise fall. Density: 0.5-2 notes per beat; tension ostinatos 2-4 per beat. Motif: a 3-4 note idea that returns transformed: augmented (slower) at the climax, in the bass for menace, in the harp for tenderness.
-- **Arrangement.** intro (a colour, a drone) -> theme -> swell/build -> climax on the key picture beat -> release -> quiet coda. Transitions: crescendo over 4-8 bars; a breath of silence before the arrival; a low boom on the downbeat. Endings: a held chord ringing into the tail, or a hard-out on the cut.
-- **Grooves:** pulse, tension, build, halfTime. **Avoid:** more than four families at once outside the climax; fast drums under a tender theme.
-
-## `ambient`: airy ambient
-
-floating, spacious, luminous: long pads, bells and plucks with space around them, a soft heartbeat at most. Tempo 50-80 bpm, meters 4/4, 3/4, swing 0.5-0.5.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `warmPad` | 1.5 | -19 | - |
-| lead | `fmBell` | 1.3 | -20 | pluck (`softPluck`, 5 dB), vibes (`vibes`, 0 dB) |
-| counter | `softPluck` | 6.8 | -25 | - |
-| bass | `sub` | -8.3 | -22 | - |
-| arp | `celesta` | -0.9 | -24 | - |
-| kick | `kick` | -6.4 | -20 | - |
-| ghost | `snare` | -6 | - | - |
-| hat | `hat` | 6 | -32 | - |
-| perc | `hat` | 4 | - | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: lydian, major, dorian, majorPentatonic, aeolian. Qualities: maj7, add9, maj7#11, sus2, quartal stacks (4ths). Tendencies: two-chord oscillations (I-II lydian, i-IV dorian), planing (the same shape moved by step), a pedal note held through changes. Harmonic rhythm: slow: one chord per 2-4 bars. Voicing: wide and open, high register, no thirds low; let voices ring. Tension and release: a #11 or a 9 against the root; release by the melody settling on the fifth or the root.
-- **Melody.** Range C5-C7 bells, pluck echoes above. Contour: sparse, falling phrases of 2-5 notes; rests as long as the notes. Density: 0.25-1 note per beat, but a motif at least every 8 bars (the ghost guard). Motif: a 3-note bell figure that returns, echoed by the pluck at a new register.
-- **Arrangement.** slow evolution: add one layer every 4-8 bars, take one away before the end. Transitions: crossfades; a pad change on a bar line. Endings: the motif once more, alone, into the tail.
-- **Grooves:** pulse, brushes. **Avoid:** formlessness: sustained pads with no onsets and no cadence (the ghost failure); run the guards.
-
-## `folk`: tender acoustic
-
-intimate and warm: fingerpicked guitar, soft piano, a harp or celesta line, brushes. Tempo 60-110 bpm, meters 6/8, 3/4, 4/4, swing 0.5-0.54.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `piano` | 7 | -33 | strings (`strings`, -8 dB) |
-| arp | `guitar` | 8 | -22.9 | - |
-| lead | `harp` | 14 | -18.8 | piano (`piano`, 0 dB), guitar (`guitar`, 2 dB), strings (`strings`, -2 dB) |
-| counter | `celesta` | 8.2 | -24 | - |
-| bass | `bass` | -4.4 | -21 | - |
-| kick | `kick` | -4.5 | -20 | - |
-| snare | `snare` | -6 | -26 | - |
-| ghost | `snare` | 3.4 | -28 | - |
-| hat | `hat` | 2 | -30 | - |
-| perc | `hat` | 14 | -35.8 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: major, mixolydian, dorian, majorPentatonic, aeolian. Qualities: triads, add9, sus2, slash chords with a walking bass (I - V/7 - vi). Tendencies: I-V/7-vi-IV descents, bVII-IV-I (mixolydian), plagal IV-I endings, a relative minor detour. Harmonic rhythm: one chord per bar in 6/8 or 3/4; two per bar in 4/4. Voicing: guitar-shaped: root-fifth-tenth, open strings ringing; piano in the middle, melody on top. Tension and release: a suspended 4th resolving, a IV minor (iv) borrowed for the ache; release plagal (IV-I).
-- **Melody.** Range D4-G5, singable (a 10th at most). Contour: stepwise with one leap per phrase, rising question, falling answer. Density: 1-2 notes per beat, a held note at each phrase end. Motif: a singable 4-bar phrase; the answer repeats its start and changes its end.
-- **Arrangement.** guitar alone -> + melody -> + piano and bass -> + counter line -> thin to guitar and melody for the end. Transitions: a pickup note into each phrase; a bar of guitar alone between verses. Endings: plagal cadence, a rolled final chord.
-- **Grooves:** brushes, pulse, shuffle. **Avoid:** four-on-the-floor, heavy drums, synth pads, fast arpeggios that bury the melody.
-
-## `playful`: playful / bouncy
-
-light, cheeky, springy: marimba and pizzicato-like plucks, a bouncy bass, a skipping kit. Tempo 100-150 bpm, meters 4/4, 6/8, swing 0.5-0.6.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| lead | `marimba` | 4.1 | -16 | chip (`pulse`, -4 dB), pluck (`softPluck`, 5 dB), bell (`fmBell`, -2 dB) |
-| chords | `vibes` | -4.3 | -22 | - |
-| arp | `harp` | 8 | -22.4 | - |
-| counter | `celesta` | 10 | -23 | - |
-| bass | `bass` | -1.6 | -18 | tuba (`sub`, -4 dB) |
-| kick | `kick` | 0.3 | -15 | - |
-| snare | `snare` | 8.1 | -21 | - |
-| ghost | `snare` | 0 | -26 | - |
-| hat | `hat` | 22.2 | -28 | - |
-| perc | `hat` | 19.7 | -29 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: major, mixolydian, majorPentatonic, lydian, blues. Qualities: triads and 6ths, dominant 7ths, chromatic passing chords (a diminished between I and ii). Tendencies: fast harmonic rhythm (2 chords a bar), I-vi-ii-V turnarounds, secondary dominants (V/V), a surprise bVI. Harmonic rhythm: two chords per bar, on-beat stabs. Voicing: close, mid-high; the bass bounces root-fifth (oom-pah) or walks. Tension and release: a chromatic approach note, a held dominant with a pause; release with a cheeky button.
-- **Melody.** Range C4-C7 (mallets love the top). Contour: leaps and staccato repeated notes; zig-zags; grace-note slides. Density: 2-4 notes per beat, with sudden rests (comic timing). Motif: a 3-note staccato cell with a leap; answer it lower, then sequence it.
-- **Arrangement.** short sections (4-8 bars), stop-time breaks, call and response between lead and counter. Transitions: a stop (all out for a beat), a drum fill, a key lift. Endings: a button: a short tutti hit on 1, sometimes after a comic pause.
-- **Grooves:** skip, shuffle, bounce, fourFloor. **Avoid:** long pads, slow tempo, minor-key sustained melodies.
-
-## `musicBox`: music box
-
-small, bright, clockwork, innocent; plucked and never sustained. Tempo 100-132 bpm, meters 12/8, 3/4, 6/8, swing 0.5-0.5.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| lead | `musicBox` | 3.5 | -16 | celesta (`celesta`, 0 dB), bell (`fmBell`, -4 dB) |
-| arp | `musicBox` | -6 | -26 | - |
-| bass | `musicBox` | -3 | -24 | - |
-| counter | `bell` | 0.3 | -22 | - |
-| chords | `celesta` | -5.3 | -27 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: major, lydian, dorian, aeolian, majorPentatonic. Qualities: triads and sus2; a minor music box is a real (and uncanny) sound. Tendencies: any functional progression you write; plagal and deceptive turns read well; a whole-step lift for the payoff. Harmonic rhythm: one chord per bar. Voicing: melody C5-C7, bass C3-G3, arpeggio figures in between (you choose the figure). Tension and release: an unresolved 4th or a borrowed iv; release on a clean tonic.
-- **Melody.** Range C5-C7. Contour: hooky, skipping. Density: more notes, never longer notes (no sustain). Motif: a 3-5 note hook with a distinctive rhythm; restate it, answer it.
-- **Arrangement.** melody -> +bass -> +arpeggio -> +octave sparkle -> bell on the final downbeat. Transitions: add a layer each phrase. Endings: a bell or a single plucked tonic.
-- **Grooves:** none. **Avoid:** sustained pads, long reverb tails, slow attacks (the ghost failure); see styles/music-box.md for the old recipe's numbers.
-
-## `nocturne`: nocturne / solo piano
-
-intimate, expressive, late-night: one piano, rubato, pedal. Tempo 50-76 bpm, meters 3/4, 6/8, 4/4, swing 0.5-0.5.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| lead | `piano` | 12 | -17 | - |
-| chords | `piano` | 12 | -30.3 | - |
-| bass | `piano` | 6.3 | -23 | - |
-| counter | `strings` | 2 | -30 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: major, aeolian, harmonicMinor, dorian. Qualities: triads, 7ths, secondary dominants, borrowed iv, Neapolitan for grief. Tendencies: descending bass lines, circle-of-fifths sequences, deceptive V-vi before the last cadence. Harmonic rhythm: one chord per bar, two at cadences. Voicing: left hand broken chords spanning a 10th, no close thirds below C3. Tension and release: suspensions (4-3, 9-8), appoggiaturas on strong beats.
-- **Melody.** Range C4-C6. Contour: arch per phrase, peak about 2/3 through. Density: 0.5-2 notes per beat. Motif: a leap then stepwise return; transform it (octave up, in the bass) at the climax.
-- **Arrangement.** intro -> theme (question, answer) -> build -> hush -> coda. Transitions: a breath (caesura) before a sudden hush. Endings: a rolled tonic into the pedal.
-- **Grooves:** none. **Avoid:** octaves in both hands on one downbeat (peaks); a compressor.
-
-## `minimalist`: minimalist / pulse
-
-hypnotic, curious, clean: interlocking ostinatos that change slowly. Tempo 96-144 bpm, meters 4/4, 12/8, 5/4, 7/8, swing 0.5-0.5.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| arp | `marimba` | -0.5 | -20 | piano (`piano`, -4 dB), pluck (`softPluck`, 3 dB) |
-| lead | `marimba` | 3.1 | -17 | - |
-| bass | `marimba` | -4.9 | -21 | - |
-| counter | `vibes` | 3.7 | -27 | - |
-| chords | `piano` | 4 | -37.1 | - |
-| kick | `kick` | -6 | - | - |
-| ghost | `snare` | -6 | - | - |
-| perc | `hat` | 0 | - | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: dorian, lydian, aeolian, major, mixolydian. Qualities: open 5ths, add9, quartal stacks. Tendencies: a two-chord cycle for 8-16 bars, then one note changes. Harmonic rhythm: slow; the ostinato is the rhythm. Voicing: mid-register, interlocking; no doubled roots. Tension and release: phase shifts, added beats, a new bass note under the same pattern.
-- **Melody.** Range C4-C6. Contour: cells, not tunes. Density: 2-4 onsets per beat in the ostinato. Motif: a 5-8 note cell; change ONE thing every 8-16 bars (add, drop, rotate).
-- **Arrangement.** additive: one layer at a time. Transitions: a change at least every 16 bars. Endings: subtractive, or a hard stop.
-- **Grooves:** pulse. **Avoid:** a big climax; a change more often than every 4 bars.
-
-## `jazz`: jazz / swing
-
-loose, warm, clever: swing ride, walking bass, comping piano. Tempo 80-200 bpm, meters 4/4, 3/4, swing 0.6-0.67.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `piano` | 8 | -32.5 | - |
-| lead | `vibes` | 3.8 | -16 | piano (`piano`, 0 dB), clarinet (`woodwind`, 0 dB), flute (`woodwind`, 0 dB), brass (`brass`, -3 dB) |
-| bass | `bass` | -1.3 | -18 | - |
-| counter | `woodwind` | 8.5 | -21 | - |
-| kick | `kick` | -0.2 | -24 | - |
-| snare | `snare` | 0 | -26 | - |
-| ghost | `snare` | 7.5 | -28 | - |
-| hat | `hat` | 21 | -26 | - |
-| perc | `hat` | 18 | -30 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: major, dorian, mixolydian, melodicMinor, blues. Qualities: 7ths required; 9ths, 13ths, altered dominants (7b9, 7#11). Tendencies: ii-V-I, iii-VI-ii-V turnarounds, tritone substitutions, backdoor bVII7-I. Harmonic rhythm: two chords a bar at turnarounds. Voicing: rootless shell voicings (3-7, 7-3) in the middle; the walking bass owns roots. Tension and release: altered dominants, chromatic approach chords; release on a 6/9 or maj7.
-- **Melody.** Range A3-C6. Contour: bebop lines: chord tones on beats, approach notes between. Density: swung 8ths with rests. Motif: a riff restated over changing chords (the chords change under it).
-- **Arrangement.** head (theme) -> solos -> head out. Transitions: a 2-bar break, trading 4s. Endings: a tag (the last 2 bars three times) or a ritard on a 6/9.
-- **Grooves:** swing, brushes, shuffle. **Avoid:** straight 8ths, triads only.
-
-## `lullaby`: lullaby
-
-soft, rocking, safe. Tempo 56-78 bpm, meters 3/4, 6/8, swing 0.5-0.5.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| lead | `celesta` | 5.3 | -17 | musicBox (`musicBox`, 0 dB), piano (`piano`, 0 dB), flute (`woodwind`, -2 dB) |
-| arp | `harp` | 4 | -28.3 | - |
-| bass | `harp` | 6 | -26 | - |
-| counter | `musicBox` | 4 | -31.7 | - |
-| chords | `strings` | -8.5 | -28 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: major, majorPentatonic, mixolydian. Qualities: triads, add9, sus2. Tendencies: I-IV-I rocking, plagal cadences, a gentle ii. Harmonic rhythm: one chord per bar. Voicing: close, mid-high. Tension and release: almost none; a minor lullaby is flagged for the human check (tips into eerie).
-- **Melody.** Range C4-C6. Contour: rocking stepwise, falling phrase ends. Density: 1-2 notes per beat. Motif: a 2-bar rocking figure repeated with a changed ending.
-- **Arrangement.** melody + gentle arpeggio, nothing percussive. Transitions: none needed. Endings: the tonic, soft, rolled.
-- **Grooves:** none. **Avoid:** drums, surprise, bright highs.
-
-## `chiptune`: chiptune
-
-8-bit, bright, game-like: two pulses, a triangle, noise drums. Tempo 110-170 bpm, meters 4/4, 6/8, swing 0.5-0.56.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| lead | `pulse` | 7.4 | -16 | square (`pulse`, -2 dB) |
-| arp | `pulse` | 7 | -23.1 | - |
-| bass | `triangle` | 0.2 | -18 | - |
-| kick | `noiseDrum` | 7.6 | -18 | - |
-| snare | `noiseDrum` | 6.7 | -20 | - |
-| hat | `noiseDrum` | -10 | -28 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: major, aeolian, dorian, mixolydian. Qualities: triads; chords are faked by fast arpeggios. Tendencies: I-vi-IV-V, i-bVI-bVII, key changes up a step. Harmonic rhythm: one chord per bar. Voicing: arpeggio 16ths across an octave. Tension and release: a held dominant arpeggio, a pitch-bend-free chromatic climb.
-- **Melody.** Range C4-C7. Contour: hooky, leaping. Density: 8ths and 16ths. Motif: a 1-bar hook, answered, sequenced.
-- **Arrangement.** 4 voices max: lead, arp, triangle bass, noise. Transitions: a drum fill, a key change. Endings: a fanfare button.
-- **Grooves:** fourFloor, bounce, shuffle, skip. **Avoid:** reverb, more than 4 voices, pads.
-
-## `lofi`: dusty lo-fi hip-hop
-
-hazy, nostalgic, crackly: FM e-piano, vinyl, a lazy swung beat (the dusty cousin of lo-fi electronic). Tempo 68-90 bpm, meters 4/4, swing 0.55-0.62.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `ePiano` | 5.2 | -20 | - |
-| lead | `ePiano` | 7.5 | -17 | guitar (`guitar`, 2 dB), flute (`woodwind`, -2 dB) |
-| bass | `bass` | -2.1 | -19 | - |
-| counter | `fmBell` | 4 | -30.1 | - |
-| kick | `kick` | -2.6 | -17 | - |
-| snare | `snare` | 6.2 | -22 | - |
-| ghost | `snare` | 6 | -27.1 | - |
-| hat | `hat` | 4 | -43 | - |
-| perc | `hat` | 4 | -29 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: major, dorian, aeolian. Qualities: maj9, m9, 13, m11. Tendencies: 2-4 chord loops, ii-V drifts. Harmonic rhythm: 1-2 chords a bar. Voicing: e-piano 4-note voicings. Tension and release: a borrowed iv.
-- **Melody.** Range C4-C6. Contour: lazy, behind the beat. Density: sparse. Motif: a 2-bar sampled-sounding phrase.
-- **Arrangement.** 4 or 8 bar loop with variations. Transitions: a filter or a drop-out. Endings: fade or tape stop.
-- **Grooves:** bounce, halfTime, shuffle. **Avoid:** using it when the brief says clean or upbeat (then use lofiElectronic).
-
-## `orchestral`: orchestral / epic
-
-big and heroic: brass theme, string ostinato engine, choir, timpani. Tempo 70-140 bpm, meters 4/4, 3/4, 6/8, swing 0.5-0.5.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| lead | `brass` | 9.2 | -16 | strings (`strings`, 0 dB), horn (`brass`, -2 dB), flute (`woodwind`, -2 dB) |
-| chords | `strings` | -0.4 | -19 | - |
-| arp | `strings` | 4.4 | -20 | - |
-| bass | `strings` | 0.9 | -19 | - |
-| counter | `choir` | -1.7 | -22 | flute (`woodwind`, -3 dB), harp (`harp`, 0 dB) |
-| perc | `timpani` | 4.2 | -17 | - |
-| kick | `kick` | -3.3 | -17 | - |
-| snare | `snare` | 5.2 | -24 | - |
-| hat | `hat` | 4 | -32 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: major, aeolian, dorian, mixolydian, harmonicMinor. Qualities: triads and power 5ths, sus4 resolving, major IV in minor. Tendencies: i-bVI-bIII-bVII, I-bVII-IV-I (mixolydian heroism), chromatic mediants for arrivals, a pedal under the build. Harmonic rhythm: one chord per 1-2 bars, faster into cadences. Voicing: brass in the middle in 3rds and 5ths, strings octaves above, bass in octaves. Tension and release: a long dominant pedal with the ostinato rising, sus4 held; release to the tonic major with everything.
-- **Melody.** Range brass G3-C5 (heroic), strings up to A6. Contour: a rising 4th or 5th then steps; big arcs. Density: long notes over a busy ostinato. Motif: a fanfare cell (rising 4th/5th + rhythm) developed: fragment it in the build, augment it at the climax.
-- **Arrangement.** intro (ostinato alone) -> theme (strings) -> theme (brass) -> build -> tutti climax -> quiet coda. Transitions: timpani roll or snare build into downbeats; a bar of silence before the last statement. Endings: a big held chord with timpani, or a hard cut.
-- **Grooves:** epic, build, tension, pulse. **Avoid:** all families at once all the time; a brass lead above C6.
-
-## `suspense`: suspense / horror
-
-unsettling, cold, withheld: low drones, heartbeat pulse, high bowed harmonics, stingers. Tempo 50-110 bpm, meters 4/4, 5/4, 3/4, swing 0.5-0.5.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `strings` | -0.8 | -21 | - |
-| bass | `sub` | -6.1 | -20 | - |
-| lead | `bowedSolo` | 7.3 | -19 | choir (`choir`, -2 dB), cello (`bowedSolo`, 0 dB) |
-| counter | `celesta` | 8 | -27 | choir (`choir`, -4 dB), bell (`fmBell`, -8 dB) |
-| arp | `strings` | 2.7 | -22 | - |
-| kick | `kick` | -3.4 | -17 | - |
-| ghost | `snare` | -4 | -27 | - |
-| perc | `timpani` | 8.4 | -18 | - |
-| hat | `hat` | 0 | -32 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: phrygian, locrian, harmonicMinor, wholeTone, aeolian. Qualities: clusters, minor 2nds, tritones, minor-major 7th, augmented triads. Tendencies: a pedal that never resolves, chromatic crawl up or down by semitone, i-bII (phrygian), sudden major chord a tritone away. Harmonic rhythm: static: one sound for 4-8 bars, then a jolt. Voicing: very low and very high with an empty middle. Tension and release: withhold resolution; a stinger (all voices, one hit) on the scare; silence right before it.
-- **Melody.** Range extremes: below C3 or above C6. Contour: a 2-3 note cell, often a semitone. Density: sparse, irregular. Motif: a semitone sigh or a tritone leap, repeated slower each time.
-- **Arrangement.** drone -> pulse enters -> rising ostinato -> stinger on the hit -> silence -> aftermath drone. Transitions: cut to silence; a slow crescendo that stops short. Endings: unresolved: a held cluster, or a single low hit.
-- **Grooves:** pulse, tension, epic. **Avoid:** a major cadence, melody in the middle register, busy drums.
-
-## `rock`: rock / band
-
-live-band energy: driven guitars, bass locked to the kick, a tight kit, maybe organ. Tempo 90-160 bpm, meters 4/4, 6/8, swing 0.5-0.52.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `strings` | -0.9 | -19 | organ (`organ`, -4 dB), piano (`piano`, -3 dB) |
-| lead | `leadSynth` | 9.9 | -16 | guitar (`guitar`, 2 dB) |
-| bass | `bass` | -0.8 | -17 | - |
-| counter | `organ` | 6 | -30.4 | - |
-| kick | `kick` | 1.2 | -13 | - |
-| snare | `snare` | 11.2 | -17 | - |
-| ghost | `snare` | 0 | -26 | - |
-| hat | `hat` | 20.6 | -27 | - |
-| perc | `hat` | 17 | -26 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: mixolydian, aeolian, major, blues, dorian. Qualities: power chords (root-5th-octave), triads, sus4. Tendencies: I-bVII-IV, i-bVI-bVII, riffs on the pentatonic, a chorus a 4th up. Harmonic rhythm: one chord per bar in verses, two in choruses. Voicing: power chords low (E2-E4), the bass doubling the root in 8ths. Tension and release: a riff held on the V, a stop before the chorus.
-- **Melody.** Range E3-A5. Contour: riff-based, pentatonic, strong beats. Density: 8ths. Motif: a 1-2 bar riff that IS the song; the vocal-like lead answers it.
-- **Arrangement.** riff intro -> verse -> pre -> chorus -> verse -> chorus -> bridge -> chorus x2. Transitions: a drum fill and a crash into every section. Endings: a big held last chord with a fill, or a stop on 1.
-- **Grooves:** rock, halfTime, shuffle, fourFloor. **Avoid:** swing, soft attacks, long pads; the guitar tone here is an approximation: say so.
-
-## `hipHop`: hip-hop / trap
-
-head-nod or dark trap: heavy 808, crisp clap, rolling hats, a moody loop on top. Tempo 70-100 bpm, meters 4/4, swing 0.52-0.6.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| bass | `sub` | -2.5 | -15 | - |
-| chords | `piano` | 6 | -36.8 | pad (`warmPad`, -3 dB) |
-| lead | `softPluck` | 2.7 | -18 | bell (`fmBell`, -2 dB), flute (`woodwind`, -2 dB), choir (`choir`, -4 dB) |
-| counter | `strings` | 4 | -29.2 | - |
-| kick | `kick` | 1.4 | -13 | - |
-| snare | `snare` | 10.2 | -18 | - |
-| ghost | `snare` | 0 | -26 | - |
-| hat | `hat` | 23.6 | -26 | - |
-| perc | `hat` | 19.9 | -29 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: aeolian, phrygian, harmonicMinor, dorian. Qualities: minor triads, m7, dim, a single dark chord for 2 bars. Tendencies: 2-chord minor loops, i-bVI, i-bII (phrygian menace), a melody over one chord. Harmonic rhythm: one chord per 1-2 bars. Voicing: piano or bells high, the 808 low with nothing between. Tension and release: the 808 sliding or dropping out; a switch-up after 8 bars.
-- **Melody.** Range C4-C6. Contour: short repeated figures. Density: sparse over busy hats. Motif: a 1-2 bar loop that repeats (the loop is the hook); vary it every 8 bars.
-- **Arrangement.** intro (loop alone) -> 8-bar blocks with drops, switch-ups -> outro loop. Transitions: drop the drums for a bar, a hat roll into the downbeat. Endings: the loop alone, or a cut.
-- **Grooves:** trap, bounce, halfTime, broken. **Avoid:** an 808 that owns everything below 150 Hz with no harmonics (phones): check stems.
-
-## `house`: house / EDM
-
-euphoric, dancing, bright: four-on-the-floor, offbeat bass, stabs, a big pad. Tempo 118-128 bpm, meters 4/4, swing 0.5-0.54.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `organ` | 5.2 | -21 | pad (`warmPad`, -3 dB), piano (`piano`, -3 dB) |
-| bass | `bass` | 0.3 | -16 | - |
-| lead | `softPluck` | 4.3 | -17 | synth (`leadSynth`, -2 dB) |
-| counter | `warmPad` | 6.9 | -23 | - |
-| arp | `softPluck` | 4.5 | -22 | - |
-| kick | `kick` | 2.6 | -12 | - |
-| snare | `snare` | 10.7 | -18 | - |
-| ghost | `snare` | 1 | -26 | - |
-| hat | `hat` | 12 | -26 | - |
-| perc | `hat` | 18.3 | -27 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: aeolian, dorian, major, mixolydian. Qualities: m7, m9, maj7 stabs; piano house triads. Tendencies: i-VI-III-VII, vi-IV-I-V, 2-chord dorian vamps; a long pedal in the build. Harmonic rhythm: one chord per bar or per 2 bars; stabs on offbeats. Voicing: stabs mid-register, the bass on the offbeat 8th. Tension and release: filter build + snare build + one beat of silence; release = the drop.
-- **Melody.** Range C4-C6. Contour: repetitive riffs. Density: 8ths and 16ths. Motif: a 1-bar riff repeated 4-8 times with one change.
-- **Arrangement.** intro (kick + hats) -> groove -> breakdown (pad + motif) -> build -> drop -> outro (kick). Transitions: 16- or 32-bar blocks; builds of 8. Endings: DJ-friendly: strip back to kick and hats.
-- **Grooves:** fourFloor, build, broken. **Avoid:** swing, busy harmony, a quiet drop.
-
-## `synthwave`: synthwave / retro
-
-neon-nostalgic, cinematic 80s: big gated snare, pulsing 8th bass, lush pads, a soaring lead. Tempo 80-118 bpm, meters 4/4, swing 0.5-0.5.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `strings` | -2.1 | -21 | pad (`warmPad`, -2 dB) |
-| bass | `bass` | -0.3 | -17 | - |
-| lead | `leadSynth` | 11.7 | -16 | brass (`brass`, -2 dB) |
-| arp | `softPluck` | 4.1 | -22 | - |
-| counter | `fmBell` | 4 | -29.1 | - |
-| kick | `kick` | 1.4 | -13 | - |
-| snare | `snare` | 11.7 | -17 | - |
-| ghost | `snare` | 0 | -26 | - |
-| hat | `hat` | 12 | -28 | - |
-| perc | `hat` | 16.2 | -29 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: aeolian, dorian, major, lydian. Qualities: minor triads, add9, maj7, sus2. Tendencies: i-bVI-bIII-bVII, vi-IV-I-V, a lydian II for the neon lift. Harmonic rhythm: one chord per bar. Voicing: wide pads, bass in driving 8ths on the root. Tension and release: a long build on the V with the arp rising; release with the gated snare.
-- **Melody.** Range A3-E6. Contour: soaring, long notes with glide. Density: long lead notes over a busy arp. Motif: a 2-bar singable lead phrase, stated then lifted an octave.
-- **Arrangement.** pad intro -> bass + drums -> lead theme -> breakdown -> lead an octave up -> outro pad. Transitions: a tom-like fill (build), a drop-out bar. Endings: the pad alone, long tail.
-- **Grooves:** fourFloor, halfTime, rock, build. **Avoid:** trap hats, acoustic instruments, a dry mix.
-
-## `world`: world / modal folk
-
-rooted, spacious, rhythmic: a drone, a modal melody on plucked strings or a flute, hand percussion cycles (write your own melody; name the tradition you draw on). Tempo 60-150 bpm, meters 7/8, 9/8, 12/8, 6/8, 4/4, 5/4, swing 0.5-0.56.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| lead | `woodwind` | 8.7 | -16 | pluck (`guitar`, 2 dB), marimba (`marimba`, 1 dB), reed (`woodwind`, 0 dB), bowed (`bowedSolo`, 0 dB) |
-| counter | `harp` | 10 | -38.1 | - |
-| arp | `guitar` | 8 | -24.2 | - |
-| chords | `warmPad` | -3.1 | -25 | - |
-| bass | `sub` | -9.6 | -22 | - |
-| kick | `timpani` | 0.3 | -17 | - |
-| ghost | `snare` | 9.5 | -24 | - |
-| perc | `hat` | 8 | -28 | - |
-| hat | `hat` | 6 | -30 | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: dorian, phrygian, mixolydian, aeolian, majorPentatonic, minorPentatonic, harmonicMinor. Qualities: a drone (tonic + 5th) more than chords; modal colour chords sparingly. Tendencies: modal: stay on the tonic drone, move the melody through the mode; a second drone a step away for contrast. Harmonic rhythm: the percussion cycle carries it; harmony changes rarely. Voicing: open 5ths, the drone low and wide. Tension and release: the mode's colour note held against the drone; release on the tonic.
-- **Melody.** Range a 10th around the drone. Contour: ornamented steps (grace notes, turns), phrases that return to the drone note. Density: flowing 8ths and 16ths with long held notes. Motif: a modal phrase that grows by adding ornaments on repeats.
-- **Arrangement.** drone alone -> melody free -> percussion enters -> faster, denser -> return to the drone. Transitions: an accelerando, a percussion break. Endings: the melody alone on the tonic over the drone.
-- **Grooves:** hand, pulse, brushes. **Avoid:** copying a traditional melody; Western functional cadences everywhere.
-
-## `choral`: choral / sacred
-
-vast, human, reverent: voices in parts, organ, bells, a slow swell. Tempo 50-90 bpm, meters 4/4, 3/4, swing 0.5-0.5.
-
-| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |
-|---|---|---|---|---|
-| chords | `choir` | -9.9 | -19 | organ (`organ`, -4 dB), strings (`strings`, -4 dB) |
-| lead | `choir` | -3.1 | -17 | bowed (`bowedSolo`, 0 dB), flute (`woodwind`, -2 dB) |
-| bass | `organ` | 8 | -21 | - |
-| counter | `fmBell` | 4 | -30.5 | - |
-| arp | `harp` | 6 | -26.3 | - |
-| perc | `timpani` | 5.5 | -20 | - |
-| kick | `timpani` | -6 | - | - |
-
-Stem targets: starting numbers from a neutral test signal (advisory until a human listens).
-
-- **Harmony language.** Modes: major, aeolian, dorian, lydian. Qualities: triads in 4 parts, suspensions, the picardy third. Tendencies: chorale motion: I-IV-V-I, vi-IV-I-V, plagal amen (IV-I), deceptive V-vi before the final cadence. Harmonic rhythm: one chord per beat or per half bar (chorale), slower in swells. Voicing: SATB spacing: no gaps wider than an octave between upper voices, bass free; avoid parallel 5ths. Tension and release: 4-3 suspensions, a held dominant; release on a plagal amen.
-- **Melody.** Range C4-G5 (singable). Contour: stepwise, phrase-shaped like breath. Density: 1 note per beat or slower. Motif: a hymn-like phrase whose cadence changes each time.
-- **Arrangement.** a single voice -> full parts -> a swell -> a hush -> the final chord. Transitions: a fermata (breath) between phrases. Endings: a plagal amen or a picardy third, long tail.
-- **Grooves:** pulse. **Avoid:** fast rhythms, drums, choir as a lead above G5.
diff --git a/skills/anidoodle/references/workflows/launch-video-kit.md b/skills/anidoodle/references/workflows/launch-video-kit.md
index 76552b0..da62e37 100644
--- a/skills/anidoodle/references/workflows/launch-video-kit.md
+++ b/skills/anidoodle/references/workflows/launch-video-kit.md
@@ -3,9 +3,10 @@
The pieces anidoodle's own launch film is made of, in `engine/src/canvas-core/`, usable for any
product. The rules they serve are in `launch-video.md`.
-## Start from the template (16 s, one file)
+## Start from the template (16 s, 16:9, one file)
-`launchTemplate.ts` turns data into a film: two or three prompts answered by plates drawing
+`launchTemplate.ts` turns data into a film, 1920x1080 (16:9; square, 4:5 and 9:16 from the
+template are coming): two or three prompts answered by plates drawing
themselves in a chat thread, a type frame between them, and an end card with your install lines.
`launchExample.ts` is a complete one for a made-up product. Copy its shape, not its contents:
the plates and the score are the product's own, made for its brief.
@@ -14,7 +15,7 @@ the plates and the score are the product's own, made for its brief.
import { C } from "./launchKit";
import { makeLaunchFilm } from "./launchTemplate";
import { dashboardSketch, onboardingSketch } from "./myProductPlates"; // drawn for YOUR subject
-import { myProductScore } from "./myProductScore"; // composed for YOUR brief
+import { myProductScore } from "./myProductScore"; // a Piece written for YOUR brief
export const myLaunch = makeLaunchFilm({
title: "Your Product", subtitle: "the one line it lives by",
@@ -25,7 +26,7 @@ export const myLaunch = makeLaunchFilm({
words: [[{ text: "IDEA IN.", style: "ink", color: C.ink }, { text: "ART OUT.", style: "ink", color: C.accent }]],
tagline: "One sentence that says what it is",
install: ["npm install your-product", "your-product init"],
- bpm: 96, // the tempo of the score you composed; the brief sets it, there is no default
+ bpm: 96, // the tempo of the score you wrote; the brief sets it, there is no default
askBeats: 6, typeBeats: 4, endBeats: 8, claimBar: 4,
score: myProductScore, // or null for a silent film
});
@@ -48,10 +49,10 @@ answers and scrolling, a gentle lean onto each new card, full-frame word pages b
and the end card blooming open and holding. The corner mark (your name, hand-lettered) steps
aside before any lean. Real holds are declared, so the gate passes. Sync wins over length: the
score plays at the film's bpm exactly, so every cut sits on its downbeats, and the film is made
-whole bars of the score (`gridScore`: the stretch section repeated or dropped, then the end-card
-hold, which is a hold, grows or shrinks to the bar; the tail rings out in whole bars). A score in
-4/4 with no pickup, starting on frame 0. If no form fits, the build throws: compose a 1-bar
-stretch section or change askBeats/endBeats. Render refuses a beat-grid film whose score is more
+whole bars of the score (`gridScore`: the end-card hold, which is a hold, grows or shrinks to the
+bar; the tail rings out in whole bars). A score in 4/4 with no pickup, starting on frame 0. If it
+does not fit, the build throws and names the score lengths in bars that would, or change
+askBeats/endBeats/claimBar. Render refuses a beat-grid film whose score is more
than 0.5 % off its bpm. The bed is set to -14 LUFS with the true peak at or under -1 dBTP
(`musicBed`); a dynamic piece stops at the peak ceiling first and render says how far short;
`limit: true` lets a look-ahead limiter take those peaks instead.
@@ -60,7 +61,7 @@ than 0.5 % off its bpm. The bed is set to -14 LUFS with the true peak at or unde
to the user's subject (`references/styles.md`): draw their dashboard, their mascot, their
product's world in the chosen hand, as a still plus its `*Draw` film. anidoodle's own plates
(the lighthouse and fox in `launchExample.ts`) are placeholders, never a user's film. The score
-is composed for the brief's style, mood and length (`references/music/compose.md`); `score` is
+is written for the brief's style, mood and length (`references/music/README.md`); `score` is
required (`null` means silent), `bpm` has no default, and the template refuses anidoodle's own
pieces, by identity, by title and by content (the same novelty gate `music.mjs check` runs).
@@ -72,12 +73,17 @@ pieces, by identity, by title and by content (the same novelty gate `music.mjs c
| `tagline`, `install[]`, `footer` | the end card; install lines are shown exactly as given |
| `bpm` (required), `fps`, `askBeats`, `typeBeats`, `endBeats` | the beat grid (a beat is 60 x fps / bpm frames) and each part's length in beats |
| `claimBar` | land the end card on this bar's downbeat, counting from bar 0 (`claimBar: 4` = frame 4 x bar); throws if it cannot. A longer last ask is really longer, never slowed |
-| `score` (required) or `audio` | the score composed for this product (the `Material` function compose.md writes, or a `Piece`), as a bed; `null` for silence; or your own finished mix (not checked) |
+| `score` (required) or `audio` | the score written for this product (a function returning a `Piece`), as a bed; `null` for silence; or your own finished mix (not checked) |
The template refuses a feature list (more than 3 asks) and an end card too short to read.
## The parts, for a film of your own shape
+A film built from the parts can be any size today: set its `meta.W` and `meta.H` (1080x1920 for
+9:16) and pass the same `W` and `H` to `bloomFrame` and `typeFrame`, which default to 1920x1080.
+`writeOn` and `useCam` follow the film's frame. `drawChatFrame` and the template's layout are
+drawn for 1920x1080, so frame them with the camera; never crop a wide render.
+
**`launchKit.ts`**: timing and UI.
- Easing: `ramp`, `inOut`, `out3`, `in3`, `expo`, a closed-form `spring`, `press` (a button
press that dips and springs back). Camera: `Cam`, `camLerp` (zoom travels in log space),
diff --git a/skills/anidoodle/references/workflows/launch-video.md b/skills/anidoodle/references/workflows/launch-video.md
index 42bb1e1..a2679ec 100644
--- a/skills/anidoodle/references/workflows/launch-video.md
+++ b/skills/anidoodle/references/workflows/launch-video.md
@@ -32,7 +32,7 @@ that invents its subject draws a mascot of a product, not the product.
## Made for this product, every frame and every note
The film's pictures are drawn for this product's subject in the style recipe the brief picked
-(`references/styles.md`); its score is composed for this brief. anidoodle's own plates and
+(`references/styles.md`); its score is written for this brief. anidoodle's own plates and
pieces are examples of the craft, never material for someone else's film.
## The story
@@ -84,10 +84,9 @@ pieces are examples of the craft, never material for someone else's film.
## Sound
- **Music first, heard as an mp3 by a human** before it scores anything (you cannot hear it).
- Compose it for THIS brand: pick the style and a mood per section from the brief (energy,
- audience, where it runs), then write the notes (`references/music/compose.md`). anidoodle's own
- launch chose chill lo-fi electronic, one example (`references/music/styles/lofi-electronic.md`);
- never reuse our score or a stock piece.
+ Write it for THIS brand: pick the style and a mood per section from the brief (energy,
+ audience, where it runs), then write the notes (`references/music/README.md`); `music.mjs check`
+ must pass. Never reuse our score or a stock piece.
- **Balance by stem RMS, not only LUFS**: an integrated -14 LUFS hid a sub 7-10 dB too hot.
- **Cut on downbeats, not every beat.** Land the claim on a chord (launch3's lands on bar 26,
the home chord); `beatGrid().solve()` fits a flexible segment so it does.
@@ -101,7 +100,9 @@ pieces are examples of the craft, never material for someone else's film.
a platform version rather than pushing one master everywhere. Cut whole beats; never speed
the whole film up (it breaks the beat grid and reads rushed).
- **Shapes**: `16x9` for YouTube and the site, `1x1` or `4x5` for feeds, `9x16` for Reels and
- Shorts. Reframe per shape from one timeline; never crop a wide render.
+ Shorts. Reframe per shape; never crop a wide render. The template renders 16:9 today, and the
+ other shapes from it are coming. A film built from the parts can target any size now: set
+ `meta.W`/`meta.H` and lay it out for that frame (`launch-video-kit.md`).
- **The first frame is the thumbnail.** Platforms and players show frame 1 before play. Make
it legible and on brand (anidoodle's is the wall of styles; the template's is the prompt, big,
mid-sentence); never a blank, a fade from black, or a whole chat window too small to read.