Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

pop/storyboard: bare-token scores parse correctly (weight optional)

storyboard.mjs's regex required *N on every score token, so mary.np
(bare lyrics with weight only on the final held syllable) collapsed
to a single slide instead of one-per-syllable. Made weight optional
(defaults to 1 beat) to match folk_backing.py's parser. mary now
generates 117 slides cleanly across all 4 verses + chick-chick-boom.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+6 -3
+6 -3
pop/bin/storyboard.mjs
··· 86 86 if (line.startsWith("#")) continue; 87 87 if (/^[a-z]+ \d/i.test(line)) break; // next section header 88 88 for (const tok of line.split(/\s+/)) { 89 - // Match note:syllable*weight, where note is something like D3, G#3, Eb4 90 - const m = tok.match(/^([A-Ga-g][#b]?-?\d):(.+?)\*(\d+(?:\.\d+)?)$/); 89 + // Match note:syllable[*weight] — weight is optional, defaults to 1 90 + // beat. Aligns with folk_backing.py's parser; otherwise scores 91 + // like mary.np (bare tokens, only the held final syllable carries 92 + // *N) collapse to a single slide instead of one-per-syllable. 93 + const m = tok.match(/^([A-Ga-g][#b]?-?\d):(.+?)(?:\*(\d+(?:\.\d+)?))?$/); 91 94 if (!m) continue; 92 95 syllables.push({ 93 96 note: m[1], 94 97 raw: m[2], 95 - weight: Number(m[3]), 98 + weight: Number(m[3] ?? 1), 96 99 }); 97 100 } 98 101 }