[gsharp-cvs] CVS update: gsharp/gsharp.asd gsharp/measure.lisp gsharp/packages.lisp
Robert Strandh
rstrandh at common-lisp.net
Tue Nov 29 19:37:41 UTC 2005
Update of /project/gsharp/cvsroot/gsharp
In directory common-lisp.net:/tmp/cvs-serv2766
Modified Files:
gsharp.asd measure.lisp packages.lisp
Log Message:
Fixed a bug in the computation of the timelines.
Added elasticity.lisp to gsharp.asd.
Prepared the MEASURE class for holding an elasticity function.
Date: Tue Nov 29 20:37:40 2005
Author: rstrandh
Index: gsharp/gsharp.asd
diff -u gsharp/gsharp.asd:1.3 gsharp/gsharp.asd:1.4
--- gsharp/gsharp.asd:1.3 Mon Nov 28 03:32:06 2005
+++ gsharp/gsharp.asd Tue Nov 29 20:37:39 2005
@@ -35,6 +35,7 @@
"postscript"
"glyphs"
"beaming"
+ "elasticity"
"drawing"
"cursor"
"input-state"
Index: gsharp/measure.lisp
diff -u gsharp/measure.lisp:1.18 gsharp/measure.lisp:1.19
--- gsharp/measure.lisp:1.18 Tue Nov 29 19:05:03 2005
+++ gsharp/measure.lisp Tue Nov 29 20:37:40 2005
@@ -424,8 +424,12 @@
(bar-pos :initarg :bar-pos :reader measure-bar-pos)
;; a list of the bars that make up this measure
(bars :initarg :bars :reader measure-bars)
- ;; the first timeline of the measure, or NIL of there are not timelines
- (timelines :initform (make-instance 'ranked-flexichain) :reader timelines)))
+ ;; a ranked flexichain of timelines
+ (timelines :initform (make-instance 'ranked-flexichain) :reader timelines)
+ ;; a convex piecewise-linear function that determines the
+ ;; horizontal size of the measure as a function of the "force" that
+ ;; is applied to it
+ (elasticity-function :accessor elasticity-function)))
(defun make-measure (min-dist coeff start-times seg-pos bar-pos bars)
(make-instance 'measure :min-dist min-dist :coeff coeff
@@ -656,7 +660,7 @@
(durations (abs-rel (measure-start-times measure))))
;; create a timeline for each start time of the measure
(loop for duration in durations
- for start-time = 0 then (+ start-time duration)
+ and start-time = 0 then (+ start-time duration)
for i from 0
do (let ((timeline (make-instance 'timeline
:start-time start-time
@@ -667,7 +671,7 @@
(loop for bar in (measure-bars measure)
do (loop with timeline-index = 0
for element in (elements bar)
- for start-time = 0 then (+ start-time (duration element))
+ and start-time = 0 then (+ start-time (duration element))
do (loop while (< (start-time (flexichain:element* timelines timeline-index))
start-time)
do (incf timeline-index))
Index: gsharp/packages.lisp
diff -u gsharp/packages.lisp:1.35 gsharp/packages.lisp:1.36
--- gsharp/packages.lisp:1.35 Mon Nov 28 05:25:34 2005
+++ gsharp/packages.lisp Tue Nov 29 20:37:40 2005
@@ -135,7 +135,7 @@
#:group-notes-by-staff #:final-relative-note-xoffset
#:final-accidental #:final-relative-accidental-xoffset
#:timeline #:timelines #:elasticity
- #:smallest-gap))
+ #:smallest-gap #:elasticity-function))
(defpackage :gsharp-postscript
(:use :clim :clim-lisp)
More information about the Gsharp-cvs
mailing list