Skip to content

Fix #23216, #20709: Let the custom tuplet dialog use the selected duration as the subdivision - #35458

Draft
davidstephengrant wants to merge 3 commits into
musescore:mainfrom
davidstephengrant:dsg-tuplet-dialog-note-value
Draft

davidstephengrant wants to merge 3 commits into
musescore:mainfrom
davidstephengrant:dsg-tuplet-dialog-note-value

Conversation

@davidstephengrant

@davidstephengrant davidstephengrant commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • Subdivision (new, the option the dialog opens with): each note of the tuplet has the selected duration, and the tuplet replaces the notes and rests in its time. An existing tuplet it only partly covers is replaced whole, its remaining time filled with rests, as when note input overwrites a tuplet. With a quarter selected, 3:2 gives 3 quarters in the time of 2.
  • Tuplet length (the current behaviour in main): with a quarter selected, 3:2 gives 3 eighths in the time of a quarter.
pr2-dialog-after
  • With Subdivision, a full-measure rest is left as it is, since it has no duration to use as the subdivision; Tuplet length still divides it.
  • In a range or a list, the notes and rests are taken in order on each staff: one that an earlier tuplet replaces gets no tuplet of its own, and one whose tuplet would cross a barline or the end of an enclosing tuplet is left as it is. So a measure of four quarters gives two quarter-note triplets. Only if no tuplet fits is a message shown, and then nothing changes. When tuplets are added, the range extends to the end of the longest new tuplet.
  • The existing "Note value is too short" message, which was shown in an error box, now appears like the other editing messages, with "Don't show this again".

The tuplet command takes a new selected-duration-as argument (subdivision or tuplet-length); without it, the command divides as before.

See also #18980.

Assisted by Claude Code 2.1.310 (Claude Opus 5.5)

@davidstephengrant davidstephengrant added the needs design approval Feature/change requests that need a go/no-go from the design team before being worked on label Oct 30, 2026
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
davidstephengrant force-pushed the dsg-tuplet-dialog-note-value branch from 7fc0f85 to 7ba3e0f Compare October 31, 2026 10:13

This branch has not been deployed

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

Labels

needs design approval Feature/change requests that need a go/no-go from the design team before being worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two tuplet entry modes More style options for large n-tuplets

1 participant