Signature Tune: a paper card that plays a song made from your own words
I wrote this post as part of the Kiroween 2026 hackathon. My entry is Signature Tune, in the Frankenstein category, and I built it with Kiro. What it is Signature Tune turns an ordinary piece of paper into a
I wrote this post as part of the Kiroween 2026 hackathon. My entry is Signature Tune, in the Frankenstein category, and I built it with Kiro.
What it is
Signature Tune turns an ordinary piece of paper into a musical greeting. You type a name and hear the melody that belongs to that name. You add an optional message and a sender line, then print a card. The card carries a scan code. The person who gets it scans the card, the player opens in their browser, and they tap Play. They hear the melody, and then the message appears one character at a time, each character landing with its own note.
The greeting travels inside the card link. There is no account, no installation and no message database.
The problem
Ordinary greetings are easy to send and easy to forget. I wanted a birthday wish, a thank you or a plain I love you to become something a person can hold, scan, hear and keep. Turning a name into notes is not new. The interesting part is giving that melody a physical form that someone else can open and play.
Why it is a Frankenstein
It joins five small machines into one object:
- A reversible letter to note cipher.
- A browser music box.
- A printable stationery card.
- A machine readable scan code.
- A web link that carries the card data.
On the judges page the five parts are drawn joined by a gilded thread, because the whole thing is dressed as a royal invitation from Versailles: ivory paper, gold frames and a wax seal.
Every letter maps to a note the same way every time. One note event per character:
export function encode(text) {
const events = [];
for (const ch of text) {
const slot = slotForCodePoint(ch);
events.push(noteEventFromSlot(slot, ch));
}
return events;
}
For A to Z the cipher runs backwards too. decodeNotes reads the letters back from pitch and duration alone, with no stored characters, and refuses any slot that has no letter:
for (const pair of pairs) {
const slot = slotForPair(pair);
const ch = SLOT_TO_CHAR[slot];
if (ch === null || ch === undefined) {
throw new Error(`decodeNotes: slot ${slot} has no canonical character`);
}
Emoji and other writing systems still get notes, but they cannot always be read back from sound. The full text is always kept in the card link, so nothing is lost.
How I used Kiro
I worked steering first and spec driven, in 31 recorded Kiro CLI sessions on December 4. Every session id is listed in KIRO.md.
Steering. Six files in .kiro/steering set the rules before any code: product.md, tech.md (a static site with no framework, no backend and the Node built in test runner), structure.md, brand.md, privacy.md and copy.md. They were always in context, so every session worked to the same rules. The brand file is the reason the app looks like a palace invitation. It says in plain words: no pixel fonts, no neon, no dark screens.
Spec. .kiro/specs/signature-tune has requirements.md with EARS acceptance criteria R1 to R20, design.md with the cipher, the data model, the song form and correctness properties P1 to P12, and tasks.md, where each task points to the requirements it covers. There is also requirements-analysis.md, where Kiro walked the requirements for ambiguity and conflict and gave each finding a testable form. A session only ticked a task after its checks passed.
Hooks. Three hooks in .kiro/hooks. Correctness Check runs the fast correctness tests when a source or test file is saved. Public Copy Check runs a checker over the public files that flags dashes, visible escaped line breaks, colours outside the palette, author metadata that is not mine, and misuse of a trademarked name. Spec Alignment Review is an agent hook that checks each turn against the spec and the steering. The run log in evidence/hook-runs.log now holds 391 Public Copy Check runs and 160 Correctness Check runs. During the palace rework the copy hook failed on an off palette colour in the wax seal shading, and the log shows the fix land a few minutes later.
Tests. npm test reports 243 tests passing and 0 failing. The serialization, capacity, decoding, playback, full song and note decoding properties each run 200 seeded cases plus fixed regression cases, and each prints its seed so a run repeats exactly. A fresh seed run once built a name made only of spaces, which no hand written case had tried. It was a generator bug, and the fix makes every generated name hold at least one real character.
What was hard
Sound without samples. All audio is made in code. A pure arranger turns a card into a short song (intro, the name as a motif, the message as a verse, the sender line, a refrain and a cadence) and a synthesis module renders it. Two sound passes used measurements of the render, such as peak level, clipping, clicks and spectrum, to retune the voices.
A green CI that ran nothing. Until session 14 the workflow passed a quoted test glob that the Node 20 runner did not expand, and a pipe hid the failure. Those green runs ran zero tests. Now it runs on Node 22 with an explicit file list, set -o pipefail and a guard that fails the job when no tests run.
A hook that never fired. The Correctness Check matcher was anchored wrong for most of the build, so it only ran 7 times in the main build. Once that was fixed it fired on every source save.
Card widths. Width tests passed while real capitals still overflowed the card, because the tests used the same guessed letter widths as the code. Session 19 switched them to real measured font widths.
Try it
- Live app: https://alenza.dev/signature-tune/?v=1a87b24
- Devpost: https://devpost.com/software/signature-tune
- Video: https://youtu.be/3qa7F3RAZX4
- Code: https://github.com/ALENZACODES/signature-tune
John Khan, Toronto, Ontario
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.