Skip to content

fix swapped tuplet-actual and tuplet-normal guesses in TupletReader #440

Description

@webern

TupletReader fills in a missing <tuplet-actual> or <tuplet-normal> from <time-modification>,
but each guess function writes the other side's number
(src/private/mx/impl/TupletReader.cpp:118-160):

  • guessNormalFromNote sets actualNumber from actual-notes.
  • guessActualFromNote sets normalNumber from normal-notes.

When both elements are absent, the two mistakes cancel out. When only one is present, its explicit
tuplet-number is overwritten and the absent side is never guessed. For example,
<tuplet-actual><tuplet-number>5</tuplet-number></tuplet-actual> on a note with
<actual-notes>3</actual-notes> reads as actualNumber == 3, and normalNumber keeps its default.

guessActualFromNote also takes actualDurationName from normal-type.

Related: #428, #434. Found while auditing silent recoveries for #432 (#439).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiIssues opened by, or through, a coding agent.bugsoftware defectimplAffects the mx::impl layernon-breakingfixes or implementation that do not require breaking changes

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions