1.2.2 Writing rests

Rests are entered as part of the music in music expressions.


Rests

Rests are entered like notes with the note name r. Durations longer than a whole rest use the following predefined commands:

\new Staff {
  % These two lines are just to prettify this example
  \time 16/1
  \omit Staff.TimeSignature
  % Print a maxima rest, equal to four breves
  r\maxima
  % Print a longa rest, equal to two breves
  r\longa
  % Print a breve rest
  r\breve
  r1 r2 r4 r8 r16 r32 r64 r128
}

[image of music]

Whole measure rests, centered in the middle of the measure, must be entered as multi-measure rests. They can be used for a single measure as well as many measures and are discussed in Full measure rests.

To explicitly specify a rest’s vertical position, write a note followed by \rest. A rest of the duration of the note will be placed at the staff position where the note would appear. This allows for precise manual formatting of polyphonic music, since the automatic rest collision formatter will not move these rests.

\relative { a'4\rest d4\rest }

[image of music]

Selected Snippets

Rest styles

Rests may be used in various styles.

\new Staff \relative c {
  \omit Score.TimeSignature
  \cadenzaOn

  \override Staff.Rest.style = #'mensural
  r\maxima^\markup \typewriter { mensural }
  r\longa r\breve r1 r2 r4 r8 r16 s32 s64 s128 s128
  \bar ""
  \break

  \override Staff.Rest.style = #'neomensural
  r\maxima^\markup \typewriter { neomensural }
  r\longa r\breve r1 r2 r4 r8 r16 s32 s64 s128 s128
  \bar ""
  \break

  \override Staff.Rest.style = #'classical
  r\maxima^\markup \typewriter { classical }
  r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 s128
  \bar ""
  \break

  \override Staff.Rest.style = #'z
  r\maxima^\markup \typewriter { z-style }
  r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 s128
  \bar ""
  \break

  \override Staff.Rest.style = #'default
  r\maxima^\markup \typewriter { default }
  r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 s128
}

[image of music]

See also

Music Glossary: breve, longa, maxima.

Notation Reference: Full measure rests.

Snippets: Rhythms.

Internals Reference: Rest.

Known issues and warnings

There is no fundamental limit to rest durations (both in terms of longest and shortest), but the number of glyphs is limited: there are rests from 1024th to maxima (8× whole).


Invisible rests

There are two forms of invisible rests: the spacer rest named ‘s’, and the \skip command. The spacer rest is a note that does not produce output. Like any other note or rest, its duration sets the default duration of following notes.

\relative c'' {
  c4 c s c |
  s2 c |
}

[image of music]

Also like other notes and rests, it implicitly causes Staff and Voice contexts to be created if none exist.

{ s1 s s }

[image of music]

Spacer rests are available only in note mode and chord mode. In other situations, for example, when entering lyrics, the command \skip is used to skip a musical moment. The \skip command accepts either an explicit duration or a piece of music as an argument and skips the duration of the argument. The duration of the \skip is ignored if lyrics derive their durations from the notes in an associated melody through \addlyrics or \lyricsto.

<<
  {
    a'2 \skip2 a'2 a'2
  }
  \new Lyrics {
    \lyricmode {
      foo2 \skip 1 bla2
    }
  }
>>

[image of music]

When the argument to \skip is music, the default duration of the following note is implicitly set by the last note of the argument. However, to preserve backward compatibility with the legacy implementation of \skip, a numeric duration argument does not affect the duration of the subsequent note.

<<
  {
    \repeat unfold 12 { a'4 }
  }
  {
    a'4 \skip 2 a' |
    a'4 \skip { a'8 a' a' a' } a' a' |
    s2 a'
  }
>>

[image of music]

The \skip command preserves the effect of an enclosing unfoldRepeats command, unlike the skip-of-length Scheme function.

MyCadenza = \fixed c' {
  \repeat volta 2 {
    d8 e f g g4 f4
  }
}

music = <<
  \new Staff {
    \MyCadenza
    c'1
  }
  \new Staff {
    #(skip-of-length MyCadenza)
    c'1
  }
  \new Staff {
    \skip \MyCadenza
    c'1
  }
>>

\unfoldRepeats \music

[image of music]

The \skip command simply skips musical time; it creates no output of any kind.

% This is valid input, but does nothing
{ \skip 1 \skip1 \skip 1 }

[image of music]

See also

Learning Manual: Visibility and color of objects.

Notation Reference: Hidden notes, Visibility of objects.

Snippets: Rhythms.

Internals Reference: SkipMusic.

Known issues and warnings

Because duration and music arguments to the \skip command affect the duration of subsequent music differently, it is good practice to provide an explicit duration for the music immediately following the command.


Full measure rests

Rests for one or more full measures are entered like notes with the note name uppercase ‘R’. Their duration is entered identically to the duration notation used for notes, including the ability to use duration multipliers, as explained in Scaling durations:

% Rest measures contracted to single measure
\compressMMRests {
  R1*4
  R1*24
  R1*4
  b'2^"Tutti" b'4 a'4
}

[image of music]

The example above also demonstrates how to compress multiple empty measures, as explained in Compressing empty measures.

The duration of a multi-measure rest must always be equal to the length of one or several measures. Therefore, some time signatures require the use of augmentation dots or fractions:

\compressMMRests {
  \time 2/4
  R1 | R2 |
  \time 3/4
  R2. | R2.*2 |
  \time 13/8
  R1*13/8 | R1*13/8*12 |
  \time 10/8
  R4*5*4 |
}

[image of music]

A full-measure rest is printed as either a whole or breve rest, centered in the measure, depending on the time signature.

\time 4/4
R1 |
\time 6/4
R1*3/2 |
\time 8/4
R1*2 |

[image of music]

Markups can be added to multi-measure rests.

\compressMMRests {
  \time 3/4
  R2.*10^\markup { \italic "ad lib." }
}

[image of music]

Note: Markups and articulations attached to multi-measure rests are MultiMeasureRestText and MultiMeasureRestScript types, not TextScript and Script. Overrides must be directed to the correct object, or they will be ignored. See the following example:

% This fails, as the wrong object name is specified
\override TextScript.padding = #5
\override Script.color = #blue
R1^"wrong"
R1\fermata
% This is the correct object name to be specified
\override MultiMeasureRestText.padding = #5
\override MultiMeasureRestScript.color = #blue
R1^"right"
R1\fermata

[image of music]

When a multi-measure rest immediately follows a \partial setting, resulting bar-check warnings may not be displayed.

Predefined commands

\textLengthOn, \textLengthOff, \compressMMRests.

Selected Snippets

Multi-measure rest length control

Multi-measure rests have length according to their total duration which is under the control of MultiMeasureRest.space-increment. Note that the default value is 2.0.

\relative c' {
  \compressEmptyMeasures
  R1*2 R1*4 R1*64 R1*16
  \override Staff.MultiMeasureRest.space-increment = 2.5
  R1*2 R1*4 R1*64 R1*16
}

