Show HN: Web app to practice piano from a MIDI file
An app that waits for your next note is a state machine, and so is every branching story. States, transitions and outcome flags decide pacing, and each extra branch quietly charges a writing and testing bill.
A small app that plays a MIDI file and waits for your fingers is doing something narratively interesting. It holds a state, watches for a transition, and answers with feedback. Strip the piano away and a branching story runs the identical loop.
MIDI files help here because they store events rather than sound: which key, how hard, how long. That makes them cheap to check against, and checking an input against an expected sequence is exactly what both practice tools and story engines do all day.
The machine under the story
Every interactive narrative is a graph of states with arrows between them. A state is a promise the story currently keeps; a transition is the player action that swaps one promise for another. Outcome flags mark where the graph terminates.
The same loop drives the practice app: idle, waiting, note played, match or miss, back to waiting. Name the states out loud and any interactive design becomes debuggable, because you can finally see which transitions exist and which are missing.
The vocabulary sounds dry until you use it once. When an interactive scene feels broken, the cause is almost always a missing transition: a state the story entered with no way out, leaving the audience stranded.
Pacing is transition design
Readers feel pacing as the distance between meaningful transitions. Too many states in a row with no player input reads as a lecture; too many choices with no settled state reads as noise. Strong interactive writing alternates between the two.
Budget the beats the way an editor budgets scenes. A decision should arrive when the previous state has paid off, not before. If two transitions lead to nearly the same state, cut one and spend the effort elsewhere.
What each branch costs
Branching is expensive in a quiet way. Every added path needs drafting, testing and maintenance, and the bill compounds as paths multiply. Teams therefore budget worldbuilding like a portfolio: few deep branches, many shallow textures.
Shallow texture is description that changes no state, and it is cheap. Deep branches change which outcomes exist, and they are dear. Skilled creators spend on depth where players actually look and suggest breadth everywhere else.
A useful test before adding any branch: write the new outcome in one line. If the line restates an existing ending with different furniture, it is texture, not depth, and it does not deserve a path.
| Story device | What it costs | Why creators use it |
|---|---|---|
| Branching choice | A written and tested path per option | Players feel real agency |
| State tracking | Memory of every promise made | Payoffs land without contradiction |
| Idle beat | Minutes with no new state | Tension needs a trough to register |
| Checkpoint | A save state to build and place | Failure stops feeling punitive |
| Ending flag | One more authored outcome | Choices feel like they mattered |
Drop in your PDF - it doesn't leave your device.
Every miss becomes a red node on your map.
Free plan: 21 nodes, no card, no countdown.
Key takeaways
- Interactive stories and practice apps share one mechanism: states, transitions and flags.
- MIDI files store events, which makes them ideal for note-by-note checking.
- Pacing is the spacing between meaningful transitions.
- Deep branches are dear; shallow texture is cheap.
- Naming states out loud makes any interactive design debuggable.
Quick answers
What is a state machine in storytelling?
A graph of story states connected by transitions, where player actions decide which arrow fires next.
Why are MIDI files convenient for practice apps?
They store note events instead of audio, so the app can compare each note against an expected sequence.
Why does branching get expensive fast?
Every path needs drafting and testing, and the maintenance bill compounds as paths multiply.
What is the difference between depth and breadth in stories?
Depth changes which outcomes exist, while breadth adds texture without altering the state graph.
Take a story you love and sketch its first three states and the transitions between them on paper. Mark where you would have branched, then price the extra path honestly.
Cite this guide
Brain — try4ever. (2026, December 1). Show HN: Web app to practice piano from a MIDI file. Brain Blog, try4ever.com. Retrieved November 30, 2026, from https://www.try4ever.com/blog/show-hn-web-app-to-practice-piano-from-a-midi-f-story-machines/"Show HN: Web app to practice piano from a MIDI file." Brain Blog, try4ever, 1 Dec. 2026, www.try4ever.com/blog/show-hn-web-app-to-practice-piano-from-a-midi-f-story-machines/. Accessed 30 Nov. 2026.Brain — try4ever. "Show HN: Web app to practice piano from a MIDI file." Brain Blog, try4ever.com, December 1, 2026. https://www.try4ever.com/blog/show-hn-web-app-to-practice-piano-from-a-midi-f-story-machines/.@misc{brain2026show-hn-web-app-to-practice-piano-from-a-midi-f-story-machines,
author = {{Brain — try4ever}},
title = {Show HN: Web app to practice piano from a MIDI file},
year = {2026},
howpublished = {\url{https://www.try4ever.com/blog/show-hn-web-app-to-practice-piano-from-a-midi-f-story-machines/}},
note = {Brain Blog, try4ever.com; published 2026-12-01}
}Link to this guide
<a href="https://www.try4ever.com/blog/show-hn-web-app-to-practice-piano-from-a-midi-f-story-machines/">Show HN: Web app to practice piano from a MIDI file</a> — Brain, try4ever.com[Show HN: Web app to practice piano from a MIDI file](https://www.try4ever.com/blog/show-hn-web-app-to-practice-piano-from-a-midi-f-story-machines/) — Brain, try4ever.comReproducing a paragraph elsewhere? Keep the source line that appears when you copy it — that citation is what search engines and AI assistants credit back to this page.