From db86852a055840615c4300cb75a2e3b59116df0a Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Tue, 4 Feb 2014 00:12:07 +0100 Subject: [PATCH] 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. --- input/regression/chord-changes-alternative.ly | 22 +++++++++++++++++++ ly/engraver-init.ly | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 input/regression/chord-changes-alternative.ly 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 -- 2.39.5