- (else 1.32)
- ))
-
-
-; This is a mess : global namespace pollution. We should wait
-; till guile has proper toplevel environment support.
-
-
-;; Beams should be prevented to conflict with the stafflines,
-;; especially at small slopes
-;; ----------------------------------------------------------
-;; ########
-;; ########
-;; ########
-;; --------------########------------------------------------
-;; ########
-;;
-;; hang straddle sit inter hang
-
-;; inter seems to be a modern quirk, we don't use that
-
-
-;; Note: quanting period is take as quants.top () - quants[0],
-;; which should be 1 (== 1 interline)
-(define (mean a b) (* 0.5 (+ a b)))
-(define (default-beam-dy-quants beam stafflinethick)
- (let ((thick (ly-get-elt-property beam 'thickness))
- )
-
- (list 0 (mean thick stafflinethick) (+ thick stafflinethick) 1)
- ))
-
-;; two popular veritcal beam quantings
-;; see params.ly: #'beam-vertical-quants
-
-; (todo: merge these 2 funcs ? )
-
-(define (default-beam-y-quants beam multiplicity dy staff-line)
- (let* ((beam-straddle 0)
- (thick (ly-get-elt-property beam 'thickness))
- (beam-sit (/ (+ thick staff-line) 2))
- (beam-hang (- 1 (/ (- thick staff-line) 2)))
- (quants (list beam-hang))
- )
-
- (if (or (<= multiplicity 1) (>= (abs dy) (/ staff-line 2)))
- (set! quants (cons beam-sit quants)))
- (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2)))
- (set! quants (cons beam-straddle quants)))
- ;; period: 1 (interline)
- (append quants (list (+ 1 (car quants))))))
-
-(define (beam-traditional-y-quants beam multiplicity dy staff-line)
- (let* ((beam-straddle 0)
- (thick (ly-get-elt-property beam 'thickness))
- (beam-sit (/ (+ thick staff-line) 2))
- (beam-hang (- 1 (/ (- thick staff-line) 2)))
- (quants '())
- )
- (if (>= dy (/ staff-line -2))
- (set! quants (cons beam-hang quants)))
- (if (and (<= multiplicity 1) (<= dy (/ staff-line 2)))
- (set! quants (cons beam-sit quants)))
- (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2)))
- (set! quants (cons beam-straddle quants)))
- ;; period: 1 (interline)
- (append quants (list (+ 1 (car quants))))))
-