From: David Kastrup Date: Mon, 3 Feb 2014 23:12:07 +0000 (+0100) Subject: Issue 3835: Chord change detection in repeat alternatives X-Git-Tag: release/2.19.3-1~36 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=db86852a055840615c4300cb75a2e3b59116df0a;p=lilypond.git Issue 3835: Chord change detection in repeat alternatives Let chord change detection in repeat alternatives happen in relation to the chord active at the beginning of the first alternative. --- diff --git a/input/regression/chord-changes-alternative.ly b/input/regression/chord-changes-alternative.ly new file mode 100644 index 0000000000..39f464eee9 --- /dev/null +++ b/input/regression/chord-changes-alternative.ly @@ -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 "|." } + >> +} diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 6c19da86d1..5148ff436f 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -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