3.5.4 Repeats in MIDI

With a few minor additions, all types of repeats can be represented in the MIDI output. This is achieved by applying the \unfoldRepeats music function. This function changes all repeats to unfold repeats.

\unfoldRepeats {
  \repeat tremolo 8 { c'32 e' }
  \repeat percent 2 { c''8 d'' }
  \repeat volta 2 { c'4 d' e' f' }
  \alternative {
    { g' a' a' g' }
    { f' e' d' c' }
  }
}
\bar "|."

[image of music]

In scores containing multiple voices, unfolding of repeats in MIDI output will only occur correctly if each voice contains fully notated repeat indications.

When creating a score file using \unfoldRepeats for MIDI, it is necessary to make two \score blocks: one for MIDI (with unfolded repeats) and one for notation (with volta, tremolo, and percent repeats). For example,

\score {
  …music…
  \layout { … }
}
\score {
  \unfoldRepeats …music…
  \midi { … }
}

Other languages: deutsch, español, français, italiano, 日本語.
About automatic language selection.

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