musescore / musescore/MuseScore

Incorrect duration ratio for a duplet taking up odd number of beats (e.g. 5 or 7)

Open
#28,130 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

engraving needs design
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Issue type

Engraving bug (incorrect score rendering)

Description with steps to reproduce

The duration multiplier for duplet notes is incorrect. Basically, it yields 2:x total duplet duration is x/y (as irreducible fraction). Because of this, duplets taking up full measure in 5/8 time, will consist of two quavers (8ths), having ratio of 2:5, which is bizzare. I would expect to see two crochets (4ths) and 4:5. Generally, the ratio should be between 1/2 and 1.

A real-world example of music like this would be movt. 4 of Ravel's String Quartet. I believe all score editions you'll find would show crochets in duplets that take up 5/8 measure.

Supporting files, videos and screenshots
Image

IMSLP01617-Ravel_-String_Quartet(Score).pdf

What is the latest version of MuseScore Studio where this issue is present?

4.5.2

Regression

No.

Operating system

macOS 15, I believe it occurs on all platforms

Additional context

I guess this is the code responsible for tuplet creation:
https://github.com/musescore/MuseScore/blob/42be6134ece0731eb46865ac73edd90e3fca0e91/src/notation/internal/notationnoteinput.cpp#L686

Perhaps it shouldn't try to compute just denominator, but the ratio itself. I'm happy to make a patch myself, looks straightforward, but I'm not 100% sure that I'm not missing anything.

Checklist
  • This report follows the guidelines for reporting bugs and issues
  • I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
  • I have attached all requested files and information to this report
  • I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/notation/internal/notationnoteinput.cpp around line 686, the code path identified for tuplet creation. Reproduce a duplet filling an odd-beat measure such as 5/8 and compare its displayed note durations and ratio with the expected 4:5-style result. Done means the duration ratio is correct for odd-beat cases without regressing other tuplets.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.