I have a section for chords and a section for melody. Each has
"\repeat volta 2" and two blocks in an "\alternative". I've reduced to
what I think is a pretty minimum MWE, and still get:

|    $ lilypond mwe.ly
|    GNU LilyPond 2.22.1
|    Processing `mwe.ly'
|    Parsing...
|    warning: More alternatives than repeats.  Junking excess alternatives
|    Interpreting music...
|    Preprocessing graphical objects...
|    Interpreting music...
|    MIDI output to `mwe.midi'...
|    Finding the ideal number of pages...
|    Fitting music on 1 page...
|    Drawing systems...
|    Converting to `mwe.pdf'...
|    Success: compilation successfully completed

See attached:

Attachment: mwe.pdf
Description: Adobe PDF document

\version "2.22.1"
\language "english"

global = {
  \time 6/8
  \key c \major
}

chordNames = \chordmode {
  \global
  \partial 8 s8                     | %  0
  \repeat volta 2 {
  c2.
  }
  \alternative {
    { c2 s8 }
    { c2. }
  }
  f4. c4.
}

melody = \relative c' {
  \global
  \clef treble
  \partial 8 e16[ f16]
  \repeat volta 2 {
  g8.[ e16 d8] c8[ e8 c8]
  }
  \alternative {
    { c4.( c8) e16[ f16] }
    { c4.( c4.) } |
  }
  a'8.[ a16 a8] g8[ e8 e8]
  \bar "|."
}

\score {
  <<
    \new ChordNames \chordNames
    \new Voice = "mel" { \melody }
  >>

  \layout {
    \autoBeamOff
    indent = 0\mm
  }

  \midi { }
}

Reply via email to