From: Trevor Daniels Date: Sun, 15 Mar 2015 14:04:52 +0000 (+0000) Subject: Doc: Issue 4323: Ensure all contexts in satb.ly template stay alive X-Git-Tag: release/2.19.18-1~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=af709b0a29faa38843c480d03a1d490b2a03c20e;p=lilypond.git Doc: Issue 4323: Ensure all contexts in satb.ly template stay alive Following the fix to Issue 2010, some contexts in deeply nested parallel constructs may be terminated prematurely, at least this is the likely explanation for the failure of the satb.ly template in Release 2.19.16, although blaming Issue 2010 is conjecture. As an alternative fix to Issue 2010 seems far away, this is a hackish workaround enable the satb.ly template to work in releases after 2.19.15 by ensuring all contexts remain alive for the duration of the longest of them. It corrects all the examples in the LM. --- diff --git a/ly/satb.ly b/ly/satb.ly index eed79d1cbb..a8ae1347ac 100644 --- a/ly/satb.ly +++ b/ly/satb.ly @@ -106,6 +106,7 @@ PartInstrumentName or its default." #(satb-defaulting Key) \clef #,clef \new Voice = #,name << + \satb-spacers #(satb-defaulting Time) \dynamicUp #(satb-defaulting ,(satb-sym name "Music")) @@ -133,12 +134,14 @@ PartInstrumentName or its default." #(satb-defaulting Key) \clef #,clef \new Voice = #,v1name << + \satb-spacers #(satb-defaulting Time) \voiceOne \dynamicUp #(satb-defaulting ,(satb-sym v1name "Music")) >> \new Voice = #,v2name << + \satb-spacers #(satb-defaulting Time) \voiceTwo #(satb-defaulting ,(satb-sym v2name "Music")) @@ -154,6 +157,33 @@ PartInstrumentName or its default." #(satb-lyrics-if-defined ,(satb-sym v2name "LyricsThree") ,v2name) >> #}) +satb-define-if-unused = +#(define-void-function (parser location syms) (symbol-list?) + (for-each + (lambda (sym) + (if (null? (ly:parser-lookup parser sym)) + (ly:parser-define! parser sym *unspecified*))) + syms)) + +\satb-define-if-unused + #'( + DescantMusic + SopranoMusic + AltoMusic + TenorMusic + BassMusic + ) + +satb-AllChoirMusic = << + \DescantMusic + \SopranoMusic + \AltoMusic + \TenorMusic + \BassMusic +>> + +#(define satb-spacers (skip-of-length satb-AllChoirMusic)) + SATB = << \new ChoirStaff \with { @@ -197,6 +227,7 @@ SATB = << \clef "treble" #(satb-defaulting Key) \new Voice << + \satb-spacers #(satb-defaulting Time) #(satb-defaulting PianoRHMusic) >> @@ -208,6 +239,7 @@ SATB = << \clef "bass" #(satb-defaulting Key) \new Voice << + \satb-spacers #(satb-defaulting Time) #(satb-defaulting PianoLHMusic) >>