notepat: top bar flush-to-top, wave-from-needle, press feedback, shift outline
Batch of notepat UX fixes from live-test feedback:
1. Top bar flush to top
Status text (notepat.com / MIDI / vol / FPS / time / battery) now
sits at y=3 instead of y=22. topBarH reduced 54→34 so the strip
hugs the top edge tightly and gives the pad grid + wave strip back
18-20 px of vertical space. QR code stays at (2,2) scale=1 (25×25
px) — it lives under the top-row text now.
2. Waveform emerges from the NEEDLE, not the right edge
drawStrip now renders only the LEFT HALF (pixels 0..needle_off) of
the strip. Newest sample lands immediately left of the needle, old
samples extend leftward into the past. Right of the needle stays
empty (background only). This matches the user's mental model of
"the needle is where audio is being generated from" — new tones
visibly emit from the red needle rather than appearing at the far
right edge of the screen.
3. Needle press feedback
When a note is actively playing or was pressed within the last
~18 frames, the JS overlay draws a second needle in GREEN on top
of the C-rendered red needle, with:
- ±1 px horizontal shake (phase-locked to frame so it reads as
vibration, not noise)
- 15 Hz blink (alternates 255/140 brightness every 2 frames)
- Alpha fade over ~25 frames after release so a quick tap still
flashes cleanly
Lets the player see "yes, my keypress is generating the audio
you see writing to the strip."
4. Shift = GLOBAL alternate-mode, not just a "harp→pluck" rename
Removed the per-button label swap that flipped "harp" → "pluck"
while Shift was held. Instead, a pulsing amber outline is drawn
around the entire screen (top/bottom/left/right 2-px bars) while
shiftHeld is true. This makes the alternate-sound mode obvious
regardless of which instrument is loaded, matches the existing
per-kit Shift behavior (velocity boost, harp short-pluck, etc.),
and leaves room to add more per-instrument alternates (whistle
→ breathy blow, sine → octave-doubled, etc.) without having to
rename individual wave buttons for each.
Known deferred follow-ups:
- Per-instrument Shift alternate sounds (whistle→blow etc.)
- 'z' / side-key mapping on upper-octave drum kit
- Auxiliary-key legend overlay
- Dropping the 'noise' voice from the sampler
- Tiny aux-pad UI showing hotkeys + tones for both octaves
These are tracked; rolling them into subsequent commits.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>