;;;
;;; source file of the GNU LilyPond music typesetter
;;;
-;;; (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; (c) 1999--2000 Jan Nieuwenhuizen <janneke@gnu.org>
;;; All dimensions are measured in staff-spaces
(define beam-sit (/ (+ beam-thickness staff-line) 2))
(define beam-hang (- 1 (/ (- beam-thickness staff-line) 2)))
+;; Note: quanting period is take as quants.top () - quants[0],
+;; which should be 1 (== 1 interline)
+
(define beam-normal-dy-quants
(list 0 (/ (+ beam-thickness staff-line) 2) (+ beam-thickness staff-line) 1))
;; two popular veritcal beam quantings
;; see params.ly: #'beam-vertical-quants
(define (beam-normal-y-quants multiplicity dy)
- (let ((quants (list beam-hang 1)))
+ (let ((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)))
- quants))
+ ;; period: 1 (interline)
+ (append quants (list (+ 1 (car quants))))))
(define (beam-traditional-y-quants multiplicity dy)
- (let ((quants '(1)))
+ (let ((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)))
- quants))
+ ;; period: 1 (interline)
+ (append quants (list (+ 1 (car quants))))))
;; There are several ways to calculate the direction of a beam
;; beamed stems
(define beamed-stem-shorten '(0.5))
(define beamed-stem-length '(0.0 2.5 2.0 1.5))
+(define grace-beamed-stem-length '(0.0 2.5 2.0 1.5))
(define beamed-stem-minimum-length '(0.0 1.5 1.25 1.0))
(define grace-beamed-stem-minimum-length
(map (lambda (x) (* grace-length-factor x)) beamed-stem-minimum-length))
(define stem-shorten '(0.5))
(define grace-stem-shorten '(0.0))
+
+;; urg
+(define pi (* 2 (acos 0)))
+
+(define (slur-default-height h-inf r-0 b)
+ (let ((alpha (/ (* 2.0 h-inf) pi))
+ (beta (/ (* pi r-0) (* 2.0 h-inf))))
+ (* alpha (atan (* beta b)))))
+