# Re: Centered full-measure rest in 3/4?

```Hi Karen,

We all know that your client's preferred solution is against the rules, but,
if she wants it that way, this is a good exercise. :)```
```
Overriding the MultiMeasureRest stencil is not too easy, because the dots
are a case of their own and generally not used for whole-bar rests at all.

There are two things to be considered:

(1) LilyPond will only use semibreve (or longer) rest symbols, but we want
minim rests in this special case.
Solution: There's a property "usable-duration-logs" containing a list of
allowed duration-log values. We need to add a 1 there (for minim rests). If
we add a 2 and a 3, LilyPond will even use crotchet rests and quaver rests:

\override MultiMeasureRest.usable-duration-logs = #'(-3 -2 -1 0 1 2 3)

(2) We still have a remaining problem: the missing dot. Dots are not a part
of ordinary whole-bar rests, and that's why we have to build our own
stencil.
I've used the standard MultiMeasureRest.stencil and added the standard "dot"
stencil, just shifted up by 0.5 stave units. If you set dot-count to 3, you
will get three dots.

It's a bit inelegant that you'll have to explicitly set the number of dots
you want to have displayed, but, as a result, you can specify any rest you
want as a multi measure rest (whole-bar rest).

Here's a minimal example demonstrating the use of the new custom-mm-rest
stencil, even with dotted crotchet rests just for fun (knowing that they
should not be centered).

%%%%%%%
\version "2.18.2"

#(define (custom-mm-rest grob)
(ly:stencil-combine-at-edge
(ly:multi-measure-rest::print grob) X RIGHT
(ly:stencil-translate-axis (ly:dots::print grob) 0.5 Y) 0))

\new PianoStaff <<
\new Staff \relative {
\time 3/4
<g' b d>2 <d g a>8-. q-. |
<g b d>2 q4 |
c,16 d e f g a b c g e c8 |
\time 3/8
c8 e g |
f d b |
c16 e g f d b |
}
\new Staff \relative {
\time 3/4
\override MultiMeasureRest.stencil = #custom-mm-rest
\override MultiMeasureRest.usable-duration-logs = #'(-3 -2 -1 0 1 2 3
4)
\override MultiMeasureRest.dot-count = #1
R2.*3
\time 3/8
R4.*3
}
>>

In short:
(1) set custom stencil
(2) extending the usable-duration-logs list by adding minim, crotchet,
quaver rests
(3) explicitly set the dot-count to 1 so that a dotted rest symbol will be
printed.
Voilà ! :)

dotted-mm-rests.png
<http://lilypond.1069038.n5.nabble.com/file/t3887/dotted-mm-rests.png>

All the best,
Torsten

--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
```