]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3489: Let \cue... use quoted-context-type of CueVoice consistently
authorDavid Kastrup <dak@gnu.org>
Wed, 21 Aug 2013 02:09:29 +0000 (04:09 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 27 Aug 2013 09:07:01 +0000 (11:07 +0200)
Previously Voice was used and this relied on a a CueVoice purportedly
being created by cue-substitute itself and providing a Voice alias.
There is a regtest input/regression/quote-tuplet-end.ly which relied
on an explicit Voice = "cue" serving as a substite catch for the cue
notes, effectively turning \cueDuring into \quoteDuring.  This kind of
usage is rather bizarre, and since it diverts the \voiceOne/\voiceTwo
settings for the cue voice into a CueVoice context anyway (which is
otherwise empty), the cue voice is still missing proper directional
information.  This was not worth supporting.

Regularizing the usage in this manner will reliably stop \quoteDuring
from introducing surprise CueVoice contexts.

ly/music-functions-init.ly
scm/define-music-display-methods.scm
scm/music-functions.scm

index 7e9feba98f5728c22114289b6fb4cac70e9c94f7..3f88b07252704184fd0cdbb991b06f516902eee1 100644 (file)
@@ -307,7 +307,7 @@ cueDuring =
 in a CueVoice oriented by @var{dir}.")
    (make-music 'QuoteMusic
               'element main-music
-              'quoted-context-type 'Voice
+              'quoted-context-type 'CueVoice
               'quoted-context-id "cue"
               'quoted-music-name what
               'quoted-voice-direction dir))
@@ -319,7 +319,7 @@ cueDuringWithClef =
 in a CueVoice oriented by @var{dir}.")
    (make-music 'QuoteMusic
               'element main-music
-              'quoted-context-type 'Voice
+              'quoted-context-type 'CueVoice
               'quoted-context-id "cue"
               'quoted-music-name what
               'quoted-music-clef clef
@@ -1364,7 +1364,7 @@ as a first or second voice.")
 
    (make-music 'QuoteMusic
               'element main-music
-              'quoted-context-type 'Voice
+              'quoted-context-type 'CueVoice
               'quoted-context-id "cue"
               'quoted-music-name what
               'quoted-voice-direction dir
index bafa57200d313e11a084b59ee053daff4bd50932..fd759d52d154cae4c76e326fe09f7ea3303bcc77 100644 (file)
@@ -1054,7 +1054,7 @@ Otherwise, return #f."
                                quoted-voice-direction ?quoted-voice-direction
                                quoted-music-name ?quoted-music-name
                                quoted-context-id "cue"
-                               quoted-context-type 'Voice
+                               quoted-context-type 'CueVoice
                                element ?music))
                         (format #f "\\cueDuring #~s #~a ~a"
                                 ?quoted-music-name
index ff2bcb7ec72ea5b79e311f1566247af73b4940a5..617e9e90f0fc70fb4ed0a3989d7074cdc936bcb4 100644 (file)
@@ -1095,6 +1095,8 @@ set to the @code{location} parameter."
              (clef (ly:music-property quote-music 'quoted-music-clef #f))
              (main-voice (case dir ((1) 1) ((-1) 0) (else #f)))
              (cue-voice (and main-voice (- 1 main-voice)))
+             (cue-type (ly:music-property quote-music 'quoted-context-type #f))
+             (cue-id (ly:music-property quote-music 'quoted-context-id))
              (main-music (ly:music-property quote-music 'element))
              (return-value quote-music))
 
@@ -1116,17 +1118,15 @@ set to the @code{location} parameter."
          (delq! #f
                 (list
                  (and clef (make-cue-clef-set clef))
-
-                 ;; Need to establish CueVoice context even in #CENTER case
-                 (context-spec-music
-                  (if cue-voice
-                      (make-voice-props-override cue-voice)
-                      (make-music 'Music))
-                  'CueVoice "cue")
+                 (and cue-type cue-voice
+                      (context-spec-music
+                       (make-voice-props-override cue-voice)
+                       cue-type cue-id))
                  quote-music
-                 (and cue-voice
+                 (and cue-type cue-voice
                       (context-spec-music
-                       (make-voice-props-revert) 'CueVoice "cue"))
+                       (make-voice-props-revert)
+                       cue-type cue-id))
                  (and clef (make-cue-clef-unset))))))
       quote-music))