Positioning multi-measure rests
Unlike ordinary rests, there is no predefined command to change the staff position of a multi-measure rest symbol of either form by attaching it to a note. However, multi-measure rests in odd-numbered and even-numbered voices are vertically separated in polyphonic music.
This snippet shows how positioning of multi-measure rests can be controlled.
\version "2.24"
\relative c'' {
% Multi-measure rests by default are set under the fourth line.
R1
% They can be moved using an override or tweak.
\tweak staff-position -2 R1
\tweak staff-position 0 R1
\tweak staff-position 2 R1
\override MultiMeasureRest.staff-position = 3 R1
\override MultiMeasureRest.staff-position = 6 R1
\revert MultiMeasureRest.staff-position
\break
% Odd-numbered voices are under the top line.
<< { R1 } \\ { a1 } >>
% Even-numbered voices are under the bottom line.
<< { a1 } \\ { R1 } >>
% Multi-measure rests in both voices remain separate.
<< { R1 } \\ { R1 } >>
% Separating multi-measure rests in more than two voices
% requires an override or tweak.
<< { R1 } \\ { R1 } \\ { \tweak staff-position -2 R1 } >>
% Using compressed bars in multiple voices requires another override
% in all voices to avoid multiple instances being printed.
\compressMMRests
<<
\revert MultiMeasureRest.direction
{ R1*3 } \\
\revert MultiMeasureRest.direction
{ R1*3 }
>>
}