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.

music docs: calibrate --voices and the thread/timing switches in the tool header; mood.md: loops are not asked for a tension arc

Alex Greenshpun57634ef0000f
diff --git a/skills/anidoodle/engine/tools/music-unit.mjs b/skills/anidoodle/engine/tools/music-unit.mjs
index d6a1557..2ec2ab8 100644
--- a/skills/anidoodle/engine/tools/music-unit.mjs
+++ b/skills/anidoodle/engine/tools/music-unit.mjs
@@ -214,7 +214,7 @@ for (const secs of [70, 90, 110]) {
{ const p = M.composePiece(M.testMaterial(M.VOCAB.lofiElectronic, { bars: 4 })), r = M.renderPiece(p, SR, { stems: true }), bpb = M.beatsPerBar(p.plan.meter), at = Math.round(r.perf.sec(2 * bpb + 1) * SR);
r.L[at] = 1.5; r.stems.lead[0][at] = 1.5; const pk = M.peakReport(r, SR);
assert.equal(pk.bar, 3); assert.equal(pk.beat, 2); assert.equal(pk.parts[0].id, "lead"); assert(pk.parts[0].notes.length > 0);
- pass(`peak report: bar ${pk.bar} beat ${pk.beat}, ${pk.parts.map((x) => `${x.id} ${x.notes.join(" ")}`).join(", ")}`); }
+ pass(`peak report: bar ${pk.bar} beat ${pk.beat}, ${pk.parts.map((x) => `${x.id}${x.notes.length ? ` ${x.notes.join(" ")}` : ""}`).join(", ")}`); }
{ const { spawnSync } = await import("node:child_process"), { mkdirSync, writeFileSync, readFileSync, existsSync, readdirSync, rmSync } = await import("node:fs");
const dir = join(import.meta.dirname, "../out/music-unit"); rmSync(dir, { recursive: true, force: true }); mkdirSync(dir, { recursive: true });
writeFileSync(join(dir, "x.wav"), "keep me");
diff --git a/skills/anidoodle/engine/tools/music.mjs b/skills/anidoodle/engine/tools/music.mjs
index 75d30e4..618aa5e 100644
--- a/skills/anidoodle/engine/tools/music.mjs
+++ b/skills/anidoodle/engine/tools/music.mjs
@@ -21,6 +21,8 @@
// node tools/music.mjs samples <outdir> # the whole deliverable set + meters.json + .m4a
// node tools/music.mjs score <piece> # the text score, bar by bar
// node tools/music.mjs probe # piano realism probes
+// node tools/music.mjs calibrate [--voices] # palette trims (vocabTrim.ts); --voices: alternates' trims and your own voices' levels (vocabVoices.ts)
+// (check/render run voices on all but one core; ANIDOODLE_THREADS=1 renders serially, ANIDOODLE_TIMING=1 prints check's stage times)
import { build } from "esbuild";
import { execFileSync } from "node:child_process";
import { writeFileSync, readFileSync, existsSync, mkdirSync, unlinkSync } from "node:fs";
diff --git a/skills/anidoodle/references/music/theory/mood.md b/skills/anidoodle/references/music/theory/mood.md
index 3f8a14c..2bbf9d9 100644
--- a/skills/anidoodle/references/music/theory/mood.md
+++ b/skills/anidoodle/references/music/theory/mood.md
@@ -69,7 +69,7 @@ because the family is the emotional cue and the exact mode is colour.
|---|---|---|---|
| Product launch film | 30-60 s | intro, build, drop on the reveal, button | one motif, the climax on the logo or claim, a clean ending |
| Explainer | 60-120 s | a steady groove bed, low melody density | leave the voice's band free (1-4 kHz): lead sparse and low-mid |
-| Site / app loop | 20-60 s | 4 or 8 bar loop, no cadence home at the end | low arousal, no sharp accents, seamless |
+| Site / app loop | 20-60 s | 4 or 8 bar loop, no cadence home at the end | low arousal, no sharp accents, seamless (`craft` does not ask a loop for a tension arc) |
| Game menu / trailer | 15-60 s | ostinato + motif, stingers on hits | heroic or playful, strong hook in 2 bars |
| Ad (15-30 s) | 15-30 s | hook in the first 2-4 s, button ending | high arousal, bright, the brand beat on the last downbeat |
| Meditation / sleep | 45 s+ | drone + sparse motif, slow harmonic rhythm | 50-70 bpm, legato, no percussion, open ending allowed |