Update of /project/gsharp/cvsroot/gsharp In directory common-lisp.net:/tmp/cvs-serv16112
Modified Files: buffer.lisp measure.lisp Log Message: added more comments to improve maintainability
Date: Wed Nov 16 02:27:34 2005 Author: rstrandh
Index: gsharp/buffer.lisp diff -u gsharp/buffer.lisp:1.25 gsharp/buffer.lisp:1.26 --- gsharp/buffer.lisp:1.25 Thu Nov 10 18:36:36 2005 +++ gsharp/buffer.lisp Wed Nov 16 02:27:34 2005 @@ -916,7 +916,12 @@ (segments :initform '() :initarg :segments :accessor segments) (staves :initform (list (make-fiveline-staff)) :initarg :staves :accessor staves) + ;; the min width determines the preferred geographic distance after the + ;; timetlime with the shortest duration on a line. (min-width :initform *default-min-width* :initarg :min-width :accessor min-width) + ;; the spacing style of the buffer determines the how geographic distance + ;; between adjacent timelines is related to temporal distance. + ;; a value of 0 means constant spacing, a value of 1 means proportional spacing (spacing-style :initform *default-spacing-style* :initarg :spacing-style :accessor spacing-style) (right-edge :initform *default-right-edge* :initarg :right-edge :accessor right-edge) (left-offset :initform *default-left-offset* :initarg :left-offset :accessor left-offset)
Index: gsharp/measure.lisp diff -u gsharp/measure.lisp:1.4 gsharp/measure.lisp:1.5 --- gsharp/measure.lisp:1.4 Mon Oct 31 03:16:27 2005 +++ gsharp/measure.lisp Wed Nov 16 02:27:34 2005 @@ -125,8 +125,22 @@ ;;; ;;; Measure
+;;; A measure represents the set of simultaneous bars. +;;; Define a TIMELINE of a measure to be the set of all +;;; simultaneous elements of the bars of the measure. +;;; The DURATION of a timeline is either the distance to +;;; the next closest timeline following it, or, in case +;;; it is the last timeline of the measure, the duration +;;; of the longest element of the timeline. + (defclass measure (obseq-elem) - ((min-dist :initarg :min-dist :reader measure-min-dist) + (;; the smallest temporal distance between either two adjacent + ;; timelines in the measure or between the last timeline + ;; and the end of the mesure. The temporal distance between + ;; the last timeline and the end of the measure is the same + ;; as the duration of the longest element of the last timeline. + (min-dist :initarg :min-dist :reader measure-min-dist) + ;; the coefficient of a measure is the sum of (coeff :initarg :coeff :reader measure-coeff) (start-times :initarg :start-times :reader measure-start-times) (seg-pos :initarg :seg-pos :reader measure-seg-pos) @@ -304,8 +318,11 @@ ;;; Cost functions
(defclass measure-cost-method (cost-method) - ((min-width :initarg :min-width :reader min-width) + (;; the min width is taken from the min width of the buffer + (min-width :initarg :min-width :reader min-width) + ;; the spaceing style is taken from the spacing style of the buffer (spacing-style :initarg :spacing-style :reader spacing-style) + ;; the amount of horizontal space available to music material (line-width :initarg :line-width :reader line-width)))
(defun make-measure-cost-method (min-width spacing-style line-width)