[image of music]

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, in polyphonic music multi-measure rests in odd-numbered and even-numbered voices are vertically separated.

The positioning of multi-measure rests can be controlled as follows:

\relative c'' {
  % Multi-measure rests by default are set under the fourth line
  R1
  % They can be moved using an override
  \override MultiMeasureRest.staff-position = #-2
  R1
  \override MultiMeasureRest.staff-position = #0
  R1
  \override MultiMeasureRest.staff-position = #2
  R1
  \override MultiMeasureRest.staff-position = #3
  R1
  \override MultiMeasureRest.staff-position = #6
  R1
  \revert MultiMeasureRest.staff-position
  \break

  % In two Voices, 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
  << { R1 } \\ { R1 } \\
     \once \override MultiMeasureRest.staff-position = #0
     { 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 }
  >>
}

[image of music]

Multi-measure rest markup

Markups attached to a multi-measure rest will be centered above or below it. Long markups attached to multi-measure rests do not cause the measure to expand. To expand a multi-measure rest to fit the markup, use an empty chord with an attached markup before the multi-measure rest. Text attached to a spacer rest in this way is left-aligned to the position where the note would be placed in the measure, but if the measure length is determined by the length of the text, the text will appear to be centered.

\relative c' {
  \compressMMRests {
    \textLengthOn
    <>^\markup { [MAJOR GENERAL] }
    R1*19
    <>_\markup { \italic { Cue: ... it is yours } }
    <>^\markup { A }
    R1*30^\markup { [MABEL] }
    \textLengthOff
    c4^\markup { CHORUS } d f c
  }
}

