A stinger has to start on the next beat or bar of the song that is
playing, not whenever the frame happens to run. Play sound, Play note
and Play pattern now take the number of a song or pattern playback and
plan their start on the audio clock, as the music is heard.
- New inputs sync (a playback number) and quantize (Next bar by
default, decision 6) on Play sound, Play note and Play pattern.
- The landing is worked out in Playbacks (landOn), on the next beat,
bar or marker of the playback as it is heard. SoundLibrary and the
audio switch only pass it on, and only on the clock the stinger
plays on.
- A pattern with sync plays in the tempo of the playback. It takes its
bake only when both tempos match.
- Without a link, or when the playback is not heard, the node starts
at once as before.
- The sync ports live in their own module musicSync.ts. Putting them
in songSync.ts would have made an import cycle through Play song.
Tests:
- Unit: 8 new (6 in song-play, 1 each in sound-library and
audio-switch), all green.
- Counter-probes: 12 bends, all red.
- e2e 65 on atx: ALL PASSED, 74 checks. New 65k4: the pattern (own
tempo 100) started exactly 8 beats after the song and played at the
song's 120 BPM. Without sync it is red (6.2 beats, 100 BPM).
- Gate on atx: CHECK EXIT 0, 334 files, 5152 tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>