3.5.2 Skipping corrected music

When entering or copying music, usually only the music near the end (where new notes are being added) is interesting to view and correct. To speed up this correction process, it is possible to skip typesetting of all but the last few measures. This is achieved by defining a special variable at the source file’s top level, as follows:

showLastLength = R1*5
\score { … }

In this instance, nothing will be rendered but the last five measures (assuming 4/4 time signature) of every \score in the input file. For longer pieces, rendering only a small part is often an order of magnitude quicker than rendering it completely. When working on the beginning of a score that has already been typeset (for example to add a new part), the showFirstLength property may be useful as well.

Skipping parts of a score can be controlled in a more fine-grained fashion with the property Score.skipTypesetting. When it is set, no typesetting is performed at all. As a property of the Score context, it affects all voices and staves; see Score – the master of all contexts.

This property is also used to control output to the MIDI file. If some event in the skipped section alters some of its context properties, for example a tempo or instrument change, then that new setting will take effect only at the point in time where skipTypesetting is disabled again:

\relative c' {
  c4 c c c
  \set Score.skipTypesetting = ##t
  d4 d d d
  \tempo 4 = 80
  e4 e e e
  \set Score.skipTypesetting = ##f
  f4 f f f

[image of music]

Predefined commands

showLastLength, showFirstLength.

See also

Notation Reference: Interpretation contexts, Score – the master of all contexts.

Internals Reference: All context properties.

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