Update of /project/gsharp/cvsroot/gsharp In directory common-lisp.net:/tmp/cvs-serv9353
Modified Files: drawing.lisp Log Message: Improved the bulge computation for clusters.
Date: Mon Dec 5 06:33:25 2005 Author: rstrandh
Index: gsharp/drawing.lisp diff -u gsharp/drawing.lisp:1.48 gsharp/drawing.lisp:1.49 --- gsharp/drawing.lisp:1.48 Mon Dec 5 05:00:13 2005 +++ gsharp/drawing.lisp Mon Dec 5 06:33:24 2005 @@ -160,12 +160,21 @@ (+ (score-pane:staff-step 0.5) (/ (text-size pane (map 'string 'code-char (text element))) 2)))
+(defmethod left-bulge ((element cluster) pane) + (+ (- (loop for note in (notes element) + when (final-accidental note) + minimize (final-relative-accidental-xoffset note))) + (score-pane:staff-step 2))) + (defmethod right-bulge ((element element) pane) (score-pane:staff-step 1))
(defmethod right-bulge ((element lyrics-element) pane) (+ (score-pane:staff-step 0.5) (/ (text-size pane (map 'string 'code-char (text element))) 2))) + +(defmethod right-bulge ((element cluster) pane) + (score-pane:staff-step 2))
;;; As it turns out, the spacing algorithm would be very complicated ;;; if we were to take into account exactly how elements with