]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3835: Chord change detection in repeat alternatives
authorDavid Kastrup <dak@gnu.org>
Mon, 3 Feb 2014 23:12:07 +0000 (00:12 +0100)
committerDavid Kastrup <dak@gnu.org>
Sat, 8 Feb 2014 10:42:45 +0000 (11:42 +0100)
Let chord change detection in repeat alternatives happen in relation
to the chord active at the beginning of the first alternative.

input/regression/chord-changes-alternative.ly [new file with mode: 0644]
ly/engraver-init.ly

diff --git a/input/regression/chord-changes-alternative.ly b/input/regression/chord-changes-alternative.ly
new file mode 100644 (file)
index 0000000..39f464e
--- /dev/null
@@ -0,0 +1,22 @@
+\version "2.18.0"
+
+\header {
+  texidoc = "Chord change detection in repeat alternatives
+happens in relation to the chord active at the beginning of the
+first alternative.
+"
+}
+
+\score {
+  <<
+    \new ChordNames {
+      \set chordChanges = ##t
+      \chordmode { \repeat volta 3 { g1 | }
+                  \alternative { {c |}  {c4 g c c |} {g2 c |} } } }
+    \new Voice {
+      \relative c'' {
+       \repeat volta 3 { g4 f e d | } 
+       \alternative { {c r r r |} {c g c r |} {b g c2 |} } }
+      \bar "|." }
+  >>
+}
index 6c19da86d1463ea39417ba3e3c08802f2734faeb..5148ff436f29c1ff84ef47b27d96f0d1698949a4 100644 (file)
@@ -614,7 +614,7 @@ automatically when an output definition (a @code{\\score} or
   doubleRepeatType = #":..:"
   startRepeatType = #".|:"
   endRepeatType = #":|."
-  alternativeRestores = #'(measurePosition measureLength)
+  alternativeRestores = #'(measurePosition measureLength lastChord)
   barNumberVisibility = #first-bar-number-invisible-and-no-parenthesized-bar-numbers
   barNumberFormatter = #robust-bar-number-function
   clefTranspositionFormatter = #clef-transposition-markup