(markup->lily-string (ly:music-property event 'text)))
(define-post-event-display-method BendAfterEvent (event parser) #f
- (format #f "\\bendAfter #~a" (ly:music-property event 'delta-step)))
+ (format #f "\\bendAfter #~a " (ly:music-property event 'delta-step)))
(define-post-event-display-method HarmonicEvent (event parser) #f "\\harmonic")
(define-post-event-display-method GlissandoEvent (event parser) #f "\\glissando")
(format #f "\\~a" (ly:music-property event 'text)))
(define-post-event-display-method StrokeFingerEvent (event parser) #f
- (format #f "\\rightHandFinger #~a" (ly:music-property event 'digit)))
+ (format #f "\\rightHandFinger #~a " (ly:music-property event 'digit)))
(define-span-event-display-method BeamEvent (event parser) #f "[" "]")
(define-span-event-display-method SlurEvent (event parser) #f "(" ")")
(define-display-method TimeScaledMusic (times parser)
(let* ((num (ly:music-property times 'numerator))
(den (ly:music-property times 'denominator))
+ (span (ly:music-property times 'duration #f))
+ ;; need to format before changing time scale
+ (formatted-span
+ (and span (duration->lily-string span #:force-duration #t)))
(scale (/ num den))
- (dur (*previous-duration*))
(time-scale (*time-scale*)))
-
- (parameterize ((*force-line-break* #f)
- (*previous-duration*
- (ly:make-duration (ly:duration-log dur)
- (ly:duration-dot-count dur)
- (* (ly:duration-scale dur)
- scale)))
- (*time-scale* (* time-scale scale)))
- (format #f "\\times ~a/~a ~a"
- num
- den
- (music->lily-string (ly:music-property times 'element) parser)))))
+ (*previous-duration* #f)
+ (let ((result
+ (parameterize ((*force-line-break* #f)
+ (*time-scale* (* time-scale scale)))
+ (format #f "\\tuplet ~a/~a ~@[~a ~]~a"
+ den
+ num
+ formatted-span
+ (music->lily-string (ly:music-property times 'element) parser)))))
+ (*previous-duration* #f)
+ result)))
(define-display-method RelativeOctaveMusic (m parser)
(music->lily-string (ly:music-property m 'element) parser))
(value (ly:music-property expr 'grob-value))
(once (ly:music-property expr 'once)))
- (format #f "~a\\override ~a~a #'~a = ~a~a"
+ (format #f "~a\\override ~{~a~^.~} = ~a~a"
(if (or (null? once)
(not once))
""
"\\once ")
- (if (eqv? (*current-context*) 'Bottom)
- ""
- (format #f "~a . " (*current-context*)))
- symbol
- (if (null? (cdr properties))
- (car properties)
- properties)
- (property-value->lily-string value parser)
+ (if (eqv? (*current-context*) 'Bottom)
+ (cons symbol properties)
+ (cons* (*current-context*) symbol properties))
+ (property-value->lily-string value parser)
(new-line->lily-string))))
(define-display-method RevertProperty (expr parser)
(let* ((symbol (ly:music-property expr 'symbol))
(properties (ly:music-property expr 'grob-property-path
(list (ly:music-property expr 'grob-property)))))
- (format #f "\\revert ~a~a #'~a~a"
- (if (eqv? (*current-context*) 'Bottom)
- ""
- (format #f "~a . " (*current-context*)))
- symbol
- (if (null? (cdr properties))
- (car properties)
- properties)
+ (format #f "\\revert ~{~a~^.~}~a"
+ (if (eqv? (*current-context*) 'Bottom)
+ (cons symbol properties)
+ (cons* (*current-context*) symbol properties))
(new-line->lily-string))))
(define-display-method TimeSignatureMusic (expr parser)
value ?clef-position
symbol 'clefPosition)
(music 'PropertySet
- value ?clef-octavation
- symbol 'clefOctavation)
+ value ?clef-transposition
+ symbol 'clefTransposition)
(music 'ApplyContext
procedure ly:set-middle-C!)))))
(let ((clef-name (assoc-get (list ?clef-glyph ?clef-position 0)
(if clef-name
(format #f "\\clef \"~a~{~a~a~}\"~a"
clef-name
- (cond ((= 0 ?clef-octavation)
+ (cond ((= 0 ?clef-transposition)
(list "" ""))
- ((> ?clef-octavation 0)
- (list "^" (1+ ?clef-octavation)))
+ ((> ?clef-transposition 0)
+ (list "^" (1+ ?clef-transposition)))
(else
- (list "_" (- 1 ?clef-octavation))))
+ (list "_" (- 1 ?clef-transposition))))
(new-line->lily-string))
#f))))