โ† Streetlight back to all nodes
node ยท 2026-05-27 teach-me documentation

MIDI Harness

Support document for the blog post — the diagram. Code: github.com/jakesimonds/midi-harness

USER plays + talks at the same time hands on MIDI keys voice · Wispr Flow → text listener (Go) daemon, runs all session raw note on/off — no cleanup Claude Code input box append events.jsonl {"t":…,"type":"on","note":60} {"t":…,"type":"off","note":60} one line per key event — noisy next note recreates the file — that's the fresh turn boundary you hit ⏎ hook (Go · UserPromptSubmit) ① read the WHOLE file ② delete it ③ clean up in memory: press/release → chord clusters repeats → ×N · numbers → names ④ emit <played> block ① reads ② deletes 34 raw JSON lines → 3 chord lines Claude prompt = your words + <played> block system prompt: CLAUDE.md · 46 words a conversation about the music, in the terminal what-you-played.html chord cards + finger diagrams no skill, no prompt line — Claude writes it on the spot What You Just Played C → F → Cmaj13 C Major (arpeggiated) 1 3 5 1–3–5 — the home-base hand shape ↻ play more chords, send again

The 34→3 example: a 4-key C-major voicing struck & released 3× (24 on/off events) + a 4-key F voicing (8) + one G4 (2) = 34 JSON lines on disk → C3 G3 C4 E4 x3 / F2 F3 A#3 D4 / G4.

01 · aborted midi-coach

The first, more ambitious attempt. A separate Go repo (~/Documents/midi-coach, originally git github.com/jakesimonds/MCP-Dash-Demo) that tried to interleave two streams at once: MIDI notes and Wispr/whisper voice, tracked by a byte-offset marker (.last-offset) instead of erasing the file each turn.

It was abandoned because the sync broke. The diagnostic (FINDINGS.md, 2026-05-29): the hook's whisper re-transcription regularly covered only the front slice of a dictation, dropping the notes that mattered — a deliberate “here comes a G octave… now a C octave” demo lost both the words and the notes for the actual demo. A played-note turn came back words-only, zero MIDI. Jake's verdict: “Wispr is not working at all and I don't know that it ever has been.”

Lives on only as a pointer in archive/midi-coach. The repo itself was later repurposed into the “blueclaw” project, so its git history no longer reads as a music tool.

02 · shipped midi-harness (the rebuild)

The 2026-05-29 strip-back that produced the current working repo (~/Documents/midi-harness, public at github.com/jakesimonds/midi-harness). It dropped the voice stream and the byte-offset bookkeeping entirely. The one idea the diagram above captures: emptying the log every turn IS the “since last message” boundary — no offset marker, no time window, no second clock, no audio.

46-word CLAUDE.md system prompt. Two pure-stdlib Go binaries (cmd/listener capture, cmd/hook inject + erase), ~0ms hook startup. ~10 real sessions logged 2026-05-30 → 2026-06-01. Claude writes the what-you-played.html chord-card page ad hoc — it is not a skill or a prompt line.

Full current-state notes, the listener start/stop scripts, and the “does the sub-project see streetlight's harness?” answer all live in midi-harness.md.

03 · the point the public blog post

The whole exercise was aimed at a public blog post about the lessons from building a tiny harness — that post is this node's exit condition (it archives once the post is out). Jake reports the post is now made and public.

Published post

LLM is an Instrument

streetlight.jakesimonds.com/llm-is-an-instrument