CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/10/16 14:11:14
Modified files: . : ChangeLog scm : layout-beam.scm Log message: remove beam dir functions. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4182&tr2=1.4183&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/layout-beam.scm.diff?tr1=1.1&tr2=1.2&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.4182 lilypond/ChangeLog:1.4183 --- lilypond/ChangeLog:1.4182 Sun Oct 16 14:09:30 2005 +++ lilypond/ChangeLog Sun Oct 16 14:11:14 2005 @@ -1,5 +1,7 @@ 2005-10-16 Han-Wen Nienhuys <[EMAIL PROTECTED]> + * scm/layout-beam.scm: remove beam dir functions. + * ly/engraver-init.ly (AncientRemoveEmptyStaffContext): use length-fraction. * lily/stem.cc (calc_length): multiply with length_fraction. Makes Index: lilypond/scm/layout-beam.scm diff -u lilypond/scm/layout-beam.scm:1.1 lilypond/scm/layout-beam.scm:1.2 --- lilypond/scm/layout-beam.scm:1.1 Sun Oct 9 15:28:35 2005 +++ lilypond/scm/layout-beam.scm Sun Oct 16 14:11:14 2005 @@ -15,46 +15,6 @@ ((eq? type 1) 1.65) ;; FIXME: check what this should be and why (else 1.32))) -;; There are several ways to calculate the direction of a beam -;; -;; * majority: number count of up or down notes -;; * mean : mean centre distance of all notes -;; * median : mean centre distance weighted per note -;; -;; [Ross] states that the majority of the notes dictates the -;; direction (and not the mean of "center distance") -;; -;; But is that because it really looks better, or because he wants -;; to provide some real simple hands-on rules? -;; -;; We have our doubts, so we simply provide all sensible alternatives. - - -;; -;; DOCME: what goes into this func, what comes out. -(define (dir-compare up down) - (sign (- up down))) - -;; arguments are in the form (up . down) -(define-public (beam-dir-majority count total) - (dir-compare (car count) (cdr count))) - -(define-public (beam-dir-majority-median count total) - "First try majority. If that doesn't work, try median." - (let ((maj (dir-compare (car count) (cdr count)))) - (if (not (= maj 0)) - maj - (beam-dir-median count total)))) - -(define-public (beam-dir-mean count total) - (dir-compare (car total) (cdr total))) - -(define-public (beam-dir-median count total) - (if (and (> (car count) 0) - (> (cdr count) 0)) - (dir-compare (/ (car total) (car count)) (/ (cdr total) (cdr count))) - (dir-compare (car count) (cdr count)))) - (define ((check-beam-quant posl posr) beam) "Check whether BEAM has POSL and POSR quants. POSL are (POSITION . QUANT) pairs, where QUANT is -1 (hang), 0 (center), 1 (sit) or -2/ 2 (inter) _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs