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.

chore: resync Codex mirror

Alex Greenshpunf92f112855ac
diff --git a/plugins/anidoodle/skills/anidoodle/engine/src/canvas-core/music/pieces/families.ts b/plugins/anidoodle/skills/anidoodle/engine/src/canvas-core/music/pieces/families.ts
index 81487fc..f3d1c5a 100644
--- a/plugins/anidoodle/skills/anidoodle/engine/src/canvas-core/music/pieces/families.ts
+++ b/plugins/anidoodle/skills/anidoodle/engine/src/canvas-core/music/pieces/families.ts
@@ -54,7 +54,7 @@ export const guitarWistful = (): Piece => {
/** Celesta, WONDER (curious + awe). F lydian: the B natural of the G/F chord is the magic. 3/4 at 72. */
export const celestaWonder = (): Piece => {
const B = 3;
- const acc = L(0, "F3:1 [A4 C5]:1 [A4 C5]:1 | F3:1 [G4 B4 D5]:1 [G4 B4 D5]:1 | [F3 C4 A4]:3", "accomp", B, 0.5, { roll: 0.02 });
+ const acc = L(0, "F4:1 [A4 C5]:1 [A4 C5]:1 | F4:1 [G4 B4 D5]:1 [G4 B4 D5]:1 | [F4 A4 C5]:3", "accomp", B, 0.5, { roll: 0.02 });
const mel = L(0, "C6:.5 A5:.5 F5:.5 A5:.5 C6:.5 E6:.5 | D6:1 B5:1 A5:.5 G5:.5 | A5:3", "melody", B, 0.8);
return {
title: "Celesta, wonder (F lydian)", seed: 9, tail: 2.4, harmony: H([[0, "F"], [3, "G/F"], [6, "F"]]),
diff --git a/plugins/anidoodle/skills/anidoodle/engine/test/craft.test.ts b/plugins/anidoodle/skills/anidoodle/engine/test/craft.test.ts
index 8c13848..0ef6db9 100644
--- a/plugins/anidoodle/skills/anidoodle/engine/test/craft.test.ts
+++ b/plugins/anidoodle/skills/anidoodle/engine/test/craft.test.ts
@@ -4,6 +4,11 @@ import { craftReport, contourClass, classifyCadence, syncopation, metricWeight,
import { line, type Piece, type Part, type Role, type InstId, type Meter, type Note } from "../src/canvas-core/music/plan";
import type { StyleId, MoodId } from "../src/canvas-core/music/tables";
import type { ModeId } from "../src/canvas-core/music/theory";
+import { DEMOS, FIXTURES, composePiece } from "../src/canvas-core/music/index";
+import { breach } from "../src/canvas-core/music/blind/breach";
+import { stillwater } from "../src/canvas-core/music/blind/stillwater";
+import { morningCrumb } from "../src/canvas-core/music/blind/morningCrumb";
+import { skywardKids } from "../src/canvas-core/music/blind/skywardKids";
type P = { id: string; inst: InstId; role: Role; src: string };
const piece = (o: { style?: StyleId; mood?: MoodId; key?: string; mode?: ModeId; meter?: Meter; tempo?: number; bars: number; parts: P[]; harmony?: [number, string][]; sections?: [string, number][]; loop?: boolean }): Piece => {
@@ -130,4 +135,12 @@ export const run = (ok: (cond: boolean, label: string) => void) => {
// ---------------- only real errors are errors
ok(craftReport(leapy).findings.every((f) => f.level !== "error"), "craft never errors on taste: only impossible ranges are errors");
+
+ // ---------------- shipped music never carries an unplayable note (a craft ERROR). The fixtures are deliberately bad
+ // for other guards (ghost, novelty), not for range, so they are held to this too; add a name here only for a fixture
+ // written to fail the range check.
+ const RANGE_FIXTURES: string[] = [];
+ const shipped: [string, () => Piece][] = [...Object.entries(DEMOS), ...Object.entries(FIXTURES).filter(([k]) => !RANGE_FIXTURES.includes(k)),
+ ...([["breach", breach], ["stillwater", stillwater], ["morningCrumb", morningCrumb], ["skywardKids", skywardKids]] as const).map(([k, m]) => [`blind/${k}`, () => composePiece(m())] as [string, () => Piece])] as [string, () => Piece][];
+ for (const [k, make] of shipped) { const errs = craftReport(make()).findings.filter((f) => f.level === "error"); ok(!errs.length, `${k}: no unplayable notes${errs.length ? ` (${errs.map((f) => f.msg).join("; ")})` : ""}`); }
};