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.


LilyPond Notation Reference v2.25.21 (development-branch).