Repeats and MIDI - GNU LilyPond
Description: GNU LilyPond

Next: Manual repeat commands, Previous: Repeat syntax, Up: Repeats

#### 6.7.3 Repeats and MIDI

With a little bit of tweaking, all types of repeats can be present in the MIDI output. This is achieved by applying the `\unfoldRepeats` music function. This functions 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 "|."

When creating a score file using `\unfoldRepeats` for midi, then 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 { .. }
    }

This page is for LilyPond-2.8.8 (stable-branch).

Other languages: English.
Using automatic language selection.