lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Q: Irregular alternate repeats and MIDI


From: Michael Gerdau
Subject: Q: Irregular alternate repeats and MIDI
Date: Sat, 18 Jul 2020 07:57:23 +0200 (CEST)

Hi List,

I have a score with repeats and irregular alternate endings. I can neatly 
engrave that but I don't seem to be able to produce correct MIDI w/o manually 
arranging all segments.

Does someone has a trick up his sleeve?
I found mails regarding this problem in the archive dating back to 2008... 

Here is my "kind of" MWE:
%-------------------
\version "2.21.2"

body = { c'4 c' c' c' }
voltaI = { d'4 d' d' d' }
voltaII = { e'4 e' e' e' }
voltaIII = { g'4 g' g' g' }

musicI = {
  \repeat volta 5 \body
  \alternative {
    \voltaI
    \voltaII
    \voltaIII
  }
  \bar "|."
}

musicII = {
  \repeat volta 5 \body
  \set Score.repeatCommands = #'((volta "1."))
  \voltaI
  \set Score.repeatCommands = #'((volta #f) (volta "2. 3. 4.") end-repeat)
  \voltaII
  \set Score.repeatCommands = #'((volta #f) (volta "5.") end-repeat)
  \voltaIII
  \set Score.repeatCommands = #'((volta #f))
  \bar "|."
}

\markup "Default w/o \unfoldRepeats"
\score {
  \musicI
  \layout { }
  \midi { }
}

\markup "Default unfold is 1.-3. -> Volta 1, 4. -> Volta 2 and 5. -> Volta 3"
\score {
  \unfoldRepeats \musicI
  \layout { }
  \midi { }
}


\markup "This is what I want..."
\score {
  \musicII
  \layout { }
  \midi { }
}

\markup "...but \unfoldRepeats does not deal with it"
\score {
  \unfoldRepeats \musicII
  \layout { }
  \midi { }
}

\markup "Of course I could enforce it manually"
\score {
  { \body \voltaI \repeat unfold 3 { \body \voltaII } \body \voltaIII \bar "|." 
}
  \layout { }
  \midi { }
}

\markup "How should I change \musicII to enable \unfoldRepeats to work the way 
I want it?"
\markup "Is there a way to tell \alternative which repeats in which volta (and 
the volta texts)?"
%-------------------

Kind regards,
Michael
-- 
Michael Gerdau email: mgd@qata.de
GPG-keys available on request or at public keyserver

Attachment: repeat-volta-midi-test.pdf
Description: Adobe PDF document

Attachment: repeat-volta-midi-test.ly
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]