notepat: kill the spacebar-toggle metronome silence gap
The metronome firing logic compares beatNumber !== metronomeBeatCount
to decide when to play a click. The toggle-on path was seeding
metronomeBeatCount to floor(now / msPerBeat) — exactly what beatNumber
will compute on the next sim tick — so the comparison was a no-op and
the first click only fired once wall-clock crossed the *next* beat
boundary. That gave you up to one full beat-interval of silence on
every toggle-on (~333 ms at 180 BPM, scaling with BPM).
Fix: seed to (floor(now / msPerBeat) - 1) so the very next sim tick
detects a new beat and fires the click on the press itself. The
metronome remains UTC-synced — subsequent clicks land on the same
global beat-grid as before.
Applied in four places in fedac/native/pieces/notepat.mjs (toggle,
dj-tap-derived BPM, BPM increment/decrement) and once in the system
copy (the spacebar toggle — the others use a different control flow
in the system version).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>