From 7150295de0eae722cf43501b401560524bc2ff49 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Wed, 15 Oct 2008 18:05:03 +0200 Subject: [PATCH] Fix problem with transposition mangling the global key sig variable I need to create a deep copy of the key sig (and all similar variables) before inserting it into the main music. Some functions like transposition explicitly change the variables, so we can't simply use the global variable, which will apply to ALL parts/voices/staves, but rather create a local copy for just that one instrument. --- orchestrallily.ly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestrallily.ly b/orchestrallily.ly index 5c3577f..f8e09bd 100644 --- a/orchestrallily.ly +++ b/orchestrallily.ly @@ -191,7 +191,7 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) (lambda (type) (let* ((object (namedPieceInstrObject piece name type))) (if (ly:music? object) - (set! musiccontent (append musiccontent (list object))) + (set! musiccontent (append musiccontent (list (ly:music-deep-copy object)))) (if (not-null? object) (ly:warning (_ "Wrong type (no ly:music) for ~S for instrument ~S in piece ~S") type name piece)) ) ) -- 2.11.4.GIT