musescore / musescore/MuseScore
Expand staff options for rests
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Your idea
Allow the default position of rests to be modified in the advanced staff options. These changes would be reflected in the preview pane on that window.
Problem to be solved
Control over the default positioning of rests is very limited, and covering all the scenarios in code is impractical. It should specified in data instead. The change I imagine would add 4 default rest line number values (integers). There would be a setting for
- breve rests
- whole rests
- half rests
- other rests
I believe longa and maxima rests would be covered by the "other" category, but in any case I have not seen much (if any) support in MuseScore for longa and maxima rests. (Nor do I personally care enough about them to advocate any special treatment for them.)
Some good examples of why this change is needed can be found in the Orff Schulwerk publications of Schott. Here are a couple of examples:
Stampfen und Klatschen 54
Dance 31
If this feature were to be implemented, it would also solve #25246.
Prior art
Finale provides these options when you specify "Other" for the Staff in the Score Manager window.
If you think about the values in Finale's window, you'll realize that Finale allows rests to be placed on a line or a space. I'm not sure whether MuseScore allows this. To properly implement this feature for Orff Schulwerk situations, one would need to be able to specify the rest on a space. Perhaps this could be an offset value from the line as fractional value in spatium units. Even without this added feature, just being able to specify the line would be useful.
Additional context
The implementation of this feature appears to be quite simple and low-risk (aside from a potential spatium offset). My suggestion of a design would be:
- Add the values to
StaffTypeand set each of the canned staff types with appropriate default values. - Copy the
StaffTypevalues to theStaffwhen it is created. - Rewrite
Rest::computeNaturalLineto use the values fromStaffrather than the naive calculation that is there now. - Rewrite
Rest::computeWholeRestOffsetnot to offset beyond what other voices require and include breve rests or (possibly) eliminateRest::computeWholeRestOffsetand offset whole (and breve) rests with the same code that floats all other rests in the presence of voices. I haven't analyzed this aspect much yet.
Probably the most troublesome part of this would be adding the UI to the advanced staff properties.
Checklist
- This request follows the guidelines for reporting issues
- I have verified that this feature request has not been logged before, by searching the issue tracker for similar requests
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading StaffType and Staff, then inspect Rest::computeNaturalLine and Rest::computeWholeRestOffset to understand current rest positioning. Review the advanced staff properties entry point and its preview behavior; done means configurable defaults for breve, whole, half, and other rests are copied to staffs and reflected in the preview and rest layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100