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
Ignore inherited keys when looking up recorded instruments
Alex Greenshpun131be2d4b756
diff --git a/skills/anidoodle/engine/tools/sounds-unit.mjs b/skills/anidoodle/engine/tools/sounds-unit.mjsindex ca6b188..ab7b446 100644--- a/skills/anidoodle/engine/tools/sounds-unit.mjs+++ b/skills/anidoodle/engine/tools/sounds-unit.mjs@@ -43,6 +43,9 @@ console.log("PASS corrupt large FLAC hash: rejected before registration");let failures = 0;const check = (label, fn) => { try { fn(); console.log(`PASS ${label}`); } catch (e) { failures++; console.error(`FAIL ${label}: ${e.message}`); } };zone.sha256 = originalRoom.sha256; manifest.rooms = {}; writeFileSync(join(root, 'manifest.json'), JSON.stringify(manifest));+check('inherited constructor never becomes a sample-bank lookup', () => {+ M.clearBanks(); loadBanks(M, root, ['constructor']); assert.equal(M.bankFor('constructor'), undefined);+});const isolatedHome = join(root, 'default-home'), install = join(isolatedHome, '.anidoodle', 'sounds'); mkdirSync(install, { recursive: true });writeFileSync(join(install, 'large.flac'), bytes);writeFileSync(join(install, 'manifest.json'), JSON.stringify({ ...manifest, rooms: {}, instruments: { piano: { ...entry, range: [21, 108] } } }));diff --git a/skills/anidoodle/engine/tools/sounds.mjs b/skills/anidoodle/engine/tools/sounds.mjsindex 964ecb0..dbd472c 100644--- a/skills/anidoodle/engine/tools/sounds.mjs+++ b/skills/anidoodle/engine/tools/sounds.mjs@@ -24,6 +24,7 @@ export const loadBanks = (M, dir, ids) => {const root = realpathSync(dir), manifest = JSON.parse(readFileSync(resolve(root, "manifest.json"), "utf8"));if (manifest.pack !== "anidoodle-sounds" || manifest.version !== 1 || manifest.sampleRate !== 48000 || !manifest.instruments || typeof manifest.instruments !== "object" || Array.isArray(manifest.instruments)) throw new Error(`invalid sound pack manifest: ${dir}`);for (const id of ids) {+ if (!Object.hasOwn(manifest.instruments, id)) continue;const entry = manifest.instruments[id]; if (!entry) continue;const [inst, ...variant] = id.split("."); if (M.bankFor(inst, variant.join(".") || undefined)) continue;if (!Array.isArray(entry.zones) || !entry.zones.length) throw new Error(`${id}: empty sample bank`);