[image of music]

See also

Music Glossary: multi-measure rest.

Notation Reference: Durations, Scaling durations, Compressing empty measures, Text, Formatting text, Text scripts.

Snippets: Rhythms.

Internals Reference: MultiMeasureRest, MultiMeasureRestNumber, MultiMeasureRestScript, MultiMeasureRestText.

Known issues and warnings

Fingerings over multi-measure rests (e.g., R1*10-4) may result in the fingering numeral colliding with the bar counter numeral.

There is no way to automatically condense multiple ordinary rests into a single multi-measure rest.

Multi-measure rests do not take part in rest collisions.


Caesuras

The \caesura command calls for unmetered silence: typically, a short break in sound that does not shorten the previous note.

\fixed c'' { c2. \caesura d4 }

[image of music]

In chants and hymns, \caesura can serve more generally as a phrase division; for more information, see the references at the end of this section. For a break in sound that shortens the previous note, see Breath marks.

Articulations may follow \caesura to indicate the relative duration or significance of the break; these create CaesuraScript grobs.

\fixed c'' { c2. \caesura \fermata d4 }

[image of music]

By default, \caesura creates a BreathingSign grob. The breath element of the caesuraType context property controls which of several predefined signs \caesura creates. See List of breath marks.

\fixed c'' {
  \set Score.caesuraType = #'((breath . curvedcaesura))
  c2. \caesura d4
}

[image of music]

To designate one or more CaesuraScript grobs to be created as a normal part of an unarticulated caesura, set the scripts element of the caesuraType context property. (Additional scripts can still be attached as articulations.) In conjunction with the breath element, the scripts listed in the script element attach to the BreathingSign; otherwise, if a BarLine is present, they attach to it.

The caesuraTypeTransform context property can be set to a Scheme function to enable a degree of automatic adaptation. The at-bar-line-substitute-caesura-type function generator supports styles where the notation differs at a bar line.

\fixed c' {
  \set Score.caesuraType =
    #'((breath . spacer)
       (scripts . (outsidecomma)))
  \set Score.caesuraTypeTransform =
    #(at-bar-line-substitute-caesura-type
      '((scripts . (fermata))))
  c'2. \caesura d'4
  b1 \caesura
  a1
}

[image of music]

Predefined commands

\caesura.

Selected Snippets

Positioning opposing fermatas on a bar line

This snippet demonstrates a command that prints fermatas both above and below a bar line. If there would not otherwise be a bar line, it adds a double bar line. Semantically, the command codes a longer-than-normal caesura, which might be considered misuse depending on the situation.

twoWayFermata = {
  \once \set Staff.caesuraType = #'((underlying-bar-line . "||"))
  \once \set Staff.caesuraTypeTransform = ##f
  \caesura ^\fermata _\fermata
}

music = {
  f'1 \twoWayFermata
  R1
  f'2 \twoWayFermata f'2
  R1
  b'1 \twoWayFermata \fine
}

\new GrandStaff <<
  \new Staff \music
  \new Staff \music
>>

[image of music]

See also

Music Glossary: caesura.

Notation Reference: Breath marks, Divisiones, Kievan bar lines, Phrase bar lines in hymn tunes.

Snippets: Expressive marks.

Internals Reference: BreathingSign, Caesura_engraver, CaesuraEvent, CaesuraScript, caesuraTypeTransform, caesuraType.


LilyPond — Notation Reference v2.24.2 (stable-branch).