(ly:text-interface::interpret-markup layout props text)))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; cross-staff stuff
+
+(define-public (script-or-side-position-cross-staff g)
+ (or
+ (ly:script-interface::calc-cross-staff g)
+ (ly:side-position-interface::calc-cross-staff g)))
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; note heads
(ly:duration-log
(ly:event-property (event-cause grob) 'duration)))
-(define-public (stem::length val)
- (lambda (grob)
- (let* ((d (ly:grob-property grob 'direction))
- (ss (ly:staff-symbol-staff-space grob))
- (beg (ly:stem::calc-stem-begin-position grob))
- (y1 (* beg (* 0.5 ss)))
- (y2 (* ((if (eqv? d DOWN) - +) beg val) (* 0.5 ss))))
- (if (eqv? d DOWN)
- (cons y2 y1)
- (cons y1 y2)))))
+(define-public (stem::length grob)
+ (let* ((d (ly:grob-property grob 'direction))
+ (ss (ly:staff-symbol-staff-space grob))
+ (beg (ly:grob-property grob 'stem-begin-position))
+ (beam (ly:grob-object grob 'beam)))
+ (if (null? beam)
+ (abs (- (ly:stem::calc-stem-end-position grob) beg))
+ (ly:grob-property grob 'length))))
+
+(define-public (stem::pure-length grob beg end)
+ (let* ((d (ly:grob-property grob 'direction))
+ (ss (ly:staff-symbol-staff-space grob))
+ (beg (ly:grob-pure-property grob 'stem-begin-position 0 1000)))
+ (abs (- (ly:stem::pure-calc-stem-end-position grob 0 2147483646) beg))))
(define-public (note-head::calc-duration-log grob)
(min 2