Watasoge Building Log #6 — Gatekeeper
2026-02-18
Up to this point, the player followed a fixed score. I had specified that melodic sounds would play a C major scale, and percussive sounds would play quarter notes.
The next step therefore logically consists of replacing this hardcoded mechanism with manually triggered gates.
So I instructed Claude Code to add an input module that uses edge-triggered interrupts to determine when a sound is played and for how long.
In response to a question from Claude Code, I also specified that for melodic sounds, the falling edge should determine when the tone ends. For percussive sounds, only the start should be triggered by the rising edge — the tone should then end on its own, regardless of the subsequent falling edge.
As usual, Claude Code first created a plan, and after I approved it, began implementing it.
The result met my expectations on the first try.
The button I'm using to trigger the gate should urgently be debounced, but that's a different topic ;-)
For details visit watasoge on github
