(if (vector? (ly:music-property quote-music 'quoted-events))
(let* ((dir (ly:music-property quote-music 'quoted-voice-direction))
+ (clef (ly:music-property quote-music 'quoted-music-clef))
(main-voice (if (eq? 1 dir) 1 0))
(cue-voice (if (eq? 1 dir) 0 1))
(main-music (ly:music-property quote-music 'element))
;; to have opposite stems.
(begin
(set! return-value
-
;; cannot context-spec Quote-music, since context
;; for the quotes is determined in the iterator.
(make-sequential-music
(list
+ (if (null? clef)
+ (make-music 'Music)
+ (make-cue-clef-set clef))
(context-spec-music (make-voice-props-set cue-voice) 'CueVoice "cue")
quote-music
- (context-spec-music (make-voice-props-revert) 'CueVoice "cue"))))
+ (context-spec-music (make-voice-props-revert) 'CueVoice "cue")
+ (if (null? clef)
+ (make-music 'Music)
+ (make-cue-clef-unset)))))
(set! main-music
(make-sequential-music
(list
(ly:moment-main-numerator moment)
(ly:moment-main-denominator moment)))
-(define (skip-this moment)
- "set skipTypesetting, make SkipMusic of the given MOMENT length,
- and then unset skipTypesetting."
- (make-sequential-music
- (list
- (context-spec-music (make-property-set 'skipTypesetting #t)
- 'Score)
- (make-music 'SkipMusic 'duration
- (make-duration-of-length moment))
- (context-spec-music (make-property-set 'skipTypesetting #f)
- 'Score))))
-
-(define (unskip-this moment)
- "unset skipTypesetting, make SkipMusic of the given MOMENT length,
- and then set skipTypesetting."
+(define (make-skipped moment bool)
+ "Depending on BOOL, set or unset skipTypesetting,
+then make SkipMusic of the given MOMENT length, and
+then revert skipTypesetting."
(make-sequential-music
(list
- (context-spec-music (make-property-set 'skipTypesetting #f)
+ (context-spec-music (make-property-set 'skipTypesetting bool)
'Score)
(make-music 'SkipMusic 'duration
(make-duration-of-length moment))
- (context-spec-music (make-property-set 'skipTypesetting #t)
+ (context-spec-music (make-property-set 'skipTypesetting (not bool))
'Score))))
(define (skip-as-needed music parser)
(list
(make-sequential-music
(list
- (skip-this skip-length)
+ (make-skipped skip-length #t)
;; let's draw a separator between the beginning and the end
(context-spec-music (make-property-set 'whichBar "||")
'Timing)))
- (unskip-this show-first-length)
+ (make-skipped show-first-length #f)
music))))
;; we may only want to print the last length
((skip-length (ly:moment-sub orig-length show-last-length)))
(make-simultaneous-music
(list
- (skip-this skip-length)
+ (make-skipped skip-length #t)
music))))
;; we may only want to print the beginning; in this case