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
voices: alternates and your own voices are calibrated to the slot's target; one level scale in the docs
Alex Greenshpunf5506d5ac62a
diff --git a/skills/anidoodle/engine/src/canvas-core/music/blind/morningCrumb.ts b/skills/anidoodle/engine/src/canvas-core/music/blind/morningCrumb.tsindex 9beeb94..7fa296e 100644--- a/skills/anidoodle/engine/src/canvas-core/music/blind/morningCrumb.ts+++ b/skills/anidoodle/engine/src/canvas-core/music/blind/morningCrumb.ts@@ -30,9 +30,9 @@ const TA = ["F6", "Dm7", "Gm7 C7", "Gm7 C7"];export const morningCrumb = (): Material => ({style: "playful", title: "Morning Crumb", seed: 2207, mood: "playful",bpm: 120, key: "F", mode: "major", meter: "4/4", swing: 0.58, loop: true,- levels: { counter: -6.3, chords: -2, lead: -0.5, bass: 0.4, kick: 0.4, snare: 0.5, arp: 4.6 } /* sound v2: re-balanced so every stem sits where the composer put it against its target (the notes are untouched); written for v1 as counter: 7, chords: -6 */,+ levels: { counter: -6.3, chords: -2, lead: -0.5, bass: 2.1, kick: 0.4, snare: 0.5, arp: -0.6 } /* sound v2: re-balanced so every stem sits where the composer put it against its target (the notes are untouched); written for v1 as counter: 7, chords: -6. Since 0.6 the guitar arp and the tuba are calibrated to their targets (own voice: gainDb is an offset; alternate: trimmed): arp 8 + 4.6 -> -0.6, bass 0.4 -> 2.1 keep both where they were */,moodControls: { energy: 0.45, warmth: 0.75, brightness: 0.45, tension: 0.2, space: 0.35 },- voices: { arp: { inst: "guitar", role: "accomp", gainDb: 8 }, bass: "tuba" },+ voices: { arp: { inst: "guitar", role: "accomp" }, bass: "tuba" },chords: {F6: { voicing: "[A3 C4 D4 F4]" }, Am7: { voicing: "[G3 C4 E4]" }, D7: { voicing: "[F#3 C4 D4]" },Gm7: { voicing: "[F3 Bb3 D4]" }, Bb6: { voicing: "[F3 G3 Bb3 D4]" }, C7: { voicing: "[E3 G3 Bb3]" },diff --git a/skills/anidoodle/engine/src/canvas-core/music/blind/skywardKids.ts b/skills/anidoodle/engine/src/canvas-core/music/blind/skywardKids.tsindex e9d85e5..df39cb2 100644--- a/skills/anidoodle/engine/src/canvas-core/music/blind/skywardKids.ts+++ b/skills/anidoodle/engine/src/canvas-core/music/blind/skywardKids.ts@@ -23,7 +23,7 @@ export const skywardKids = (): Material => ({bpm: 88, key: "C", mode: "major", meter: "6/8", tail: 2.8,moodControls: { energy: 0.7, warmth: 0.5, brightness: 0.65, tension: 0.3, space: 0.55 },voices: { counter: "flute" },- levels: { hat: 9.2, perc: -8.2, counter: 6.4, chords: -1.2, arp: -1.6, bass: 1.3, kick: 1, snare: -1.4 } /* sound v2: re-balanced so every stem sits where the composer put it against its target (the notes are untouched); written for v1 as hat: 19, perc: -2.3, counter: 8, chords: -2, arp: 2.5, lead: 10 */,+ levels: { hat: 9.2, perc: -8.2, counter: -0.3, chords: -1.2, arp: -1.6, bass: 1.3, kick: 1, snare: -1.4 } /* sound v2: re-balanced so every stem sits where the composer put it against its target (the notes are untouched); written for v1 as hat: 19, perc: -2.3, counter: 8, chords: -2, arp: 2.5, lead: 10. The flute alternate is calibrated to the counter target since 0.6 (it was 6.7 dB under): counter 6.4 -> -0.3 keeps it where it was */,chords: {C: { voicing: "[E3 G3 C4 E4]", bass: gallop("C2", "G2") },F_C: { voicing: "[F3 A3 C4 F4]", bass: gallop("C2", "C3") },diff --git a/skills/anidoodle/engine/src/canvas-core/music/calibration.ts b/skills/anidoodle/engine/src/canvas-core/music/calibration.tsindex 45183e2..ff2f6af 100644--- a/skills/anidoodle/engine/src/canvas-core/music/calibration.ts+++ b/skills/anidoodle/engine/src/canvas-core/music/calibration.ts@@ -6,7 +6,7 @@ import { MODES, nameOf, type ModeId } from "./theory";import type { Material } from "./compose";import type { StyleVocab } from "./vocab";-export const testMaterial = (v: StyleVocab, o: { loop?: boolean; bars?: number; key?: string; tonic?: number; mode?: ModeId } = {}): Material => {+export const testMaterial = (v: StyleVocab, o: { loop?: boolean; bars?: number; key?: string; tonic?: number; mode?: ModeId; /** write the counter / arp line even when the palette has no voice there (to measure an alternate or your own voice) */ lines?: ("counter" | "arp")[] } = {}): Material => {const mode = o.mode ?? v.harmony.modes.find((x) => MODES[x].intervals.length === 7) ?? "major", iv = MODES[mode].intervals, meter = v.meters[0], bpb = beatsPerBar(meter), comp = isCompound(meter), bars = o.bars ?? 8;const deg = (d: number, oct: number) => 12 * (oct + 1) + (o.tonic ?? 0) + iv[((d % 7) + 7) % 7] + 12 * Math.floor(d / 7), unit = comp ? "1/3" : ".5", count = Math.round(bpb * (comp ? 3 : 2));const degs = [0, 3, 4, 5], chords: Material["chords"] = {};@@ -16,6 +16,6 @@ export const testMaterial = (v: StyleVocab, o: { loop?: boolean; bars?: number;return { style: v.id, title: `test signal: ${v.id}`, seed: 1, mood: v.moods[0], bpm: Math.round((v.tempo[0] + v.tempo[1]) / 2), key: o.key ?? "C", mode, meter, chords, loop: o.loop,grooves: v.grooves.length ? { main: { family: v.grooves[0], density: 0.5, variation: 0.35 } } : {},sections: [{ kind: "hook", bars, harmony: ["c0", "c1", "c2", "c3"], groove: v.grooves.length ? "main" : null,- lead: bar((d, j) => deg(d + (j % 5), 5)), ...(v.palette.arp ? { arp: bar((d, j) => deg(d + [0, 2, 4, 2][j % 4], 4)) } : {}),- ...(v.palette.counter ? { counter: Array.from({ length: bars }, (_, b) => `${nameOf(deg(degs[b % 4] + 4, 6))}:${half} ${nameOf(deg(degs[b % 4] + 2, 6))}:${half}`) } : {}) }] };+ lead: bar((d, j) => deg(d + (j % 5), 5)), ...(v.palette.arp || o.lines?.includes("arp") ? { arp: bar((d, j) => deg(d + [0, 2, 4, 2][j % 4], 4)) } : {}),+ ...(v.palette.counter || o.lines?.includes("counter") ? { counter: Array.from({ length: bars }, (_, b) => `${nameOf(deg(degs[b % 4] + 4, 6))}:${half} ${nameOf(deg(degs[b % 4] + 2, 6))}:${half}`) } : {}) }] };};diff --git a/skills/anidoodle/engine/src/canvas-core/music/compose.ts b/skills/anidoodle/engine/src/canvas-core/music/compose.tsindex fb693d5..95c0c1f 100644--- a/skills/anidoodle/engine/src/canvas-core/music/compose.ts+++ b/skills/anidoodle/engine/src/canvas-core/music/compose.ts@@ -10,6 +10,7 @@ import { pcOf } from "./theory";import { perform } from "./perform";import { drumBar, laneKind, type Groove, type Lane } from "./grooves";import { VOCAB_TRIM, VOCAB_TARGET_FIX } from "./vocabTrim";+import { VOCAB_ALT_TRIM, VOCAB_ALT_TARGET_FIX, INST_LEVEL, INST_REGISTER, SLOT_REF_PITCH } from "./vocabVoices";import { VOCAB, KINDS, BASE_SLOTS, resolveVoice, moodVoice, moodFx, fullMood, type Slot, type Voice, type SectionKind, type MoodControls } from "./vocab";import type { MixProfile } from "./mixProfiles";@@ -52,7 +53,13 @@ export type Material = {style: StyleId; title: string; seed: number; mood: MoodId; bpm: number; key: string; mode: ModeId; meter?: Meter;chords: Record<string, ComposedChord>; motifs?: Record<string, string>; grooves?: Record<string, Groove>;sections: ComposedSection[];- /** swap a slot's voice for one of the style's alternates by name, or give your own Voice */ voices?: Partial<Record<Slot, string | Voice>>;+ /**+ * swap a slot's voice for one of the style's alternates by name, or give your own voice. Both are+ * calibrated to the slot's stem target: an alternate by its measured trim, your own voice from its+ * instrument's measured level. Your voice's `gainDb` is a dB OFFSET from there (0 or left out = at the+ * target), the same scale as `levels`.+ */+ voices?: Partial<Record<Slot, string | CustomVoice>>;/** dB OFFSET per slot, added to the voice's calibrated gain (after trims and mood): +2 = two dB louder. Set from the stem meter. */ levels?: Partial<Record<Slot, number>>;moodControls?: MoodControls;/** 0.5 straight .. 0.67 hard swing (default the style's lower bound) */ swing?: number;@@ -63,6 +70,17 @@ export type Material = {/** override the style's mix/space/feel profile (mixProfiles.ts), e.g. { space: {...}, feel: "tight" } */ mix?: Partial<MixProfile>;};+/** Your own voice for a slot: an instrument, its role, options, send and pan. `gainDb` is a dB offset from the calibrated level (0 = at the slot's stem target). */+export type CustomVoice = Omit<Voice, "gainDb"> & { gainDb?: number };+/** An instrument's level against its register (INST_REGISTER, dB, linear between the measured octaves, held past the ends). */+const regAt = (inst: string, p: number) => { const c = INST_REGISTER[inst]; if (!c?.length) return 0; if (p <= c[0][0]) return c[0][1]; for (let i = 1; i < c.length; i++) if (p <= c[i][0]) return c[i - 1][1] + ((c[i][1] - c[i - 1][1]) * (p - c[i - 1][0])) / (c[i][0] - c[i - 1][0]); return c[c.length - 1][1]; };+/** Where your own voice sits at gainDb 0: its instrument's measured level on the slot's test line (a drum lane without its own reads its neighbour's), moved to the register your notes play in. */+const instLevel = (inst: string, slot: Slot, ns: Note[] = []) => {+ const lv = INST_LEVEL[inst]?.[slot] ?? INST_LEVEL[inst]?.[({ ghost: "snare", perc: "hat", snare: "ghost", hat: "perc" } as Partial<Record<Slot, Slot>>)[slot] ?? slot], ref = SLOT_REF_PITCH[slot];+ if (lv === undefined || ref === undefined || !ns.length) return lv;+ const ps = ns.map((n) => n.p).sort((a, b) => a - b); return lv + regAt(inst, ps[Math.floor(ps.length / 2)]) - regAt(inst, ref);+};+/** line() with the composer's context on its error: which section, slot or chord wrote the bad bar. */const lineIn = (where: string, ...a: Parameters<typeof line>) => { try { return line(...a); } catch (e) { throw new Error(`compose: ${where}: ${(e as Error).message}`); } };const need = (ok: unknown, msg: string) => { if (!ok) throw new Error(`compose: ${msg} The style supplies sound, never notes: compose it yourself (references/music/compose.md).`); };@@ -198,17 +216,21 @@ export const composePiece = (m: Material): Piece => {for (const slot of slots) {const pick = m.voices?.[slot];const FALLBACK: Partial<Record<Slot, Slot>> = { perc: "hat", ghost: "snare", snare: "ghost", hat: "perc" }; // a drum lane without its own voice borrows its neighbour's- let v = typeof pick === "object" ? pick : typeof pick === "string" ? vocab.alternates[slot]?.[pick] : vocab.palette[slot] ?? (notes[slot]?.length && FALLBACK[slot] ? vocab.palette[FALLBACK[slot]!] : undefined);+ let v = typeof pick === "object" ? { ...pick, gainDb: pick.gainDb ?? 0 } : typeof pick === "string" ? vocab.alternates[slot]?.[pick] : vocab.palette[slot] ?? (notes[slot]?.length && FALLBACK[slot] ? vocab.palette[FALLBACK[slot]!] : undefined);need(typeof pick !== "string" || v, `style ${vocab.id} has no "${pick}" voice for ${slot} (have: ${Object.keys(vocab.alternates[slot] ?? {}).join(", ") || "none"}).`);if (!v) { if (slot === "chords") continue; /* a style without a chord voice (chiptune): the harmony still labels bars and feeds the bass */ need(!notes[slot]?.length, `style ${vocab.id} has no ${slot} voice, but your ${slot} has notes: pick a groove family or slot this style has.`); continue; }v = resolveVoice(v, m.bpm);let dGain = 0; if (mood) { const r = moodVoice(slot, v, mood); v = r.voice; dGain = r.dGain; }- const lv = m.levels?.[slot];- // a legacy (shipped) score keeps the gains it was listened at: no trim- const trim = pick !== undefined || m.legacy ? 0 : VOCAB_TRIM[vocab.id]?.[slot] ?? 0; let gainDb = trim ? v.gainDb + trim : v.gainDb; if (lv) gainDb += lv;+ const lv = m.levels?.[slot], fix = VOCAB_TARGET_FIX[vocab.id]?.[slot] ?? 0, st = vocab.stemTargets[slot];+ // every voice in a slot is calibrated to the slot's target (the style's number plus its fix): the palette's voice by VOCAB_TRIM, an+ // alternate by VOCAB_ALT_TRIM, your own voice from its instrument's measured level (INST_LEVEL), its gainDb an offset from there.+ // A legacy (shipped) score keeps the gains it was listened at: no trim.+ const lvl = typeof pick === "object" ? instLevel(v.inst, slot, notes[slot]) : undefined, altFix = typeof pick === "string" && !m.legacy ? VOCAB_ALT_TARGET_FIX[vocab.id]?.[slot]?.[pick] ?? 0 : 0;+ const trim = m.legacy ? 0 : pick === undefined ? VOCAB_TRIM[vocab.id]?.[slot] ?? 0 : typeof pick === "string" ? VOCAB_ALT_TRIM[vocab.id]?.[slot]?.[pick] ?? 0 : lvl !== undefined ? (st !== undefined ? st + fix : -20) - lvl : 0;+ let gainDb = trim ? v.gainDb + trim : v.gainDb; if (lv) gainDb += lv;// a timpani (or any pitched drum voice) playing a drum lane is tuned to the key: the tonic in its low registerif (v.inst === "timpani" && role(slot) === "drum" && typeof pick !== "object") { const tp = pcOf(m.key.replace(/m$/, "")), lo = typeof v.opts?.pitch === "number" ? (v.opts.pitch as number) - 5 : slot === "kick" ? 31 : 38; /* the tonic nearest the voice's own register */ v = { ...v, opts: { ...(v.opts ?? {}), pitch: lo + ((tp - (lo % 12) + 12) % 12) } }; }- if (vocab.stemTargets[slot] !== undefined) targets[slot] = vocab.stemTargets[slot] + dGain + (pick === undefined ? VOCAB_TARGET_FIX[vocab.id]?.[slot] ?? 0 : 0); // a mood that lifts the hats lifts their target too+ if (st !== undefined) targets[slot] = st + dGain + (pick === undefined || !m.legacy ? fix : 0) + altFix; // a mood that lifts the hats lifts their target too; the slot's target is every voice's (the fix included)const p: Part = { id: slot, inst: v.inst, role: v.role, notes: notes[slot] ?? [], gainDb };if (v.opts) p.opts = v.opts; if (v.send !== undefined) p.send = v.send; if (v.pan !== undefined) p.pan = v.pan;parts.push(p);diff --git a/skills/anidoodle/engine/src/canvas-core/music/index.ts b/skills/anidoodle/engine/src/canvas-core/music/index.tsindex 5643ce6..9e58b37 100644--- a/skills/anidoodle/engine/src/canvas-core/music/index.ts+++ b/skills/anidoodle/engine/src/canvas-core/music/index.ts@@ -12,6 +12,7 @@ export * from "./score-text";export * from "./grooves";export * from "./vocab";export * from "./vocabTrim";+export * from "./vocabVoices";export * from "./compose";export * from "./novelty";export * from "./craft";diff --git a/skills/anidoodle/engine/src/canvas-core/music/vocabVoices.ts b/skills/anidoodle/engine/src/canvas-core/music/vocabVoices.tsnew file mode 100644index 0000000..29d41c3--- /dev/null+++ b/skills/anidoodle/engine/src/canvas-core/music/vocabVoices.ts@@ -0,0 +1,410 @@+// GENERATED by `node tools/music.mjs calibrate --voices`. Do not edit by hand.+// VOCAB_ALT_TRIM: per style, slot and alternate, the gain trim (dB) that brings the alternate to the+// slot's stem target (the style's number plus its VOCAB_TARGET_FIX) on the neutral test phrase.+// INST_LEVEL: each instrument's stem level (dB, the stem meter) at gainDb 0 playing a slot's test line+// (cinematic test signal, counter line an octave down; drums on the lo-fi electronic kit; default options):+// a composer's own voice is placed at the slot's target from it, so its gainDb is an offset from+// calibrated, like `levels`. VOCAB_ALT_TARGET_FIX: where a 30 dB trim cannot reach the target, the+// target moves to where the alternate sits. INST_REGISTER: each instrument's level against the lead+// line moved by octaves ([median MIDI pitch, dB vs its lead level]); SLOT_REF_PITCH: the median pitch+// of each slot's test line. Your own voice is placed for the register it actually plays in.+import type { Slot } from "./vocab";+export const VOCAB_ALT_TRIM: Record<string, Partial<Record<Slot, Record<string, number>>>> = {+ lofiElectronic: {+ lead: {+ bell: 2.6,+ mallet: 2.6,+ guitar: 16.3+ },+ chords: {+ strings: 4.6,+ piano: 24.7+ },+ bass: {+ warm: -1.5+ }+ },+ drive: {+ lead: {+ pluck: -0.9+ },+ bass: {+ sub: 1.7+ }+ },+ cinematic: {+ lead: {+ piano: 10.4,+ bell: 5.3,+ celesta: 1.9+ },+ counter: {+ piano: 30+ }+ },+ ambient: {+ lead: {+ pluck: -1.8,+ vibes: 2+ }+ },+ folk: {+ lead: {+ piano: 13.1,+ guitar: 18.1,+ strings: 13.5+ },+ chords: {+ strings: 2.7+ }+ },+ playful: {+ lead: {+ chip: 14.5,+ pluck: 3.6,+ bell: 6.3+ },+ bass: {+ tuba: -1.7+ }+ },+ musicBox: {+ lead: {+ celesta: 2.9,+ bell: 6.2+ }+ },+ nocturne: {},+ minimalist: {+ arp: {+ piano: 22.5,+ pluck: 2.2+ }+ },+ jazz: {+ lead: {+ piano: 12.7,+ clarinet: 11.5,+ flute: 11.2,+ brass: 17.8+ }+ },+ lullaby: {+ lead: {+ musicBox: 5.2,+ piano: 14.2,+ flute: 11.1+ }+ },+ chiptune: {+ lead: {+ square: 8.1+ }+ },+ lofi: {+ lead: {+ guitar: 17.1,+ flute: 11.3+ }+ },+ orchestral: {+ lead: {+ strings: 10.8,+ horn: 17.1,+ flute: 13.1+ },+ counter: {+ flute: 6.7,+ harp: 11.2+ }+ },+ suspense: {+ counter: {+ choir: 8.8,+ bell: 19+ },+ lead: {+ choir: -2.2,+ cello: 8.2+ }+ },+ rock: {+ chords: {+ strings: 10.8,+ organ: 19.2,+ piano: 27+ },+ lead: {+ guitar: -2+ }+ },+ hipHop: {+ lead: {+ bell: 2.9,+ flute: 8.7,+ choir: 3.6+ },+ chords: {+ pad: -6.3+ }+ },+ house: {+ chords: {+ pad: 4.8,+ piano: 25.6+ },+ lead: {+ synth: 14.6+ }+ },+ synthwave: {+ chords: {+ pad: 1.7+ },+ lead: {+ brass: 13.4+ }+ },+ world: {+ lead: {+ pluck: 17,+ marimba: 4.1,+ reed: 9.8,+ bowed: 12.7+ }+ },+ choral: {+ chords: {+ organ: 4,+ strings: 4.1+ },+ lead: {+ bowed: 10.3,+ flute: 9.1+ }+ }+};+export const VOCAB_ALT_TARGET_FIX: Record<string, Partial<Record<Slot, Record<string, number>>>> = {+ cinematic: {+ counter: {+ piano: -9.1+ }+ }+};+export const INST_LEVEL: Record<string, Partial<Record<Slot, number>>> = {+ piano: {+ chords: -41,+ lead: -27.4,+ counter: -45.4,+ bass: -31.1,+ arp: -39.8+ },+ musicBox: {+ chords: -22.9,+ lead: -19.8,+ counter: -28.8,+ bass: -25.1,+ arp: -23.8+ },+ bell: {+ chords: -12.6,+ lead: -9.6,+ counter: -18.6,+ bass: -12.2,+ arp: -12+ },+ celesta: {+ chords: -20.1,+ lead: -18.9,+ counter: -27,+ bass: -20,+ arp: -20.2+ },+ marimba: {+ chords: -20.8,+ lead: -20.3,+ counter: -32.5,+ bass: -19.3,+ arp: -20.5+ },+ vibes: {+ chords: -20.4,+ lead: -18.3,+ counter: -26.3,+ bass: -18.6,+ arp: -19.4+ },+ harp: {+ chords: -32.5,+ lead: -30.9,+ counter: -39.1,+ bass: -33.8,+ arp: -30.9+ },+ guitar: {+ chords: -32.1,+ lead: -34,+ counter: -38.9,+ bass: -33.4,+ arp: -34.7+ },+ strings: {+ chords: -20.5,+ lead: -26.4,+ counter: -30.3,+ bass: -25.7,+ arp: -28.3+ },+ fmBell: {+ chords: -22.3,+ lead: -18.3,+ counter: -27.7,+ bass: -21.3,+ arp: -20.1+ },+ ePiano: {+ chords: -22.1,+ lead: -23.3,+ counter: -32.7,+ bass: -21.2,+ arp: -24.3+ },+ pulse: {+ chords: -21.5,+ lead: -23.9,+ counter: -28.4,+ bass: -24.4,+ arp: -26.4+ },+ triangle: {+ chords: -13.5,+ lead: -18.2,+ counter: -18.3,+ bass: -18.3,+ arp: -18.3+ },+ noiseDrum: {+ kick: -25.5,+ snare: -27.1,+ hat: -41.6+ },+ kick: {+ kick: -12.1,+ snare: -25.6,+ hat: -44.1+ },+ snare: {+ kick: -12.1,+ snare: -25.6,+ hat: -44.1+ },+ hat: {+ kick: -12.1,+ snare: -25.6,+ hat: -44.1+ },+ bass: {+ chords: -12.6,+ lead: -13.9,+ counter: -17.8,+ bass: -15.2,+ arp: -14.6+ },+ warmPad: {+ chords: -21.8,+ lead: -29,+ counter: -30.9,+ bass: -23.8,+ arp: -30.8+ },+ softPluck: {+ chords: -22.2,+ lead: -20.1,+ counter: -29.7,+ bass: -25.6,+ arp: -21.6+ },+ sub: {+ chords: -25.5,+ lead: -39.8,+ counter: -46.5,+ bass: -12.9,+ arp: -30.9+ },+ organ: {+ chords: -30.8,+ lead: -35.3,+ counter: -38.3,+ bass: -35.1,+ arp: -37.7+ },+ brass: {+ chords: -22.7,+ lead: -27.2,+ counter: -32.2,+ bass: -22.1,+ arp: -30.2+ },+ woodwind: {+ chords: -20,+ lead: -24.1,+ counter: -26.6,+ bass: -23,+ arp: -25.9+ },+ choir: {+ chords: -10.8,+ lead: -19.7,+ counter: -18.1,+ bass: -21.8,+ arp: -17.2+ },+ timpani: {+ kick: -13.4,+ snare: -15,+ hat: -16.5+ },+ leadSynth: {+ chords: -29.6,+ lead: -29,+ counter: -33.2,+ bass: -28.1,+ arp: -31.5+ },+ bowedSolo: {+ chords: -20.2,+ lead: -27.2,+ counter: -31.3,+ bass: -27.3,+ arp: -25.7+ },+ glockenspiel: {+ chords: -22.4,+ lead: -19.1,+ counter: -27.8,+ bass: -21.4,+ arp: -21.4+ },+ wurlitzer: {+ chords: -25.5,+ lead: -28.6,+ counter: -35.9,+ bass: -22.9,+ arp: -31.3+ },+ pipeOrgan: {+ chords: -20,+ lead: -25,+ counter: -25.6,+ bass: -24.4,+ arp: -26+ }+};+export const INST_REGISTER: Record<string, [number, number][]> = {"piano":[[44,5.5],[56,5.3],[68,3.9],[80,0],[92,-5.6],[104,-12.3]],"musicBox":[[44,0.4],[56,0.2],[68,0.2],[80,0],[92,-2.1],[104,-4.7]],"bell":[[44,2.1],[56,1.9],[68,1.1],[80,0],[92,-1.4],[104,-3.1]],"celesta":[[44,2.7],[56,2.7],[68,1.3],[80,0],[92,-2.3],[104,-4.8]],"marimba":[[44,7],[56,5.5],[68,2.7],[80,0],[92,-3.8],[104,-7]],"vibes":[[44,2.2],[56,2.6],[68,1.5],[80,0],[92,-1.4],[104,-2.4]],"harp":[[44,3.8],[56,3.6],[68,3.6],[80,0],[92,0.1],[104,0.8]],"guitar":[[44,4.3],[56,4.7],[68,3],[80,0],[92,-0.4],[104,-3.3]],"strings":[[44,-2.4],[56,1],[68,0.8],[80,0],[92,-4.2],[104,-8.3]],"fmBell":[[44,3],[56,2.3],[68,1],[80,0],[92,-1.3],[104,-2.1]],"ePiano":[[44,3.9],[56,4.8],[68,2.9],[80,0],[92,-3.3],[104,-6]],"pulse":[[44,-0.9],[56,-0.4],[68,-0.1],[80,0],[92,-0.2],[104,-1.1]],"triangle":[[44,0],[56,0],[68,0],[80,0],[92,0],[104,-0.2]],"bass":[[44,2.3],[56,2.4],[68,2.3],[80,0],[92,-0.9],[104,-8.8]],"warmPad":[[44,0.4],[56,1.4],[68,1.3],[80,0],[92,-4],[104,-12.2]],"softPluck":[[44,0.1],[56,0.7],[68,1.1],[80,0],[92,-2],[104,-6.1]],"sub":[[44,25.7],[56,21.1],[68,11.5],[80,0],[92,-11.8],[104,-23.2]],"organ":[[44,-1.6],[56,-0.7],[68,-0.1],[80,0],[92,-0.5],[104,-0.7]],"brass":[[44,-0.2],[56,1.5],[68,1.1],[80,0],[92,-0.8],[104,-3.5]],"woodwind":[[44,-0.4],[56,0.2],[68,0.2],[80,0],[92,-0.2],[104,-0.1]],"choir":[[44,-2.9],[56,0.8],[68,4.5],[80,0],[92,-0.3],[104,4]],"leadSynth":[[44,-1.3],[56,-0.7],[68,-0.2],[80,0],[92,-1.2],[104,-6.2]],"bowedSolo":[[44,0.2],[56,1.8],[68,3.6],[80,0],[92,-7.6],[104,-30.6]],"glockenspiel":[[44,1.7],[56,1.8],[68,0.8],[80,0],[92,-1.3],[104,-2.3]],"wurlitzer":[[44,7],[56,5.1],[68,2.4],[80,0],[92,-3.7],[104,-6.8]],"pipeOrgan":[[44,-1.6],[56,-0.7],[68,-0.2],[80,0],[92,-0.5],[104,-3.1]]};+export const SLOT_REF_PITCH: Partial<Record<Slot, number>> = {+ chords: 68,+ lead: 80,+ counter: 84,+ bass: 43,+ arp: 68+};diff --git a/skills/anidoodle/engine/tools/music-unit.mjs b/skills/anidoodle/engine/tools/music-unit.mjsindex edfdba8..d6a1557 100644--- a/skills/anidoodle/engine/tools/music-unit.mjs+++ b/skills/anidoodle/engine/tools/music-unit.mjs@@ -165,6 +165,23 @@ for (const secs of [70, 90, 110]) {assert.deepEqual(one("3/4", "C:1 F:2"), [0, 1]); assert.throws(() => one("3/4", "C:1 F:1"), /adds up to 2/);pass("split bars: 3/4 changes on beat 3 (2+1), 6/8 3+3 eighths, 5/4 3+2 or its grouping (2+3), 7/8 4+3 eighths, explicit beats \"C:1 F:2\"; a wrong sum throws"); }}+// 9c. One level scale: alternates and your own voices are calibrated to the slot's target (the style's number plus its fix).+{ const stem = (p, slot) => { const r = M.renderPiece(p, SR, { stems: true, master: "none", only: (pt) => pt.id === slot }); return M.stemRms(r.stems[slot][0], r.stems[slot][1], SR); };+ const tm = (v, slot, voice, extra = {}) => M.composePiece({ ...M.testMaterial(v, { bars: 4, lines: slot === "counter" || slot === "arp" ? [slot] : [] }), voices: { [slot]: voice }, ...extra });+ let worst = 0, n = 0;+ for (const v of Object.values(M.VOCAB)) for (const [slot, alts] of Object.entries(v.alternates)) for (const name of Object.keys(alts)) {+ const p = tm(v, slot, name); if (p.stemTargets[slot] === undefined) continue; const off = stem(p, slot) - p.stemTargets[slot]; n++;+ assert(Math.abs(off) <= 1.5, `${v.id} ${slot} alternate ${name} sits ${off.toFixed(1)} dB off its target`); worst = Math.max(worst, Math.abs(off)); }+ const pianoLead = stem(tm(M.VOCAB.cinematic, "lead", "piano"), "lead") - M.VOCAB.cinematic.stemTargets.lead, synthLead = stem(tm(M.VOCAB.house, "lead", "synth"), "lead") - M.VOCAB.house.stemTargets.lead;+ pass(`alternates: all ${n} in every style sit within ${worst.toFixed(2)} dB of their target (cinematic piano lead ${pianoLead.toFixed(1)}, house synth lead ${synthLead.toFixed(1)}; the blind composer needed +14 and +16.5)`);+ const role = { chords: "accomp", arp: "accomp", lead: "melody", counter: "color", bass: "bass" }, offs = [];+ for (const [style, slot, inst] of [["cinematic", "lead", "piano"], ["cinematic", "counter", "strings"], ["house", "lead", "leadSynth"], ["world", "arp", "guitar"], ["folk", "chords", "strings"], ["jazz", "bass", "bass"], ["orchestral", "lead", "woodwind"], ["lofiElectronic", "chords", "ePiano"], ["suspense", "lead", "bowedSolo"], ["playful", "arp", "marimba"]]) {+ const p = tm(M.VOCAB[style], slot, { inst, role: role[slot] }), off = stem(p, slot) - p.stemTargets[slot]; offs.push(`${style} ${slot} ${inst} ${off >= 0 ? "+" : ""}${off.toFixed(1)}`);+ assert(Math.abs(off) <= 3, `your own ${inst} as ${style} ${slot} sits ${off.toFixed(1)} dB off`); }+ const cin = M.VOCAB.cinematic, own = tm(cin, "counter", { inst: "strings", role: "color" });+ assert.equal(own.stemTargets.counter, cin.stemTargets.counter + M.VOCAB_TARGET_FIX.cinematic.counter, "your own counter takes the slot's corrected target (-16.4, not -7.5)");+ const up = stem(tm(cin, "counter", { inst: "strings", role: "color", gainDb: 2 }), "counter") - stem(own, "counter"); assert(Math.abs(up - 2) < 0.05, `gainDb 2 = +2 dB (got ${up})`);+ pass(`your own voice (gainDb left out) sits at the slot's target within 3 dB: ${offs.join(", ")}; its target is the corrected one (cinematic counter ${own.stemTargets.counter.toFixed(1)}); gainDb: 2 = ${up.toFixed(2)} dB over`); }// 10. Novelty: the copy Alex heard scores as a copy; the shipped demos stay apart; a reused fragment fails.{ const d = M.novelty(M.daylightCopy(), M.DEMOS);assert(!d.pass && d.worst.name.startsWith("launchLofi") && d.worst.score > 0.6, `daylight copy scored ${d.worst.score} vs ${d.worst.name}`);diff --git a/skills/anidoodle/engine/tools/music.mjs b/skills/anidoodle/engine/tools/music.mjsindex 891bbd0..75d30e4 100644--- a/skills/anidoodle/engine/tools/music.mjs+++ b/skills/anidoodle/engine/tools/music.mjs@@ -180,7 +180,7 @@ const main = async () => {const flag = (k) => args.includes(k), val = (k, d) => { const i = args.indexOf(k); return i >= 0 ? Number(args[i + 1]) : d; };if (cmd === "list") { console.log("demos (listening references and the novelty corpus, never a film's score):\n " + Object.keys(M.DEMOS).join("\n ") + "\nfixtures (tests):\n " + Object.keys(M.FIXTURES).join("\n ")); return; }if (cmd === "vocab") { if (args[0] === "--md") vocabMarkdown(M); else printVocab(M, args[0]); return; }- if (cmd === "calibrate") { calibrate(M); return; }+ if (cmd === "calibrate") { if (flag("--voices")) calibrateVoices(M); else calibrate(M); return; }if (cmd === "novelty") {const refs = args.filter((a) => !a.startsWith("--") && !/^[\d.]+$/.test(a)), pcs = [];for (const ref of refs) pcs.push(await getPiece(M, ref));@@ -306,15 +306,66 @@ const calibrate = (M) => {console.log(`wrote ${file}`);};+/**+ * Alternates and your own voices, on the same scale as the palette (src/canvas-core/music/vocabVoices.ts):+ * each alternate's trim to its slot's stem target (the style's number plus its fix) on the style's+ * test signal, two passes (drive and amps are not linear), capped at +-30 dB; and each instrument's+ * stem level at gainDb 0 on each slot's test line (cinematic test signal with the counter line an octave down;+ * drums on the lo-fi electronic kit; default options), from which+ * compose places a composer's own voice at the slot's target.+ */+const calibrateVoices = (M) => {+ const stem = (p, slot) => { const r = M.renderPiece(p, STEM_SR, { stems: true, master: "none", only: (pt) => pt.id === slot }), x = r.stems[slot]; return x ? M.stemRms(x[0], x[1], STEM_SR) : -Infinity; };+ const alt = {}, altFix = {}; for (const T of [M.VOCAB_ALT_TRIM, M.VOCAB_ALT_TARGET_FIX, M.INST_LEVEL, M.INST_REGISTER, M.SLOT_REF_PITCH]) for (const k of Object.keys(T)) delete T[k];+ for (const v of Object.values(M.VOCAB)) { alt[v.id] = {};+ for (const [slot, alts] of Object.entries(v.alternates)) for (const name of Object.keys(alts)) {+ let trim = 0; (M.VOCAB_ALT_TRIM[v.id] ??= {})[slot] ??= {};+ for (let pass = 0; pass < 2; pass++) {+ M.VOCAB_ALT_TRIM[v.id][slot][name] = trim;+ const p = M.composePiece({ ...M.testMaterial(v, { bars: 4, lines: slot === "counter" || slot === "arp" ? [slot] : [] }), voices: { [slot]: name } }), t = p.stemTargets[slot], rms = stem(p, slot);+ if (t === undefined || !Number.isFinite(rms)) break;+ trim = +Math.max(-30, Math.min(30, trim + t - rms)).toFixed(1);+ }+ (alt[v.id][slot] ??= {})[name] = trim;+ // where a 30 dB trim cannot reach the target (a piano's top octave on a counter target set for a harp), the target moves to where the voice sits, as for the palette+ const p = M.composePiece({ ...M.testMaterial(v, { bars: 4, lines: slot === "counter" || slot === "arp" ? [slot] : [] }), voices: { [slot]: name } }), off = p.stemTargets[slot] === undefined ? 0 : stem(p, slot) - p.stemTargets[slot];+ if (Math.abs(off) > 1) ((altFix[v.id] ??= {})[slot] ??= {})[name] = +off.toFixed(1);+ console.log(`${v.id.padEnd(14)} ${slot.padEnd(8)} ${name.padEnd(10)} ${trim >= 0 ? "+" : ""}${trim}${Math.abs(off) > 1 ? ` (target moved ${off.toFixed(1)})` : ""}`);+ } }+ const inst = {}, reg = {}, refPitch = {};+ const DRUM = ["kick", "snare", "hat", "noiseDrum", "timpani"], ALL = ["piano", "musicBox", "bell", "celesta", "marimba", "vibes", "harp", "guitar", "strings", "fmBell", "ePiano", "pulse", "triangle", "noiseDrum", "kick", "snare", "hat", "bass", "warmPad", "softPluck", "sub", "organ", "brass", "woodwind", "choir", "timpani", "leadSynth", "bowedSolo", "glockenspiel", "wurlitzer", "pipeOrgan"];+ const role = { chords: "accomp", arp: "accomp", lead: "melody", counter: "color", bass: "bass", kick: "drum", snare: "drum", hat: "drum" };+ // pitched voices on the cinematic test signal, the counter line an octave lower than the palette's (octaves 5-6: where a composer's+ // own counter line usually sits; the register moves some instruments' level by 8 dB); drums on the lo-fi electronic kit's groove+ const ref = M.testMaterial(M.VOCAB.cinematic, { bars: 4, lines: ["counter", "arp"] }), kit = M.testMaterial(M.VOCAB.lofiElectronic, { bars: 4 });+ const lower = { ...ref, sections: ref.sections.map((x) => ({ ...x, counter: x.counter.map((b) => b.replace(/([A-G][#b]?)(\d)/g, (_, n, o) => `${n}${+o - 1}`)) })) };+ const median = (ns) => { const ps = ns.map((n) => n.p).sort((a, b) => a - b); return ps[Math.floor(ps.length / 2)]; };+ for (const slot of ["chords", "lead", "counter", "bass", "arp"]) refPitch[slot] = median(M.composePiece(lower).parts.find((x) => x.id === slot).notes);+ // the register curve: the lead line moved by whole octaves (level at each median pitch), so your own voice is placed for the register it plays in+ const moved = (k) => ({ ...lower, sections: lower.sections.map((x) => ({ ...x, lead: x.lead.map((b) => b.replace(/([A-G][#b]?)(\d)/g, (_, n, o) => `${n}${+o + k}`)) })) });+ for (const i of ALL) { inst[i] = {};+ for (const slot of DRUM.includes(i) ? ["kick", "snare", "hat"] : ["chords", "lead", "counter", "bass", "arp"]) {+ const p = M.composePiece({ ...(DRUM.includes(i) ? kit : lower), voices: { [slot]: { inst: i, role: role[slot], gainDb: 0 } } }), rms = stem(p, slot);+ if (Number.isFinite(rms)) inst[i][slot] = +rms.toFixed(1);+ }+ if (!DRUM.includes(i)) { reg[i] = []; for (const k of [-3, -2, -1, 0, 1, 2]) { const p = M.composePiece({ ...moved(k), voices: { lead: { inst: i, role: "melody", gainDb: 0 } } }), rms = stem(p, "lead");+ if (Number.isFinite(rms)) reg[i].push([refPitch.lead + 12 * k, +(rms - inst[i].lead).toFixed(1)]); } }+ console.log(`${i.padEnd(13)} ${Object.entries(inst[i]).map(([k, x]) => `${k} ${x}`).join(" ")}${reg[i] ? ` | register ${reg[i].map(([p, d]) => `${M.nameOf(p)} ${d >= 0 ? "+" : ""}${d}`).join(" ")}` : ""}`); }+ const file = join(here, "../src/canvas-core/music/vocabVoices.ts"), head = readFileSync(file, "utf8").split("export const VOCAB_ALT_TRIM")[0], j = (x) => JSON.stringify(x, null, 1).replace(/"(\w+)":/g, "$1:");+ writeFileSync(file, `${head}export const VOCAB_ALT_TRIM: Record<string, Partial<Record<Slot, Record<string, number>>>> = ${j(alt)};\nexport const VOCAB_ALT_TARGET_FIX: Record<string, Partial<Record<Slot, Record<string, number>>>> = ${j(altFix)};\nexport const INST_LEVEL: Record<string, Partial<Record<Slot, number>>> = ${j(inst)};\nexport const INST_REGISTER: Record<string, [number, number][]> = ${JSON.stringify(reg)};\nexport const SLOT_REF_PITCH: Partial<Record<Slot, number>> = ${j(refPitch)};\n`);+ console.log(`wrote ${file}`);+};+const printVocab = (M, id) => {if (!id) { for (const v of Object.values(M.VOCAB)) console.log(`${v.id.padEnd(15)} ${v.name}: ${v.atmosphere}\n${"".padEnd(16)}grooves: ${v.grooves.join(", ") || "none (no drums)"} | moods: ${v.moods.join(", ")} | ${v.tempo.join("-")} bpm ${v.meters.join(" ")}`);console.log("\ngroove families:"); for (const [k, d] of Object.entries(M.GROOVE_FAMILIES)) console.log(` ${k.padEnd(10)} ${d}`);console.log("\nsection kinds:"); for (const [k, d] of Object.entries(M.KINDS)) console.log(` ${k.padEnd(10)} ${d.what}`); return; }const v = M.VOCAB[id]; if (!v) throw new Error(`no style "${id}" (have: ${Object.keys(M.VOCAB).join(", ")})`);console.log(`${v.name} (${v.id}): ${v.atmosphere}\ntempo ${v.tempo.join("-")} bpm, meters ${v.meters.join(" ")}, swing ${v.swing.join("-")}, moods ${v.moods.join(", ")}`);- const eff = (slot, x) => +(x.gainDb + (M.VOCAB_TRIM[v.id]?.[slot] ?? 0)).toFixed(1), tgt = (slot) => (v.stemTargets[slot] === undefined ? "-" : +(v.stemTargets[slot] + (M.VOCAB_TARGET_FIX[v.id]?.[slot] ?? 0)).toFixed(1));- console.log("palette (slot: instrument, gain dB, stem target dB):"); for (const [slot, x] of Object.entries(v.palette)) console.log(` ${slot.padEnd(8)} ${x.inst.padEnd(10)} ${String(eff(slot, x)).padStart(5)} ${tgt(slot)} dB${Object.keys(v.alternates[slot] ?? {}).length ? ` alternates: ${Object.entries(v.alternates[slot]).map(([n, a]) => `${n} (${a.inst}, ${a.gainDb} dB)`).join(", ")}` : ""}`);- for (const [slot, alts] of Object.entries(v.alternates)) if (!v.palette[slot]) console.log(` ${slot.padEnd(8)} (no default) alternates: ${Object.entries(alts).map(([n, a]) => `${n} (${a.inst}, ${a.gainDb} dB)`).join(", ")}`);+ const tgt = (slot) => (v.stemTargets[slot] === undefined ? "-" : +(v.stemTargets[slot] + (M.VOCAB_TARGET_FIX[v.id]?.[slot] ?? 0)).toFixed(1));+ console.log("palette (slot: instrument, stem target dB). Every voice, alternate or your own, is calibrated to its slot's target:\n levels.<slot> and your own voice's gainDb are dB offsets from there (0 = at the target)");+ for (const [slot, x] of Object.entries(v.palette)) console.log(` ${slot.padEnd(8)} ${x.inst.padEnd(10)} ${String(tgt(slot)).padStart(6)} dB${Object.keys(v.alternates[slot] ?? {}).length ? ` alternates: ${Object.entries(v.alternates[slot]).map(([n, a]) => `${n} (${a.inst})`).join(", ")}` : ""}`);+ for (const [slot, alts] of Object.entries(v.alternates)) if (!v.palette[slot]) console.log(` ${slot.padEnd(8)} (no default) alternates: ${Object.entries(alts).map(([n, a]) => `${n} (${a.inst})`).join(", ")}`);console.log(`stem targets ${v.calibrated ? "calibrated on a listened score" : "are starting numbers (uncalibrated: flags are advisory until a human listens)"}`);console.log(`grooves: ${v.grooves.map((g) => `${g} (${M.GROOVE_FAMILIES[g]})`).join("\n ") || "none"}`);for (const [k, x] of Object.entries(v.harmony)) console.log(`harmony.${k}: ${Array.isArray(x) ? x.join(", ") : x}`);@@ -327,6 +378,7 @@ const printVocab = (M, id) => {/** references/music/styles/vocabularies.md, generated from the data so the page never drifts from the code. */const vocabMarkdown = (M) => {const o = ["# 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)).", "",+ "**Levels are one scale.** Every voice in a slot, the palette's, an alternate or your own, is calibrated to the slot's stem target (the \"Stem target dB\" column: the level the stem meter reads when the part plays). Everything you set is a dB offset from there: `levels: { lead: 2 }` is two dB over the target, and your own voice's `gainDb` works the same way (`voices: { counter: { inst: \"strings\", role: \"color\" } }` sits at the counter target; `gainDb: -3` sits 3 dB under it). Engine gains (`Voice.gainDb` inside vocab.ts) are internal and never on this scale.", "","| Style | Atmosphere | Tempo, meters | Moods | Grooves |", "|---|---|---|---|---|"];for (const v of Object.values(M.VOCAB)) o.push(`| \`${v.id}\` | ${v.atmosphere} | ${v.tempo.join("-")} bpm; ${v.meters.join(", ")} | ${v.moods.join(", ")} | ${v.grooves.join(", ") || "none (no drums)"} |`);o.push("", "## Groove families", "", "Pick a family and its knobs (`density`, `variation`, `fill`, `accent`); the seed varies every bar. Or write the drum bars yourself.", "");@@ -334,8 +386,10 @@ const vocabMarkdown = (M) => {o.push("", "## Section kinds (the arrangement grammar)", "", "A kind decides which layers may sound; your lines sound only where you write them.", "");for (const [k, d] of Object.entries(M.KINDS)) o.push(`- \`${k}\` (drums: ${d.drums ?? "none"}, bass: ${d.bass ? "yes" : "no"}): ${d.what}`);for (const v of Object.values(M.VOCAB)) {- o.push("", `## \`${v.id}\`: ${v.name}`, "", `${v.atmosphere}. Tempo ${v.tempo.join("-")} bpm, meters ${v.meters.join(", ")}, swing ${v.swing.join("-")}.`, "", "| Slot | Voice | Gain dB | Stem target dB | Alternates (voice, gain dB, uncalibrated) |", "|---|---|---|---|---|");- for (const [slot, x] of Object.entries(v.palette)) o.push(`| ${slot} | \`${x.inst}\` | ${+(x.gainDb + (M.VOCAB_TRIM[v.id]?.[slot] ?? 0)).toFixed(1)} | ${v.stemTargets[slot] === undefined ? "-" : +(v.stemTargets[slot] + (M.VOCAB_TARGET_FIX[v.id]?.[slot] ?? 0)).toFixed(1)} | ${Object.entries(v.alternates[slot] ?? {}).map(([n, a]) => `${n} (\`${a.inst}\`, ${a.gainDb} dB)`).join(", ") || "-"} |`);+ o.push("", `## \`${v.id}\`: ${v.name}`, "", `${v.atmosphere}. Tempo ${v.tempo.join("-")} bpm, meters ${v.meters.join(", ")}, swing ${v.swing.join("-")}.`, "", "| Slot | Voice | Stem target dB | Alternates (name, voice) |", "|---|---|---|---|");+ const alts = (slot) => Object.entries(v.alternates[slot] ?? {}).map(([n, a]) => `${n} (\`${a.inst}\`)`).join(", ") || "-", tg = (slot) => (v.stemTargets[slot] === undefined ? "-" : +(v.stemTargets[slot] + (M.VOCAB_TARGET_FIX[v.id]?.[slot] ?? 0)).toFixed(1));+ for (const [slot, x] of Object.entries(v.palette)) o.push(`| ${slot} | \`${x.inst}\` | ${tg(slot)} | ${alts(slot)} |`);+ for (const slot of Object.keys(v.alternates)) if (!v.palette[slot]) o.push(`| ${slot} | (none) | ${tg(slot)} | ${alts(slot)} |`);o.push("", `Stem targets: ${v.calibrated ? "calibrated on a listened score." : "starting numbers from a neutral test signal (advisory until a human listens)."}`, "");o.push(`- **Harmony language.** Modes: ${v.harmony.modes.join(", ")}. Qualities: ${v.harmony.qualities}. Tendencies: ${v.harmony.tendencies}. Harmonic rhythm: ${v.harmony.rhythm}. Voicing: ${v.harmony.voicing}. Tension and release: ${v.harmony.tension}.`);o.push(`- **Melody.** Range ${v.melody.range}. Contour: ${v.melody.contour}. Density: ${v.melody.density}. Motif: ${v.melody.motif}.`);diff --git a/skills/anidoodle/references/music/compose.md b/skills/anidoodle/references/music/compose.mdindex 936ef27..f774174 100644--- a/skills/anidoodle/references/music/compose.md+++ b/skills/anidoodle/references/music/compose.md@@ -167,7 +167,7 @@ what to compose. The engine then performs, synthesizes, mixes and masters, deter--verify` renders again serially and compares; `ANIDOODLE_THREADS=1` turns the pool off).- **Stems:** fix any part flagged more than 3 dB off with `levels`. `levels` is a **dB offset** perslot (+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.+ shifts, on the same scale as your own voice's `gainDb`. 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'theard), raise the lead. The stem meter lets the lead sit up to +3 dB above its tolerance forthis. You can also lower or thin what sits in the melody's register. Mood controls shift the@@ -235,7 +235,16 @@ A film plays it with `filmScore(score(), fps, frames)` from `canvas-core/score.tform 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).+ alternates. Or give your own `{ inst, role, opts }` (instruments: README table), with the slot's+ role: `chords` and `arp` are `"accomp"`, `lead` is `"melody"`, `counter` is `"color"`, `bass` is+ `"bass"`, drum lanes are `"drum"`. **Levels are one scale.** The palette voice, an alternate and+ your own voice all sit at the slot's stem target (the column in+ [styles/vocabularies.md](styles/vocabularies.md), fix included): alternates carry a measured trim,+ and your own voice is placed from its instrument's measured level in the register your notes+ play in. So leave your voice's `gainDb` out (0 = at the target) and set it, like `levels`, only+ as an offset: `gainDb: 2` is two dB over. Then read `check`'s stems and adjust by the dB it+ prints. Options (`attack`, `bright`, `drive`) move the level a little; a piano far up its range+ is quiet by nature.- **Loops:** `loop: true`, and the form length is the loop. `render` makes it seamless.- **Split bars:** `harmony: ["<chord> <chord>"]` splits a bar where the meter divides, not at itsarithmetic middle. Give that section a `bass` override for it.diff --git a/skills/anidoodle/references/music/styles/vocabularies.md b/skills/anidoodle/references/music/styles/vocabularies.mdindex 2b02602..f918db4 100644--- a/skills/anidoodle/references/music/styles/vocabularies.md+++ b/skills/anidoodle/references/music/styles/vocabularies.md@@ -4,6 +4,8 @@> 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)).+**Levels are one scale.** Every voice in a slot, the palette's, an alternate or your own, is calibrated to the slot's stem target (the "Stem target dB" column: the level the stem meter reads when the part plays). Everything you set is a dB offset from there: `levels: { lead: 2 }` is two dB over the target, and your own voice's `gainDb` works the same way (`voices: { counter: { inst: "strings", role: "color" } }` sits at the counter target; `gainDb: -3` sits 3 dB under it). Engine gains (`Voice.gainDb` inside vocab.ts) are internal and never on this scale.+| 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 |@@ -69,18 +71,18 @@ A kind decides which layers may sound; your lines sound only where you write thewarm, 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` | -0.6 | -22 | strings (`strings`, -6 dB), piano (`piano`, -4 dB) |-| lead | `softPluck` | 4.9 | -15.5 | bell (`fmBell`, 0 dB), mallet (`marimba`, 2 dB), guitar (`guitar`, 2 dB) |-| counter | `softPluck` | 13.5 | -20 | - |-| bass | `sub` | -5.6 | -18.5 | warm (`bass`, -2 dB) |-| kick | `kick` | -2.6 | -14.5 | - |-| snare | `snare` | 6.4 | -19 | - |-| ghost | `snare` | 4 | - | - |-| hat | `hat` | 19.5 | -24.5 | - |-| arp | `softPluck` | 4 | - | - |-| perc | `hat` | 14 | - | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `warmPad` | -22 | strings (`strings`), piano (`piano`) |+| lead | `softPluck` | -15.5 | bell (`fmBell`), mallet (`marimba`), guitar (`guitar`) |+| counter | `softPluck` | -20 | - |+| bass | `sub` | -18.5 | warm (`bass`) |+| kick | `kick` | -14.5 | - |+| snare | `snare` | -19 | - |+| ghost | `snare` | - | - |+| hat | `hat` | -24.5 | - |+| arp | `softPluck` | - | - |+| perc | `hat` | - | - |Stem targets: calibrated on a listened score.@@ -93,18 +95,18 @@ Stem targets: calibrated on a listened score.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` | -1.3 | -23 | - |-| lead | `strings` | 8.7 | -16 | pluck (`softPluck`, 5 dB) |-| counter | `fmBell` | 10.8 | -19.5 | - |-| bass | `bass` | 0 | -16 | sub (`sub`, -5 dB) |-| kick | `kick` | 1 | -12.5 | - |-| snare | `snare` | 8.5 | -17 | - |-| ghost | `snare` | -2 | - | - |-| hat | `hat` | 12 | -26 | - |-| arp | `softPluck` | 4.8 | -20.5 | - |-| perc | `hat` | 15.5 | -26 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `strings` | -23 | - |+| lead | `strings` | -16 | pluck (`softPluck`) |+| counter | `fmBell` | -19.5 | - |+| bass | `bass` | -16 | sub (`sub`) |+| kick | `kick` | -12.5 | - |+| snare | `snare` | -17 | - |+| ghost | `snare` | - | - |+| hat | `hat` | -26 | - |+| arp | `softPluck` | -20.5 | - |+| perc | `hat` | -26 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -117,18 +119,18 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humawide 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` | 2.1 | -18.5 | - |-| lead | `strings` | 6.9 | -17 | piano (`piano`, 0 dB), bell (`fmBell`, -4 dB), celesta (`celesta`, 0 dB) |-| counter | `harp` | 18 | -16.4 | piano (`piano`, -3 dB) |-| bass | `strings` | -0.6 | -19.5 | - |-| arp | `strings` | 4.5 | -21.5 | - |-| kick | `kick` | 0.2 | -16.5 | - |-| snare | `snare` | -2 | -24 | - |-| ghost | `snare` | -4 | - | - |-| hat | `hat` | 6 | -32 | - |-| perc | `fmBell` | -8 | - | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `strings` | -18.5 | - |+| lead | `strings` | -17 | piano (`piano`), bell (`fmBell`), celesta (`celesta`) |+| counter | `harp` | -16.4 | piano (`piano`) |+| bass | `strings` | -19.5 | - |+| arp | `strings` | -21.5 | - |+| kick | `kick` | -16.5 | - |+| snare | `snare` | -24 | - |+| ghost | `snare` | - | - |+| hat | `hat` | -32 | - |+| perc | `fmBell` | - | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -141,17 +143,17 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humafloating, 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 | -20 | - |-| lead | `fmBell` | 1.6 | -17.5 | pluck (`softPluck`, 5 dB), vibes (`vibes`, 0 dB) |-| counter | `softPluck` | 7.2 | -26.5 | - |-| bass | `sub` | -8.3 | -22 | - |-| arp | `celesta` | -2.4 | -23.5 | - |-| kick | `kick` | -7 | -20.5 | - |-| ghost | `snare` | -6 | - | - |-| hat | `hat` | 6 | -32 | - |-| perc | `hat` | 4 | - | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `warmPad` | -20 | - |+| lead | `fmBell` | -17.5 | pluck (`softPluck`), vibes (`vibes`) |+| counter | `softPluck` | -26.5 | - |+| bass | `sub` | -22 | - |+| arp | `celesta` | -23.5 | - |+| kick | `kick` | -20.5 | - |+| ghost | `snare` | - | - |+| hat | `hat` | -32 | - |+| perc | `hat` | - | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -164,18 +166,18 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humaintimate 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` | 13 | -26 | strings (`strings`, -8 dB) |-| arp | `guitar` | 12.5 | -20.5 | - |-| lead | `harp` | 16.7 | -13 | piano (`piano`, 0 dB), guitar (`guitar`, 2 dB), strings (`strings`, -2 dB) |-| counter | `celesta` | 9.7 | -19.5 | - |-| bass | `bass` | -7.2 | -21 | - |-| kick | `kick` | -4.5 | -20.5 | - |-| snare | `snare` | -6 | -26 | - |-| ghost | `snare` | 2.3 | -24.5 | - |-| hat | `hat` | 2 | -30 | - |-| perc | `hat` | 19.4 | -30 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `piano` | -26 | strings (`strings`) |+| arp | `guitar` | -20.5 | - |+| lead | `harp` | -13 | piano (`piano`), guitar (`guitar`), strings (`strings`) |+| counter | `celesta` | -19.5 | - |+| bass | `bass` | -21 | - |+| kick | `kick` | -20.5 | - |+| snare | `snare` | -26 | - |+| ghost | `snare` | -24.5 | - |+| hat | `hat` | -30 | - |+| perc | `hat` | -30 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -188,18 +190,18 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humalight, 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` | 6 | -13 | chip (`pulse`, -4 dB), pluck (`softPluck`, 5 dB), bell (`fmBell`, -2 dB) |-| chords | `vibes` | -2.2 | -21 | - |-| arp | `harp` | 9.3 | -20 | - |-| counter | `celesta` | 10.8 | -18.5 | - |-| bass | `bass` | -4.4 | -18 | tuba (`sub`, -4 dB) |-| kick | `kick` | -1.8 | -15.5 | - |-| snare | `snare` | 6.2 | -20 | - |-| ghost | `snare` | 0 | -26 | - |-| hat | `hat` | 22.3 | -24 | - |-| perc | `hat` | 21.5 | -29.5 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| lead | `marimba` | -13 | chip (`pulse`), pluck (`softPluck`), bell (`fmBell`) |+| chords | `vibes` | -21 | - |+| arp | `harp` | -20 | - |+| counter | `celesta` | -18.5 | - |+| bass | `bass` | -18 | tuba (`sub`) |+| kick | `kick` | -15.5 | - |+| snare | `snare` | -20 | - |+| ghost | `snare` | -26 | - |+| hat | `hat` | -24 | - |+| perc | `hat` | -29.5 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -212,13 +214,13 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humasmall, 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` | 2.9 | -13.5 | celesta (`celesta`, 0 dB), bell (`fmBell`, -4 dB) |-| arp | `musicBox` | -5.1 | -25 | - |-| bass | `musicBox` | -1.7 | -26 | - |-| counter | `bell` | 1 | -19.5 | - |-| chords | `celesta` | -7.7 | -26.5 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| lead | `musicBox` | -13.5 | celesta (`celesta`), bell (`fmBell`) |+| arp | `musicBox` | -25 | - |+| bass | `musicBox` | -26 | - |+| counter | `bell` | -19.5 | - |+| chords | `celesta` | -26.5 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -231,12 +233,12 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humaintimate, 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` | 14.1 | -15 | - |-| chords | `piano` | 17.7 | -23.5 | - |-| bass | `piano` | 6.5 | -24.5 | - |-| counter | `strings` | 4.6 | -30.5 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| lead | `piano` | -15 | - |+| chords | `piano` | -23.5 | - |+| bass | `piano` | -24.5 | - |+| counter | `strings` | -30.5 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -249,16 +251,16 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humahypnotic, 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.1 | -19 | piano (`piano`, -4 dB), pluck (`softPluck`, 3 dB) |-| lead | `marimba` | 5 | -14 | - |-| bass | `marimba` | -5.3 | -24 | - |-| counter | `vibes` | 7.9 | -21 | - |-| chords | `piano` | 10 | -30.1 | - |-| kick | `kick` | -6 | - | - |-| ghost | `snare` | -6 | - | - |-| perc | `hat` | 0 | - | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| arp | `marimba` | -19 | piano (`piano`), pluck (`softPluck`) |+| lead | `marimba` | -14 | - |+| bass | `marimba` | -24 | - |+| counter | `vibes` | -21 | - |+| chords | `piano` | -30.1 | - |+| kick | `kick` | - | - |+| ghost | `snare` | - | - |+| perc | `hat` | - | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -271,17 +273,17 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humaloose, 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` | 14 | -25.5 | - |-| lead | `vibes` | 3.5 | -13 | piano (`piano`, 0 dB), clarinet (`woodwind`, 0 dB), flute (`woodwind`, 0 dB), brass (`brass`, -3 dB) |-| bass | `bass` | -4 | -18 | - |-| counter | `woodwind` | 10.7 | -18.5 | - |-| kick | `kick` | -2.8 | -24.5 | - |-| snare | `snare` | 0 | -26 | - |-| ghost | `snare` | 7 | -24.5 | - |-| hat | `hat` | 26.2 | -23 | - |-| perc | `hat` | 15.5 | -30 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `piano` | -25.5 | - |+| lead | `vibes` | -13 | piano (`piano`), clarinet (`woodwind`), flute (`woodwind`), brass (`brass`) |+| bass | `bass` | -18 | - |+| counter | `woodwind` | -18.5 | - |+| kick | `kick` | -24.5 | - |+| snare | `snare` | -26 | - |+| ghost | `snare` | -24.5 | - |+| hat | `hat` | -23 | - |+| perc | `hat` | -30 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -294,13 +296,13 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humasoft, 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` | 4.7 | -15 | musicBox (`musicBox`, 0 dB), piano (`piano`, 0 dB), flute (`woodwind`, -2 dB) |-| arp | `harp` | 8.4 | -23.5 | - |-| bass | `harp` | 7 | -27 | - |-| counter | `musicBox` | 10 | -21.7 | - |-| chords | `strings` | -8 | -28.5 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| lead | `celesta` | -15 | musicBox (`musicBox`), piano (`piano`), flute (`woodwind`) |+| arp | `harp` | -23.5 | - |+| bass | `harp` | -27 | - |+| counter | `musicBox` | -21.7 | - |+| chords | `strings` | -28.5 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -313,14 +315,14 @@ Stem targets: starting numbers from a neutral test signal (advisory until a huma8-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` | 8.2 | -20 | - |-| bass | `triangle` | 0.3 | -18 | - |-| kick | `noiseDrum` | 7.2 | -17.5 | - |-| snare | `noiseDrum` | 6.7 | -20.5 | - |-| hat | `noiseDrum` | -10 | -28 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| lead | `pulse` | -16 | square (`pulse`) |+| arp | `pulse` | -20 | - |+| bass | `triangle` | -18 | - |+| kick | `noiseDrum` | -17.5 | - |+| snare | `noiseDrum` | -20.5 | - |+| hat | `noiseDrum` | -28 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -333,17 +335,17 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humahazy, 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` | 6.1 | -19.5 | - |-| lead | `ePiano` | 9 | -16.5 | guitar (`guitar`, 2 dB), flute (`woodwind`, -2 dB) |-| bass | `bass` | -1.8 | -19 | - |-| counter | `fmBell` | 12.9 | -20.9 | - |-| kick | `kick` | -5.8 | -17.5 | - |-| snare | `snare` | 2.2 | -21 | - |-| ghost | `snare` | 8.5 | -22 | - |-| hat | `hat` | 12.9 | -32.8 | - |-| perc | `hat` | 4 | -29 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `ePiano` | -19.5 | - |+| lead | `ePiano` | -16.5 | guitar (`guitar`), flute (`woodwind`) |+| bass | `bass` | -19 | - |+| counter | `fmBell` | -20.9 | - |+| kick | `kick` | -17.5 | - |+| snare | `snare` | -21 | - |+| ghost | `snare` | -22 | - |+| hat | `hat` | -32.8 | - |+| perc | `hat` | -29 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -356,17 +358,17 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humabig 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` | 14.7 | -13 | strings (`strings`, 0 dB), horn (`brass`, -2 dB), flute (`woodwind`, -2 dB) |-| chords | `strings` | 0.5 | -19.5 | - |-| arp | `strings` | 4.7 | -21 | - |-| bass | `strings` | 0.4 | -20 | - |-| counter | `choir` | -2 | -23 | flute (`woodwind`, -3 dB), harp (`harp`, 0 dB) |-| perc | `timpani` | 2.9 | -17.5 | - |-| kick | `kick` | -5.6 | -17.5 | - |-| snare | `snare` | 2.3 | -23 | - |-| hat | `hat` | 4 | -32 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| lead | `brass` | -13 | strings (`strings`), horn (`brass`), flute (`woodwind`) |+| chords | `strings` | -19.5 | - |+| arp | `strings` | -21 | - |+| bass | `strings` | -20 | - |+| counter | `choir` | -23 | flute (`woodwind`), harp (`harp`) |+| perc | `timpani` | -17.5 | - |+| kick | `kick` | -17.5 | - |+| snare | `snare` | -23 | - |+| hat | `hat` | -32 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -379,17 +381,17 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humaunsettling, 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.2 | -21.5 | - |-| bass | `sub` | -6 | -20 | - |-| lead | `bowedSolo` | 7.2 | -19.5 | choir (`choir`, -2 dB), cello (`bowedSolo`, 0 dB) |-| counter | `celesta` | 9.5 | -19 | choir (`choir`, -4 dB), bell (`fmBell`, -8 dB) |-| arp | `strings` | 2.9 | -23 | - |-| kick | `kick` | -0.3 | -17.5 | - |-| ghost | `snare` | -4 | -27 | - |-| perc | `timpani` | 6.2 | -18.5 | - |-| hat | `hat` | 0 | -32 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `strings` | -21.5 | - |+| bass | `sub` | -20 | - |+| lead | `bowedSolo` | -19.5 | choir (`choir`), cello (`bowedSolo`) |+| counter | `celesta` | -19 | choir (`choir`), bell (`fmBell`) |+| arp | `strings` | -23 | - |+| kick | `kick` | -17.5 | - |+| ghost | `snare` | -27 | - |+| perc | `timpani` | -18.5 | - |+| hat | `hat` | -32 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -402,17 +404,17 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humalive-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 | `guitar` | 15.5 | -15.5 | strings (`strings`, -6 dB), organ (`organ`, -4 dB), piano (`piano`, -3 dB) |-| lead | `leadSynth` | 9.9 | -16 | guitar (`guitar`, 17 dB) |-| bass | `bass` | -1.3 | -17 | - |-| counter | `organ` | 12 | -27.1 | - |-| kick | `kick` | -1 | -13.5 | - |-| snare | `snare` | 8.8 | -16.5 | - |-| ghost | `snare` | 0 | -26 | - |-| hat | `hat` | 20.4 | -23.5 | - |-| perc | `hat` | 15.7 | -25.5 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `guitar` | -15.5 | strings (`strings`), organ (`organ`), piano (`piano`) |+| lead | `leadSynth` | -16 | guitar (`guitar`) |+| bass | `bass` | -17 | - |+| counter | `organ` | -27.1 | - |+| kick | `kick` | -13.5 | - |+| snare | `snare` | -16.5 | - |+| ghost | `snare` | -26 | - |+| hat | `hat` | -23.5 | - |+| perc | `hat` | -25.5 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -425,17 +427,17 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humahead-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.4 | -15 | - |-| chords | `piano` | 12 | -30.9 | pad (`warmPad`, -3 dB) |-| lead | `softPluck` | 2.9 | -17.5 | bell (`fmBell`, -2 dB), flute (`woodwind`, -2 dB), choir (`choir`, -4 dB) |-| counter | `strings` | 9.6 | -25.5 | - |-| kick | `kick` | -2.7 | -13.5 | - |-| snare | `snare` | 8.7 | -17 | - |-| ghost | `snare` | 0 | -26 | - |-| hat | `hat` | 23.2 | -23 | - |-| perc | `hat` | 17.7 | -29.5 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| bass | `sub` | -15 | - |+| chords | `piano` | -30.9 | pad (`warmPad`) |+| lead | `softPluck` | -17.5 | bell (`fmBell`), flute (`woodwind`), choir (`choir`) |+| counter | `strings` | -25.5 | - |+| kick | `kick` | -13.5 | - |+| snare | `snare` | -17 | - |+| ghost | `snare` | -26 | - |+| hat | `hat` | -23 | - |+| perc | `hat` | -29.5 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -448,18 +450,18 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humaeuphoric, 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` | 6.7 | -20 | pad (`warmPad`, -3 dB), piano (`piano`, -3 dB) |-| bass | `bass` | 0.5 | -16 | - |-| lead | `softPluck` | 4.3 | -16.5 | synth (`leadSynth`, -2 dB) |-| counter | `warmPad` | 7.5 | -23.5 | - |-| arp | `softPluck` | 5 | -22 | - |-| kick | `kick` | 1.3 | -12.5 | - |-| snare | `snare` | 8.8 | -17 | - |-| ghost | `snare` | 1 | -26 | - |-| hat | `hat` | 12 | -26 | - |-| perc | `hat` | 15.1 | -27 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `organ` | -20 | pad (`warmPad`), piano (`piano`) |+| bass | `bass` | -16 | - |+| lead | `softPluck` | -16.5 | synth (`leadSynth`) |+| counter | `warmPad` | -23.5 | - |+| arp | `softPluck` | -22 | - |+| kick | `kick` | -12.5 | - |+| snare | `snare` | -17 | - |+| ghost | `snare` | -26 | - |+| hat | `hat` | -26 | - |+| perc | `hat` | -27 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -472,18 +474,18 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humaneon-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` | -1.1 | -22 | pad (`warmPad`, -2 dB) |-| bass | `bass` | -0.2 | -17 | - |-| lead | `leadSynth` | 11.7 | -16 | brass (`brass`, -2 dB) |-| arp | `softPluck` | 4.2 | -22 | - |-| counter | `fmBell` | 8.7 | -20.5 | - |-| kick | `kick` | 1.2 | -13.5 | - |-| snare | `snare` | 9.3 | -16.5 | - |-| ghost | `snare` | 0 | -26 | - |-| hat | `hat` | 12 | -28 | - |-| perc | `hat` | 13.5 | -29.5 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `strings` | -22 | pad (`warmPad`) |+| bass | `bass` | -17 | - |+| lead | `leadSynth` | -16 | brass (`brass`) |+| arp | `softPluck` | -22 | - |+| counter | `fmBell` | -20.5 | - |+| kick | `kick` | -13.5 | - |+| snare | `snare` | -16.5 | - |+| ghost | `snare` | -26 | - |+| hat | `hat` | -28 | - |+| perc | `hat` | -29.5 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -496,17 +498,17 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humarooted, 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` | 9.5 | -14.5 | pluck (`guitar`, 2 dB), marimba (`marimba`, 1 dB), reed (`woodwind`, 0 dB), bowed (`bowedSolo`, 0 dB) |-| counter | `harp` | 16 | -18.2 | - |-| arp | `guitar` | 12.7 | -20.5 | - |-| chords | `warmPad` | -3.1 | -25.5 | - |-| bass | `sub` | -9.5 | -22 | - |-| kick | `timpani` | -1.5 | -17 | - |-| ghost | `snare` | 10.5 | -20 | - |-| perc | `hat` | 8 | -28 | - |-| hat | `hat` | 6 | -30 | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| lead | `woodwind` | -14.5 | pluck (`guitar`), marimba (`marimba`), reed (`woodwind`), bowed (`bowedSolo`) |+| counter | `harp` | -18.2 | - |+| arp | `guitar` | -20.5 | - |+| chords | `warmPad` | -25.5 | - |+| bass | `sub` | -22 | - |+| kick | `timpani` | -17 | - |+| ghost | `snare` | -20 | - |+| perc | `hat` | -28 | - |+| hat | `hat` | -30 | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).@@ -519,15 +521,15 @@ Stem targets: starting numbers from a neutral test signal (advisory until a humavast, 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.7 | -20 | organ (`organ`, -4 dB), strings (`strings`, -4 dB) |-| lead | `choir` | -3.8 | -17 | bowed (`bowedSolo`, 0 dB), flute (`woodwind`, -2 dB) |-| bass | `organ` | 5.6 | -23 | - |-| counter | `fmBell` | 8.8 | -21.5 | - |-| arp | `harp` | 8 | -23.5 | - |-| perc | `timpani` | 5.2 | -20 | - |-| kick | `timpani` | -6 | - | - |+| Slot | Voice | Stem target dB | Alternates (name, voice) |+|---|---|---|---|+| chords | `choir` | -20 | organ (`organ`), strings (`strings`) |+| lead | `choir` | -17 | bowed (`bowedSolo`), flute (`woodwind`) |+| bass | `organ` | -23 | - |+| counter | `fmBell` | -21.5 | - |+| arp | `harp` | -23.5 | - |+| perc | `timpani` | -20 | - |+| kick | `timpani` | - | - |Stem targets: starting numbers from a neutral test signal (advisory until a human listens).