fix(metronome): pickup-aware accents; remove study count-in (core owns it) - #23
Conversation
…s it) - Map the notation JSON's pickup flag onto alphaTab's isAnacrusis so the model sizes measure 0 by content, not the declared time signature. - Don't accent the pickup's metronome click: it is the tail of an incomplete bar, so the first accent belongs to the first full measure. - Remove the study-mode preroll count-in (toggle, countdown, pause->play edge tracking): core's countdownBeforeSong is the single count-in; making it TS- and pickup-aware is a follow-up core PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: gionnibgud <gionnibgud@gmail.com>
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
Follow-up to #22, from a user report: on a 4/4 piano score that opens with a
pickup measure (two eighth notes), the metronome accents fell on the wrong
beats and the study count-in ran a full bar, so the pickup entered where the
downbeat was expected.
Three changes.
1. The pickup is now in the model. The notation JSON already marks it
(
"pickup": trueon measure 0) and core streams the flag through untouched —_buildScorejust never read it. It now maps onto alphaTab’\sisAnacrusis,so the bar is sized by its content instead of the declared time signature
(verified present in the pinned alphaTab 1.8.2).
2. The metronome no longer accents the pickup’\s click. A pickup is the
tail of an incomplete bar, so the first accent belongs to the first full
measure’\s downbeat. Everything else about the click track is unchanged.
3. The study-mode preroll count-in is removed — toggle, countdown,
pause→playedge tracking (_svWasAudioPaused/_svPrerollResuming), andthe
staffview_prerollkey. Core already owns a count-in(
countdownBeforeSong), and with both enabled they stacked at song start:core counted four, then staffview paused and counted again. One count-in,
owned by core, is the right shape — a plugin-local second one has no way to
stay consistent with it. If someone wants study mode to opt out of the global
count-in, that is a core setting, not a re-added plugin countdown.
Study mode is otherwise untouched: it still gate-pauses and resumes, just
without its own clicks.
Note on the fix this does NOT include
The global count-in is still a hardcoded 4 clicks — it ignores the time
signature (a 3/4 song gets 4) and the pickup. That fix belongs in
feedBack/static/js/count-in.jsand affects every instrument, so it is aseparate core PR rather than something to work around here.
The converter that produced the bad timeline in the first place is fixed in
got-feedBack/feedBack-plugin-musicxml-import#10 — existing packs need a
re-import for the accents to be right.
Testing
npm test— 118/118 pass. Two new cases intests/metronome.test.js(pickup: first accent lands on bar 1, not the pickup; no pickup: first-beat
accent unchanged); the count-in cases are removed with the feature.
Branch note
Rebuilt on current
mainrather than continuingfeat/metronome, whichbranched before #21 merged — continuing it would have reverted the
bass-only-cursor fix.
🤖 Generated with Claude Code