Art and animation, written as code. Illustrations, loops, interactive web art, launch-videos and scored films in dozens of styles, identical on every render.
TypeScript agent-skillsanimationcanvasclaude-codeclaude-pluginclaude-skillscodex-plugincreative-codecreative-codingcreative-toolsdeterministicgenerative-arthand-drawnillustrationlaunch-videomotion-designmotion-graphicspluginprocedural-generationskill
music: no research-folder paths in shipped code; optional reference via ANIDOODLE_MUSIC_REF
Alex Greenshpune76dc4016434
diff --git a/plugins/anidoodle/skills/anidoodle/engine/src/canvas-core/music/pieces/launch.ts b/plugins/anidoodle/skills/anidoodle/engine/src/canvas-core/music/pieces/launch.tsindex d393837..65ea174 100644--- a/plugins/anidoodle/skills/anidoodle/engine/src/canvas-core/music/pieces/launch.ts+++ b/plugins/anidoodle/skills/anidoodle/engine/src/canvas-core/music/pieces/launch.ts@@ -4,7 +4,7 @@// (lofiKit.ts): no electric piano, no vinyl, no bit-crush, a clean master, a tight detuned-saw pad// pumping under the kick, a bright pluck lead through a dotted-eighth ping-pong delay, high sparkle// plucks, a sine sub, a bouncy kick, a snare on 2 and 4 with rim ghosts, 16th hats. Levels were set-// by measuring each part (anidoodle-research/launch-film/tools/stems.mjs) against published targets.+// by measuring each part (node tools/music.mjs stems) against published targets.// Harmony: the ii-V-I-vi loop Dm9 G13 Cmaj9 Am9 from bar 2, every 4 bars, so bar 36 (the film's// "All in pure code.") lands on Cmaj9, home, and the last bar holds it.//diff --git a/plugins/anidoodle/skills/anidoodle/engine/tools/music.mjs b/plugins/anidoodle/skills/anidoodle/engine/tools/music.mjsindex 37030f4..47f1f14 100644--- a/plugins/anidoodle/skills/anidoodle/engine/tools/music.mjs+++ b/plugins/anidoodle/skills/anidoodle/engine/tools/music.mjs@@ -200,10 +200,10 @@ const main = async () => {results.push(res);console.log(`${s.file}: LUFS ${fmt(m.lufs)} (ff ${fmt(ff.I)}) LRA ${fmt(m.lra)} (ff ${fmt(ff.LRA)}) TP ${fmt(m.dbtp)} (ff ${fmt(ff.TP)}) onsets/s ${fmt(m.onsetsPerS, 2)} [data ${fmt(res.dataOnsetsPerS, 2)}] centroid ${fmt(m.centroidHz, 0)} Hz range ${res.range} tempo ${fmt(tempo, 1)} voicing ${fmt(res.voicingLU)} LU / per-note ${fmt(res.voicingNoteDb)} dB lead ${fmt(res.meanMelodyLeadMs)} ms render ${ms} ms det ${deterministic} problems ${res.problems.length} | ghost ${g.ghost.pass ? "PASS" : "FAIL"} (${g.ghost.failures}/${g.ghost.windows}) reverb ${g.reverb.pass ? "PASS" : "FAIL"} ${fmt(g.reverb.worstDb)} dB masking ${g.masking ? `${g.masking.pass ? "PASS" : "FAIL"} ${Math.round(g.masking.shareOfBarsClear * 100)}%` : "n/a"} | form ${form ?? "-"}`);}- const ref = join(here, "../../../anidoodle-research/refs/kevin-ngo-piano/film.mp4");- const refPath = [ref, resolve(process.env.HOME ?? "", "CascadeProjects/Prompts/Claude-Skills/anidoodle-research/refs/kevin-ngo-piano/film.mp4")].find(existsSync);+ // Optional measurement-only reference film, never shipped: point ANIDOODLE_MUSIC_REF at a local file.+ const refPath = process.env.ANIDOODLE_MUSIC_REF && existsSync(process.env.ANIDOODLE_MUSIC_REF) ? process.env.ANIDOODLE_MUSIC_REF : null;let reference = null;- if (refPath) { const dec = decode(refPath), m = M.measure(dec, SR), ff = ffmpegEbu(refPath), gh = M.ghostCheck(dec, SR); reference = { ghost: { pass: gh.pass, failures: gh.failures, windows: gh.windows.map((w) => ({ from: w.from, onsetsPerBeat: +w.onsetsPerBeat.toFixed(2), sustainedShare: +w.sustainedShare.toFixed(2) })) }, file: "kevin-ngo-piano/film.mp4 (reference, measurement only)", lufs: m.lufs, ffmpegLufs: ff.I, lra: m.lra, ffmpegLra: ff.LRA, dbtp: m.dbtp, onsetsPerS: m.onsetsPerS, centroidHz: m.centroidHz, centroidEnergyHz: m.centroidEnergyHz, durationS: m.durationS, lastOnsetDetectedS: m.lastOnsetS, shortTerm: m.shortTerm.filter((_, i) => i % 10 === 0).map((x) => +x.toFixed(1)) };+ if (refPath) { const dec = decode(refPath), m = M.measure(dec, SR), ff = ffmpegEbu(refPath), gh = M.ghostCheck(dec, SR); reference = { ghost: { pass: gh.pass, failures: gh.failures, windows: gh.windows.map((w) => ({ from: w.from, onsetsPerBeat: +w.onsetsPerBeat.toFixed(2), sustainedShare: +w.sustainedShare.toFixed(2) })) }, file: "ANIDOODLE_MUSIC_REF (reference, measurement only)", lufs: m.lufs, ffmpegLufs: ff.I, lra: m.lra, ffmpegLra: ff.LRA, dbtp: m.dbtp, onsetsPerS: m.onsetsPerS, centroidHz: m.centroidHz, centroidEnergyHz: m.centroidEnergyHz, durationS: m.durationS, lastOnsetDetectedS: m.lastOnsetS, shortTerm: m.shortTerm.filter((_, i) => i % 10 === 0).map((x) => +x.toFixed(1)) };console.log(`REFERENCE ghost ${gh.pass ? "PASS" : "FAIL"}: LUFS ${fmt(m.lufs)} (ff ${fmt(ff.I)}) LRA ${fmt(m.lra)} (ff ${fmt(ff.LRA)}) onsets/s ${fmt(m.onsetsPerS, 2)} centroid ${fmt(m.centroidHz, 0)} (energy ${fmt(m.centroidEnergyHz, 0)})`); }const prev = existsSync(join(dir, "meters.json")) && args[1] ? JSON.parse(readFileSync(join(dir, "meters.json"), "utf8")) : null;const merged = prev ? { ...prev, results: [...prev.results.filter((x) => !results.some((y) => y.file === x.file)), ...results], reference: reference ?? prev.reference } : { generated: "tools/music.mjs samples", sampleRate: SR, results, reference, probe: probe(M) };diff --git a/skills/anidoodle/engine/src/canvas-core/music/pieces/launch.ts b/skills/anidoodle/engine/src/canvas-core/music/pieces/launch.tsindex d393837..65ea174 100644--- a/skills/anidoodle/engine/src/canvas-core/music/pieces/launch.ts+++ b/skills/anidoodle/engine/src/canvas-core/music/pieces/launch.ts@@ -4,7 +4,7 @@// (lofiKit.ts): no electric piano, no vinyl, no bit-crush, a clean master, a tight detuned-saw pad// pumping under the kick, a bright pluck lead through a dotted-eighth ping-pong delay, high sparkle// plucks, a sine sub, a bouncy kick, a snare on 2 and 4 with rim ghosts, 16th hats. Levels were set-// by measuring each part (anidoodle-research/launch-film/tools/stems.mjs) against published targets.+// by measuring each part (node tools/music.mjs stems) against published targets.// Harmony: the ii-V-I-vi loop Dm9 G13 Cmaj9 Am9 from bar 2, every 4 bars, so bar 36 (the film's// "All in pure code.") lands on Cmaj9, home, and the last bar holds it.//diff --git a/skills/anidoodle/engine/tools/music.mjs b/skills/anidoodle/engine/tools/music.mjsindex 37030f4..47f1f14 100644--- a/skills/anidoodle/engine/tools/music.mjs+++ b/skills/anidoodle/engine/tools/music.mjs@@ -200,10 +200,10 @@ const main = async () => {results.push(res);console.log(`${s.file}: LUFS ${fmt(m.lufs)} (ff ${fmt(ff.I)}) LRA ${fmt(m.lra)} (ff ${fmt(ff.LRA)}) TP ${fmt(m.dbtp)} (ff ${fmt(ff.TP)}) onsets/s ${fmt(m.onsetsPerS, 2)} [data ${fmt(res.dataOnsetsPerS, 2)}] centroid ${fmt(m.centroidHz, 0)} Hz range ${res.range} tempo ${fmt(tempo, 1)} voicing ${fmt(res.voicingLU)} LU / per-note ${fmt(res.voicingNoteDb)} dB lead ${fmt(res.meanMelodyLeadMs)} ms render ${ms} ms det ${deterministic} problems ${res.problems.length} | ghost ${g.ghost.pass ? "PASS" : "FAIL"} (${g.ghost.failures}/${g.ghost.windows}) reverb ${g.reverb.pass ? "PASS" : "FAIL"} ${fmt(g.reverb.worstDb)} dB masking ${g.masking ? `${g.masking.pass ? "PASS" : "FAIL"} ${Math.round(g.masking.shareOfBarsClear * 100)}%` : "n/a"} | form ${form ?? "-"}`);}- const ref = join(here, "../../../anidoodle-research/refs/kevin-ngo-piano/film.mp4");- const refPath = [ref, resolve(process.env.HOME ?? "", "CascadeProjects/Prompts/Claude-Skills/anidoodle-research/refs/kevin-ngo-piano/film.mp4")].find(existsSync);+ // Optional measurement-only reference film, never shipped: point ANIDOODLE_MUSIC_REF at a local file.+ const refPath = process.env.ANIDOODLE_MUSIC_REF && existsSync(process.env.ANIDOODLE_MUSIC_REF) ? process.env.ANIDOODLE_MUSIC_REF : null;let reference = null;- if (refPath) { const dec = decode(refPath), m = M.measure(dec, SR), ff = ffmpegEbu(refPath), gh = M.ghostCheck(dec, SR); reference = { ghost: { pass: gh.pass, failures: gh.failures, windows: gh.windows.map((w) => ({ from: w.from, onsetsPerBeat: +w.onsetsPerBeat.toFixed(2), sustainedShare: +w.sustainedShare.toFixed(2) })) }, file: "kevin-ngo-piano/film.mp4 (reference, measurement only)", lufs: m.lufs, ffmpegLufs: ff.I, lra: m.lra, ffmpegLra: ff.LRA, dbtp: m.dbtp, onsetsPerS: m.onsetsPerS, centroidHz: m.centroidHz, centroidEnergyHz: m.centroidEnergyHz, durationS: m.durationS, lastOnsetDetectedS: m.lastOnsetS, shortTerm: m.shortTerm.filter((_, i) => i % 10 === 0).map((x) => +x.toFixed(1)) };+ if (refPath) { const dec = decode(refPath), m = M.measure(dec, SR), ff = ffmpegEbu(refPath), gh = M.ghostCheck(dec, SR); reference = { ghost: { pass: gh.pass, failures: gh.failures, windows: gh.windows.map((w) => ({ from: w.from, onsetsPerBeat: +w.onsetsPerBeat.toFixed(2), sustainedShare: +w.sustainedShare.toFixed(2) })) }, file: "ANIDOODLE_MUSIC_REF (reference, measurement only)", lufs: m.lufs, ffmpegLufs: ff.I, lra: m.lra, ffmpegLra: ff.LRA, dbtp: m.dbtp, onsetsPerS: m.onsetsPerS, centroidHz: m.centroidHz, centroidEnergyHz: m.centroidEnergyHz, durationS: m.durationS, lastOnsetDetectedS: m.lastOnsetS, shortTerm: m.shortTerm.filter((_, i) => i % 10 === 0).map((x) => +x.toFixed(1)) };console.log(`REFERENCE ghost ${gh.pass ? "PASS" : "FAIL"}: LUFS ${fmt(m.lufs)} (ff ${fmt(ff.I)}) LRA ${fmt(m.lra)} (ff ${fmt(ff.LRA)}) onsets/s ${fmt(m.onsetsPerS, 2)} centroid ${fmt(m.centroidHz, 0)} (energy ${fmt(m.centroidEnergyHz, 0)})`); }const prev = existsSync(join(dir, "meters.json")) && args[1] ? JSON.parse(readFileSync(join(dir, "meters.json"), "utf8")) : null;const merged = prev ? { ...prev, results: [...prev.results.filter((x) => !results.some((y) => y.file === x.file)), ...results], reference: reference ?? prev.reference } : { generated: "tools/music.mjs samples", sampleRate: SR, results, reference, probe: probe(M) };