Repository navigation
Fix #23216, #20709: Let the custom tuplet dialog use the selected duration as the subdivision - #35458
Draft
davidstephengrant wants to merge 3 commits into
Draft
davidstephengrant wants to merge 3 commits into
davidstephengrant wants to merge 3 commits into
Conversation
The tuplet commands divided the selected duration by the ratio: 3:2 with a quarter gave 3 eighths in the time of a quarter. Add TupletOptions::selectedDurationAs, with the new TupletSelectedDuration: SUBDIVISION uses the selected duration as the tuplet's subdivision: 3:2 with a quarter gives 3 quarters in the time of 2; TUPLET_LENGTH (the default) divides it as before. The selected chords/rests are taken in score order, per track: one that an earlier tuplet replaces gets none, and one whose tuplet would cross a barline or the end of an enclosing tuplet is left as it is, as is a measure rest, which has no duration to use as the subdivision. If no tuplet fits, nothing changes and a message shows, as other editing commands do (a new MsError value). A range grows to the end of the tuplets. Nothing sets the option yet. EditTuplet::addTuplets() takes the option, and the new EditTuplet::checkAddTupletsWithSelectedDurations() checks the selection first. Add Score::tupletEndTick() and a Score::canAddTuplet() overload that takes a segment and track (for an empty voice in note input); both use the existing canAddTuplet()'s calculation. Assisted-by: Claude Code 2.1.290 (Claude Opus 5.5)
…ration as the subdivision Add > Tuplets > Other… always divided the selected duration by the ratio, so tuplets such as 3 quarters in the time of 5 couldn't be created from it. Add "Use selected duration as" to the dialog, with "Subdivision" (each note of the tuplet has the selected duration) and "Tuplet length" (the old behaviour). The dialog opens with Subdivision. It passes the choice to the add-tuplet command in a new selected-duration-as argument (subdivision or tuplet-length); without it, the command divides as before. Assisted-by: Claude Code 2.1.287 (Claude Opus 5.5)
The tuplet commands showed "Note value is too short" in an error box from NotationActionController, while the other "Cannot create tuplet" messages are editing messages (MsError). Make it MsError::TUPLET_NOTE_VALUE_TOO_SHORT, checked where the tuplet is added, for the selection and in note input. It now shows like the others, with "Don't show this again". Assisted-by: Claude Code 2.1.290 (Claude Opus 5.5)
davidstephengrant
force-pushed
the
dsg-tuplet-dialog-note-value
branch
from
October 31, 2026 10:13
7fc0f85 to
7ba3e0f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #23216
Resolves: #20709
Add › Tuplets › Other… always divided the selected duration by the ratio, so tuplets such as 3 quarters in the time of 5 couldn't be created from the dialog.
The dialog now has "Use selected duration as:" with two options:
The tuplet command takes a new
selected-duration-asargument (subdivisionortuplet-length); without it, the command divides as before.See also #18980.
Assisted by Claude Code 2.1.310 (Claude Opus 5.5)