Combine rests in MS3.7

• May 8, 2025 - 22:41

Is there a quick way to combine these voice 1 rests into their simplest format?

rests.png

I had a look at Regroup Rhythms but it comes with a warning that it might delete elements from the score.


Comments

It looks like the rests are in Voice 1 and the notes in Voice 2. Tools / Voices / Exchange voice 1-2??? And then delete the rests from Voice 2??? (Pure WAG :-)

It appears that the notes and rests are in separate voices.

In a case like this you could:

  • select the initial 8th rest
  • press w, which doubles its face value to a 1/4 rest
  • press w again and you'll have a 1/2 rest
  • press w again and you have a whole note rest, which is the simplest form for these measures.

Ideally there would also be a command that transforms rests (within the current selection) to your choice of:

  • the longest possible rests allowed
  • whole measure rests (or whole note rests)
  • rests of a certain face value
  • rests with a duration equal to a fraction of a measure:
      a half measure
      a third of a measure, say for a 9/8 meter
      a quarter measure, for 12/8 ...

... unfortunately I don't know of a command that provides this function.

Alternately, in pursuit of transforming rests without the need to individually select a target rest

I thought of using the Right-click>Select>More to find rests by position. In your case, you could have the More filter select the first rest in all measures in a particular voice. Then press w thrice (or just press 7, Jojo suggested below) and you'd be done.

BUT it appears w and (its inverse counterpart) q don't work on multiple notes or rests within a List Selection. I've recently encountered this a number of times and have meant to post a request that q and w operate on List selected notes and rests!

Then there's the remaining much larger issue of automatically resolving rests in a manner appropriate for the meter at hand.

In reply to by scorster

Just one step: Select the initial 8th rest (list selection possible), press 7 (when in a 4/4 time sig or compatible) and you have a whole rest.

And once you have a whole rest (or the single rest of the measure's duration), Shift+Ctrl+Del turns it into a measure rest (looking like a whole rest, but being centered to the measure)
I don't think you really want a whole rest, but a measure rest.

Or, probably easiest, select the initial 8th rest, press Shift+Ctrl+Del (doesn't work for a list selection though) and you have a measure rest right away (I just now found that out myself)

In reply to by Jojo-Schmitz

This worked pretty well but I need to generalise it to different numbers of 1/8 rests: the combine could be anywhere from 2 to 8 such rests so my example was a bit oversimplified. I also need to code the method into a plugin.

In other scores there may be 1/32 or 1/16 rests as well as (or instead of) 1/8 rests so I am looking for a generally applicable technique.

I think that your method has potential for being coded.

In reply to by scorster

Re: "Ideally there would also be a command that transforms rests (within the current selection) to your choice"

Yes, this is what I really need. I should've included more measures since they are not always simple whole measures of rests but sometimes can combine to 1/4, sometimes dotted 1/4, sometimes, 1/2, sometimes a dotted half, and sometimes, (as per example posted), a whole note rest.

The meter as hand won't matter since these measures will be hidden and are for playback only, (TAB Ring emulation in MS4), but automating the process (plugin code) will need to be possible.

In reply to by msfp

So, the note commands also work with rests? I should therfore be able to process the rests and pad-note them to the required duration, optimising it by using each necessary pad-note duration only once, (by selecting all rests which can be combined to that same duration).

Maybe I should just leave them since they're not going to be seen! (It just feels a bit shoddy.)

In reply to by Jojo-Schmitz

I may have misunderstood what you need but pressing 7 with a rest selected turns it into a whole rest. If you are not on the first eighth note of a 4/4 measure (or equivalent) that will carry over into the next measure, just like entering a whole note would. My understanding of what you are asking for is NOT that.

For example, if I have 5 eighth notes worth of notes, then three eighth note of rest, if I select that 6th eighth note and press "7", it turns the three eighth rests into a dotted quarter rest, but it also turns the first five notes of the next measure (the remainder of the whole note) into a half rest and an eighth rest.

In reply to by TheHutch

Your understanding is correct.
Each rest needs to be combined to be as long as possible without crossing into the next measure.
Here are some more examples, showing Before combining and After combining.

rests2.png

Other examples could also include a mixture of 1/8, 1/16 and 1/32 rests.
I'm looking for a simple solution which fits each scenario and can be automated in a plugin.

[Update] The rests will always start on the first beat of the measure.

In reply to by yonah_ag

Okay, then in ALL your examples above, hitting "7" with the first rest selected will replace them with a whole note rest (not, I think, a "whole measure" rest). I'm pretty sure that's NOT what you want.

Can you count the number of rests to be combined and simply have a table to replace them? E.g. two rests means replace them with quarter rest; six, dotted half; seven, double-dotted half rest.

In reply to by TheHutch

I think that's the way to go but it's more complicated than just counting them. It will depend on the rests as to how to combine them.

For example, a 1/16 rest followed by a 1/8 rest followed by a 1/16 rest would be replaced by a 1/4 rest, not by a dotted 3 x 1/16 rests, (= dotted 1/8 rest), which would be the result of counting.

In reply to by yonah_ag

>> Can you count the number of rests to be combined and simply have a table to replace them? E.g. two rests means replace them with quarter rest; six, dotted half; seven, double-dotted half rest.

yonah_ag replied to TheHutch

> I think that's the way to go but it's more complicated than just counting them. It will depend on the rests as to how to combine them.

Not sure I'm If I'm thinking coherently yet this morning ... and perhaps I'm pointlessly spitballing without yet fully understanding the need at hand, but here goes:

When a whole note rest or whole measure rest are not the desired result:

       • rests could combine/resolve to the meter's beaming rule, which can be user defined.

  — or —

       • first try to split of a measure into just two equal duration rest symbols
       • If that fails see try to split the measure into three equal rest durations
       • If that fails and there are no other subdivisions worth considering then set the rest length to the length of the beat (i.e. the lower number in the time signature, under 1.)

In reply to by scorster

Sounds easy in theory but this needs to be translated into MuseScore's internal workings: stave numbers, track numbers, segments, element type, tick position and duration.

I like the idea of combining to the beat length. This would be meter independent and easy enough to implement. The processing would step through voice 1 of the stave, looking for a rest, (1/32, 1/16, 1/8), then step through stave segments to see if a contiguous number of rests can be found which would sum to a beat. Finding a note or end of measure would break the contiguous chain.

Do you still have an unanswered question? Please log in first to post your question.