Skip to content

fix: increase tickDenominator to 60480 for correct tuplet resolution#129

Open
KelvinCreighton wants to merge 1 commit into
jimutt:masterfrom
KelvinCreighton:fix/tick-denominator
Open

fix: increase tickDenominator to 60480 for correct tuplet resolution#129
KelvinCreighton wants to merge 1 commit into
jimutt:masterfrom
KelvinCreighton:fix/tick-denominator

Conversation

@KelvinCreighton
Copy link
Copy Markdown

@KelvinCreighton KelvinCreighton commented Mar 4, 2026

Problem

The previous tickDenominator of 1024 (2^10) only guaranteed clean division
for regular notes. Tuplets such as triplets, quintuplets, and septuplets
produce RealValue denominators that don't divide evenly into 1024, causing
floating point tick positions and scheduling drift most noticeably with
16th note triplets and other edge cases.

Fix

Changed tickDenominator from 1024 to 60480.

60480 = 2^6 × 3^3 × 5 × 7

  • 2^6 = 64: supports regular notes down to 64th notes
  • 3^3 = 27: supports triplets, including triple-nested triplets
  • 5: supports quintuplets
  • 7: supports septuplets

This ensures all common tuplet RealValues divide evenly into the tick
grid, eliminating rounding errors in tick position calculation.

Trade-off

2^6 vs the previous 2^10 means lower binary resolution, but 64th note
precision is more than sufficient for any practical score.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant