]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4569: Keep \autochange from escaping an existing context hierarchy
authorDavid Kastrup <dak@gnu.org>
Tue, 18 Aug 2015 09:03:03 +0000 (11:03 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 23 Aug 2015 16:34:57 +0000 (18:34 +0200)
ly/music-functions-init.ly
scm/define-music-display-methods.scm

index 54590a4cdde8e9549ada4554d21a703fb716d2fa..16b57a97d96b464e1f15b47ab578b653e07fec10 100644 (file)
@@ -189,19 +189,17 @@ pitch where to switch staves may be specified.  The clefs for the staves are
 optional as well.  Setting clefs  works only for implicitly instantiated
 staves.")
   (let ;; keep the contexts alive for the full duration
-       ((skip (make-skip-music (make-duration-of-length
-                                     (ly:music-length music)))))
-    #{
-      <<
-        \context Staff = "up" $(or clef-1 #{ \with { \clef "treble" } #})
-          <<
-          #(make-autochange-music pitch music)
-          \new Voice { #skip }
-          >>
-        \context Staff = "down" $(or clef-2 #{ \with { \clef "bass" } #})
-          \new Voice { #skip }
-      >>
-    #}))
+       ((skip (make-duration-of-length (ly:music-length music)))
+        (clef-1 (or clef-1 #{ \with { \clef "treble" } #}))
+        (clef-2 (or clef-2 #{ \with { \clef "bass" } #})))
+    (make-simultaneous-music
+     (list
+      (descend-to-context (make-autochange-music pitch music) 'Staff
+                          "up" clef-1)
+      (context-spec-music (make-skip-music skip) 'Staff
+                          "up" clef-1)
+      (context-spec-music (make-skip-music skip) 'Staff
+                          "down" clef-2)))))
 
 balloonGrobText =
 #(define-music-function (grob-name offset text)
index c1ee87bbf89b85d552ca5bb39e26fe2d043ae4c2..0b9cb54fbb713ff5a9df2601cb6c0667ab261a74 100644 (file)
@@ -1119,7 +1119,10 @@ Otherwise, return #f."
                                  elements ((music 'ContextSpeccedMusic
                                                   context-id "up"
                                                   context-type 'Staff
-                                                  element (music 'SimultaneousMusic elements (?ac-music)))
+                                                  element ?ac-music)
+                                           (music 'ContextSpeccedMusic
+                                                  context-id "up"
+                                                  context-type 'Staff)
                                            (music 'ContextSpeccedMusic
                                                   context-id "down"
                                                   context-type 'Staff))))