gsharp-cvs
Threads by month
- ----- 2025 -----
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 396 discussions
Update of /project/gsharp/cvsroot/gsharp
In directory clnet:/tmp/cvs-serv11794
Modified Files:
drawing.lisp
Log Message:
MORE DOTS
Well, actually, fix the dots that we already have. Rests have dots too,
but fortunately the computation for their dot's offset is slightly
easier.
--- /project/gsharp/cvsroot/gsharp/drawing.lisp 2006/06/21 16:31:54 1.72
+++ /project/gsharp/cvsroot/gsharp/drawing.lisp 2006/06/26 16:37:43 1.73
@@ -917,7 +917,7 @@
(let ((x (final-absolute-element-xoffset element)))
(score-pane:with-vertical-score-position (pane (staff-yoffset (staff element)))
(score-pane:draw-rest pane (undotted-duration element) x (staff-pos element))
- (draw-dots pane (dots element) x (1+ (staff-pos element))))))
+ (draw-dots pane (dots element) x (+ x (score-pane:staff-step 2)) (1+ (staff-pos element))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
1
0
Update of /project/gsharp/cvsroot/gsharp/Scores
In directory clnet:/tmp/cvs-serv21067/Scores
Added Files:
dots.gsh
Log Message:
Dots!
Specifically, augmentation dots. Get their x- and y- positions more
right, which sometimes entails not drawing a dot at all, sometimes
adjusting the position for a dot downwards, and (when a flag is drawn or
there is a suspended note in a flag-up situation) involves shifting the
entire column of dots rightwards.
Add an example score full of things we got wrong.
--- /project/gsharp/cvsroot/gsharp/Scores/dots.gsh 2006/06/21 16:31:54 NONE
+++ /project/gsharp/cvsroot/gsharp/Scores/dots.gsh 2006/06/21 16:31:54 1.1
G#V4
[GSHARP-BUFFER:BUFFER
:min-width 17
:spacing-style 0.4
:right-edge 700
:left-offset 30
:left-margin 20
:staves (#1=[GSHARP-BUFFER:FIVELINE-STAFF
:name "default staff"
:clef [GSHARP-BUFFER:CLEF :name :TREBLE :lineno 2 ]
:keysig [GSHARP-BUFFER:KEY-SIGNATURE
:xoffset 0
:staff #1#
:alterations #(:NATURAL :NATURAL :NATURAL :NATURAL
:NATURAL :NATURAL :NATURAL) ] ]
#2=[GSHARP-BUFFER:FIVELINE-STAFF
:name "foo"
:clef [GSHARP-BUFFER:CLEF :name :BASS :lineno 4 ]
:keysig [GSHARP-BUFFER:KEY-SIGNATURE
:xoffset 0
:staff #2#
:alterations #(:NATURAL :NATURAL :NATURAL :NATURAL
:NATURAL :NATURAL :NATURAL) ] ])
:segments ([GSHARP-BUFFER:SEGMENT
:layers ([GSHARP-BUFFER:MELODY-LAYER
:name "default layer"
:staves (#1# #2#)
:head [GSHARP-BUFFER:SLICE
:bars ([GSHARP-BUFFER:MELODY-BAR
:elements COMMON-LISP:NIL ]) ]
:body [GSHARP-BUFFER:SLICE
:bars ([GSHARP-BUFFER:MELODY-BAR
:elements ([GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 35
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 36
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 37
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 36
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 37
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 38
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 30
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 31
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 32
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 31
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 32
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 33
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]) ]
[GSHARP-BUFFER:MELODY-BAR
:elements ([GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 1
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 35
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 36
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 37
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 1
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 36
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 37
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 38
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 1
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 30
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 31
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 32
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 1
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 31
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 32
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 33
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]) ]
[GSHARP-BUFFER:MELODY-BAR
:elements ([GSHARP-BUFFER:KEY-SIGNATURE
:xoffset 0
:staff #1#
:alterations #(:NATURAL
:NATURAL
:NATURAL
:NATURAL
:NATURAL
:NATURAL
:NATURAL) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 28
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 29
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 30
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 31
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 32
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 33
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 34
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 0
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 35
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]) ]
[GSHARP-BUFFER:MELODY-BAR
:elements ([GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 1
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 28
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 29
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 1
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 29
:staff #1#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 1
:lbeams 0
:dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 21
:staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]
[GSHARP-BUFFER:NOTE
:pitch 28
:staff #2#
:head :FILLED
:accidentals :NATURAL
[100 lines skipped]
1
0
Update of /project/gsharp/cvsroot/gsharp
In directory clnet:/tmp/cvs-serv21067
Modified Files:
drawing.lisp measure.lisp packages.lisp
Log Message:
Dots!
Specifically, augmentation dots. Get their x- and y- positions more
right, which sometimes entails not drawing a dot at all, sometimes
adjusting the position for a dot downwards, and (when a flag is drawn or
there is a suspended note in a flag-up situation) involves shifting the
entire column of dots rightwards.
Add an example score full of things we got wrong.
--- /project/gsharp/cvsroot/gsharp/drawing.lisp 2006/06/19 17:40:34 1.71
+++ /project/gsharp/cvsroot/gsharp/drawing.lisp 2006/06/21 16:31:54 1.72
@@ -76,6 +76,9 @@
(defun final-absolute-accidental-xoffset (note)
(+ (final-absolute-element-xoffset (cluster note)) (final-relative-accidental-xoffset note)))
+(defun final-absolute-dot-xoffset (cluster)
+ (+ (final-absolute-element-xoffset cluster) (score-pane:staff-step (final-relative-dot-xoffset cluster))))
+
(defvar *cursor* nil)
;;; Compute the elasticity of each timeline in each measure of the
@@ -832,9 +835,13 @@
(loop for pos from -2 downto bot-note-pos by 2
do (score-pane:draw-ledger-line pane x pos)))))
-(defun draw-flags (pane element x direction pos)
+(defun flags-drawn-p (element)
(let ((nb (max (rbeams element) (lbeams element))))
- (when (and (> nb 0) (eq (notehead element) :filled))
+ (and (> nb 0) (eq (notehead element) :filled) nb)))
+
+(defun draw-flags (pane element x direction pos)
+ (let ((nb (flags-drawn-p element)))
+ (when nb
(if (eq direction :up)
(score-pane:with-notehead-right-offsets (right up)
(declare (ignore up))
@@ -843,23 +850,23 @@
(declare (ignore down))
(score-pane:draw-flags-up pane nb (+ x left) pos))))))
-(defun draw-dots (pane nb-dots x pos)
- (let ((staff-step (score-pane:staff-step 1)))
- (loop with dotpos = (if (evenp pos) (1+ pos) pos)
- repeat nb-dots
- for xx from (+ x (* 2 staff-step)) by staff-step do
- (score-pane:draw-dot pane xx dotpos))))
+(defun draw-dots (pane nb-dots x dot-xoffset dot-pos)
+ (when dot-pos
+ (let ((staff-step (score-pane:staff-step 1)))
+ (loop repeat nb-dots
+ for xx from dot-xoffset by staff-step do
+ (score-pane:draw-dot pane xx dot-pos)))))
-(defun draw-note (pane note notehead nb-dots x pos)
+(defun draw-note (pane note notehead nb-dots x pos dot-xoffset dot-pos)
(score-pane:with-vertical-score-position (pane (staff-yoffset (staff note)))
(score-pane:draw-notehead pane notehead x pos)
(when (final-accidental note)
(score-pane:draw-accidental pane (final-accidental note) (final-absolute-accidental-xoffset note) pos))
- (draw-dots pane nb-dots x pos)))
+ (draw-dots pane nb-dots x dot-xoffset dot-pos)))
-(defun draw-notes (pane notes dots notehead)
+(defun draw-notes (pane notes dots notehead dot-xoffset)
(loop for note in notes do
- (draw-note pane note notehead dots (final-absolute-note-xoffset note) (note-position note))))
+ (draw-note pane note notehead dots (final-absolute-note-xoffset note) (note-position note) dot-xoffset (final-absolute-dot-ypos note))))
(defun element-has-suspended-notes (element)
(not (apply #'= (mapcar #'final-relative-note-xoffset (notes element)))))
@@ -873,17 +880,23 @@
(defmethod draw-element (pane (element cluster) &optional (flags t))
(with-new-output-record (pane)
(unless (null (notes element))
- (let ((direction (final-stem-direction element))
- (stem-pos (final-stem-position element))
- (stem-yoffset (final-stem-yoffset element))
- (groups (group-notes-by-staff (notes element)))
- (x (final-absolute-element-xoffset element)))
+ (let* ((direction (final-stem-direction element))
+ (stem-pos (final-stem-position element))
+ (stem-yoffset (final-stem-yoffset element))
+ (groups (group-notes-by-staff (notes element)))
+ (x (final-absolute-element-xoffset element))
+ (dot-xoffset
+ (let ((basic-xoffset (+ (score-pane:staff-step 2)
+ (reduce #'max (mapcar #'final-absolute-note-xoffset (notes element))))))
+ (if (and flags (eq direction :up) (flags-drawn-p element))
+ (max basic-xoffset (+ (score-pane:staff-step 4) x))
+ basic-xoffset))))
(when flags
(score-pane:with-vertical-score-position (pane stem-yoffset)
(draw-flags pane element x direction stem-pos)))
- (loop for group in groups do
- (draw-notes pane group (dots element) (notehead element))
- (draw-ledger-lines pane x group))
+ (loop for group in groups do
+ (draw-notes pane group (dots element) (notehead element) dot-xoffset)
+ (draw-ledger-lines pane x group))
(unless (eq (notehead element) :whole)
(if (eq direction :up)
(score-pane:draw-right-stem
--- /project/gsharp/cvsroot/gsharp/measure.lisp 2006/06/19 17:40:34 1.31
+++ /project/gsharp/cvsroot/gsharp/measure.lisp 2006/06/21 16:31:54 1.32
@@ -56,7 +56,11 @@
:accessor final-relative-accidental-xoffset)
(final-accidental :initform nil :accessor final-accidental)
;; the relative x offset of the note with respect to the cluster
- (final-relative-note-xoffset :accessor final-relative-note-xoffset)))
+ (final-relative-note-xoffset :accessor final-relative-note-xoffset)
+ ;; the absolute y position of any dot, or NIL if dots should not be
+ ;; drawn
+ (final-absolute-dot-ypos :accessor final-absolute-dot-ypos :initform nil)
+))
;;; given a list of notes, group them so that every note in the group
;;; is displayed on the same staff. Return the list of groups.
@@ -158,7 +162,7 @@
(define-added-mixin rcluster () cluster
((final-stem-direction :accessor final-stem-direction)
- ;; the position, in staff steps, of the top not in the element.
+ ;; the position, in staff steps, of the top note in the element.
(top-note-pos :accessor top-note-pos)
;; the position, in staff steps, of the bottom note in the element.
(bot-note-pos :accessor bot-note-pos)))
@@ -217,6 +221,22 @@
when (non-empty-cluster-p element)
do (setf (final-stem-direction element) stem-direction))))
+(defun compute-final-dot-positions (group)
+ (setf group (sort (copy-list group) #'> :key #'note-position))
+ (let ((so-far nil))
+ (dolist (note group)
+ (let* ((position (note-position note))
+ (ideal (if (oddp position) position (1+ position))))
+ (cond
+ ;; if there's no dot at our ideal position, use that
+ ((not (member ideal so-far)) (push (setf (final-absolute-dot-ypos note) ideal) so-far))
+ ;; if the note in question is on a line and we haven't
+ ;; got a dot in the space underneath, use that
+ ((and (evenp position) (not (member (- ideal 2) so-far)))
+ (push (setf (final-absolute-dot-ypos note) (- ideal 2)) so-far))
+ ;; otherwise, give up for this note
+ (t (setf (final-absolute-dot-ypos note) nil)))))))
+
;;; Given a list of notes to be displayed on the same staff line, for
;;; each note, compute the accidental to be displayed as a function of
;;; the accidentals of the note and the key signature of the staff.
@@ -550,6 +570,7 @@
(defun compute-staff-group-parameters (staff-group stem-direction)
(compute-final-relative-note-xoffsets staff-group stem-direction)
+ (compute-final-dot-positions staff-group)
(compute-final-accidentals staff-group)
(compute-final-relative-accidental-xoffset staff-group stem-direction))
@@ -622,7 +643,7 @@
(defmethod compute-bar-parameters ((bar melody-bar))
(loop for group in (beam-groups (elements bar))
- do (compute-beam-group-parameters group)))
+ do (compute-beam-group-parameters group)))
;;; From a list of simultaneous bars (and some other stuff), create a
;;; measure. The `other stuff' is the spacing style, which is needed
--- /project/gsharp/cvsroot/gsharp/packages.lisp 2006/06/14 03:38:56 1.57
+++ /project/gsharp/cvsroot/gsharp/packages.lisp 2006/06/21 16:31:54 1.58
@@ -128,6 +128,7 @@
#:beam-groups #:final-stem-direction
#:group-notes-by-staff #:final-relative-note-xoffset
#:final-accidental #:final-relative-accidental-xoffset
+ #:final-relative-dot-xoffset #:final-absolute-dot-ypos
#:timeline #:timelines #:elasticity
#:smallest-gap #:elasticity-function))
1
0
Update of /project/gsharp/cvsroot/gsharp
In directory clnet:/tmp/cvs-serv11337
Modified Files:
buffer.lisp cursor.lisp drawing.lisp gui.lisp measure.lisp
modes.lisp
Log Message:
Merge keysigN patch, with all its attendant horribleness.
--- /project/gsharp/cvsroot/gsharp/buffer.lisp 2006/03/02 09:29:44 1.37
+++ /project/gsharp/cvsroot/gsharp/buffer.lisp 2006/06/19 17:40:34 1.38
@@ -115,7 +115,8 @@
((print-character :allocation :class :initform #\=)
(clef :accessor clef :initarg :clef :initform (make-clef :treble))
(%keysig :accessor keysig :initarg :keysig
- :initform (make-array 7 :initial-element :natural))))
+ :initform (make-array 7 :initial-element :natural))
+ (key-signatures :accessor key-signatures :initform nil)))
(defmethod initialize-instance :after ((obj fiveline-staff) &rest args)
(declare (ignore args))
--- /project/gsharp/cvsroot/gsharp/cursor.lisp 2004/07/23 16:51:16 1.2
+++ /project/gsharp/cvsroot/gsharp/cursor.lisp 2006/06/19 17:40:34 1.3
@@ -166,6 +166,12 @@
(when (> (pos cursor) position)
(incf (pos cursor)))))
+(defmethod add-element :after
+ ((keysig gsharp-buffer::key-signature) bar position)
+ (setf (gsharp-buffer::key-signatures (staff keysig))
+ ;; FIXME: unordered
+ (cons keysig (gsharp-buffer::key-signatures (staff keysig)))))
+
(defmethod remove-element :before ((element element))
(let ((elemno (number element)))
(loop for cursor in (cursors (bar element)) do
--- /project/gsharp/cvsroot/gsharp/drawing.lisp 2006/06/14 05:03:14 1.70
+++ /project/gsharp/cvsroot/gsharp/drawing.lisp 2006/06/19 17:40:34 1.71
@@ -150,6 +150,31 @@
(score-pane:staff-step 5)
(score-pane:staff-step 2)))
+(defmethod right-bulge ((keysig gsharp-buffer::key-signature) pane)
+ ;; FIXME: shares much code with DRAW-ELEMENT (KEY-SIGNATURE).
+ (let ((old-keysig (keysig keysig)))
+ (let ((bulge 0))
+ (loop with advance = 0
+ for pitch in '(6 2 5 1 4 0 3)
+ when (and (eq (aref (alterations old-keysig) pitch) :flat)
+ (not (eq (aref (alterations keysig) pitch)
+ :flat)))
+ do (incf advance (score-pane:staff-step 2))
+ finally (incf bulge (if (= advance 0) 0 (+ advance (score-pane:staff-step 2)))))
+ (loop with advance = 0
+ for pitch in '(3 0 4 1 5 2 6)
+ when (and (eq (aref (alterations old-keysig) pitch) :sharp)
+ (not (eq (aref (alterations keysig) pitch) :sharp)))
+ do (incf advance (score-pane:staff-step 2))
+ finally (incf bulge (if (= advance 0) 0 (+ advance (score-pane:staff-step 2)))))
+ (loop for pitch in '(6 2 5 1 4 0 3)
+ while (eq (aref (alterations keysig) pitch) :flat)
+ do (incf bulge (score-pane:staff-step 2)))
+ (loop for pitch in '(3 0 4 1 5 2 6)
+ while (eq (aref (alterations keysig) pitch) :sharp)
+ do (incf bulge (score-pane:staff-step 2.5)))
+ bulge)))
+
;;; As it turns out, the spacing algorithm would be very complicated
;;; if we were to take into account exactly how elements with
;;; arbitrarily many timelines between them might influence the
@@ -496,6 +521,9 @@
(incf yy (+ 20 (* 70 (length staves))))))))
buffer)))))
+(define-added-mixin xelement () element
+ ((final-absolute-xoffset :accessor final-absolute-element-xoffset)))
+
(define-added-mixin velement () melody-element
(;; the position, in staff steps, of the end of the stem
;; that is not attached to a note, independent of the
@@ -509,11 +537,10 @@
(top-note-staff-yoffset :accessor top-note-staff-yoffset)
;; the yoffset of the staff that contains the bottom note of
;; the element
- (bot-note-staff-yoffset :accessor bot-note-staff-yoffset)
- (final-absolute-xoffset :accessor final-absolute-element-xoffset)))
+ (bot-note-staff-yoffset :accessor bot-note-staff-yoffset)))
(define-added-mixin welement () lyrics-element
- ((final-absolute-xoffset :accessor final-absolute-element-xoffset)))
+ ())
;;; Compute and store several important pieces of information
;;; about an element:
@@ -600,6 +627,11 @@
notes))
(defun draw-beam-group (pane elements)
+ (let ((e (car elements)))
+ (when (typep e 'gsharp-buffer::key-signature)
+ (assert (null (cdr elements)))
+ (return-from draw-beam-group
+ (draw-element pane e (final-absolute-element-xoffset e)))))
(mapc #'compute-top-bot-yoffset elements)
(if (null (cdr elements))
(let ((element (car elements)))
@@ -885,3 +917,46 @@
(with-text-family (pane :serif)
(draw-text* pane (map 'string 'code-char (text element))
x 0 :align-x :center)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Key signature element
+
+(defmethod draw-element (pane (keysig key-signature) &optional flags)
+ (let ((staff (staff keysig))
+ (old-keysig (keysig keysig))
+ (x (final-absolute-element-xoffset keysig)))
+ (score-pane:with-vertical-score-position (pane (staff-yoffset staff))
+ (let ((yoffset (b-position (clef staff))))
+ (loop with advance = 0
+ for pitch in '(6 2 5 1 4 0 3)
+ for line in '(0 3 -1 2 -2 1 -3)
+ when (and (eq (aref (alterations old-keysig) pitch) :flat)
+ (not (eq (aref (alterations keysig) pitch)
+ :flat)))
+ do (score-pane:draw-accidental
+ pane :natural (+ x advance) (+ line yoffset))
+ and do (incf advance (score-pane:staff-step 2))
+ finally (incf x (if (= advance 0) 0 (+ advance (score-pane:staff-step 2))))))
+ (let ((yoffset (f-position (clef staff))))
+ (loop with advance = 0
+ for pitch in '(3 0 4 1 5 2 6)
+ for line in '(0 -3 1 -2 -5 -1 -4)
+ when (and (eq (aref (alterations old-keysig) pitch) :sharp)
+ (not (eq (aref (alterations keysig) pitch) :sharp)))
+ do (score-pane:draw-accidental pane :natural (+ x advance) (+ line yoffset))
+ and do (incf advance (score-pane:staff-step 2))
+ finally (incf x (if (= advance 0) 0 (+ advance (score-pane:staff-step 2))))))
+
+ (let ((yoffset (b-position (clef staff))))
+ (loop for pitch in '(6 2 5 1 4 0 3)
+ for line in '(0 3 -1 2 -2 1 -3)
+ for x from x by (score-pane:staff-step 2)
+ while (eq (aref (alterations keysig) pitch) :flat)
+ do (score-pane:draw-accidental pane :flat x (+ line yoffset))))
+ (let ((yoffset (f-position (clef staff))))
+ (loop for pitch in '(3 0 4 1 5 2 6)
+ for line in '(0 -3 1 -2 -5 -1 -4)
+ for x from x by (score-pane:staff-step 2.5)
+ while (eq (aref (alterations keysig) pitch) :sharp)
+ do (score-pane:draw-accidental pane :sharp x (+ line yoffset)))))))
--- /project/gsharp/cvsroot/gsharp/gui.lisp 2006/06/17 19:15:02 1.68
+++ /project/gsharp/cvsroot/gsharp/gui.lisp 2006/06/19 17:40:34 1.69
@@ -591,7 +591,7 @@
(staff (car (staves (layer (slice (bar cluster))))))
(note (make-note pitch staff
:head (notehead state)
- :accidentals (aref (alterations (keysig staff)) (mod pitch 7))
+ :accidentals (aref (alterations (keysig (current-cursor))) (mod pitch 7))
:dots (dots state))))
(setf *current-cluster* cluster
*current-note* note)
@@ -858,6 +858,92 @@
(unless *current-note*
(com-erase-element 1)))))
+(defun insert-keysig ()
+ (let* ((state (input-state *application-frame*))
+ (cursor (current-cursor))
+ (staff (car (staves (layer cursor))))
+ (keysig (if (keysig cursor)
+ (gsharp-buffer::make-key-signature
+ staff :alterations (copy-seq (alterations (keysig cursor))))
+ (gsharp-buffer::make-key-signature staff))))
+ ;; FIXME: should only invalidate elements temporally after the
+ ;; cursor.
+ (gsharp-measure::invalidate-everything-using-staff (current-buffer *application-frame*) staff)
+ (insert-element keysig cursor)
+ (forward-element cursor)
+ keysig))
+
+(define-gsharp-command com-insert-keysig ()
+ (insert-keysig))
+
+(defmethod remove-element :before ((keysig gsharp-buffer::key-signature))
+ (let ((staff (staff keysig)))
+ (setf (gsharp-buffer::key-signatures staff)
+ (remove keysig (gsharp-buffer::key-signatures staff)))
+ (gsharp-measure::invalidate-everything-using-staff (current-buffer *application-frame*) staff)))
+
+;;; FIXME: this function does not work for finding a key signature in
+;;; a different layer (but on the same staff). This will bite in
+;;; polyphonic music with key signature changes (e.g. Piano music)
+(defun %keysig (staff key-signatures bar bars element-or-nil)
+ ;; common case
+ (when (null key-signatures)
+ (return-from %keysig (keysig staff)))
+ ;; earlier in the same bar?
+ (let ((k nil))
+ (dolist (e (elements bar) (when k (return-from %keysig k)))
+ (when (eq e element-or-nil)
+ (if k
+ (return-from %keysig k)
+ (return nil)))
+ (when (and (typep e 'gsharp-buffer::key-signature)
+ (eq (staff e) staff))
+ (setq k e))))
+ ;; must be an earlier bar.
+ (let ((bars (nreverse (loop for b in bars until (eq b bar) collect b))))
+ (dolist (b bars (keysig staff))
+ (when (find b key-signatures :key #'bar)
+ (dolist (e (reverse (elements b)) (error "inconsistency"))
+ (when (and (typep e 'key-signature)
+ (eq (staff e) staff))
+ (return-from %keysig e)))))))
+
+(defmethod keysig ((cursor gsharp-cursor))
+ ;; FIXME: not just a cursor but _the_ cursor (i.e. in a given staff)
+ ;; otherwise the operation for getting the staff [(CAR (STAVES
+ ;; (LAYER CURSOR)))] need not return the staff that we're interested
+ ;; in.
+ (assert (eq cursor (current-cursor)))
+ (let* ((staff (car (staves (layer cursor))))
+ (key-signatures (gsharp-buffer::key-signatures staff))
+ (bar (bar cursor))
+ (slice (slice bar))
+ (bars (bars slice))
+ (element-or-nil (cursor-element cursor)))
+ (%keysig staff key-signatures bar bars element-or-nil)))
+
+(defmethod keysig ((note note))
+ (let* ((staff (staff note))
+ (key-signatures (gsharp-buffer::key-signatures staff))
+ (bar (bar (cluster note)))
+ (slice (slice bar))
+ (bars (bars slice))
+ (element-or-nil (cluster note)))
+ (%keysig staff key-signatures bar bars element-or-nil)))
+
+(defmethod keysig ((cluster cluster))
+ (error "Called ~S (a staff-scope operation) on an element with no ~
+ associated staff: ~S"
+ 'keysig cluster))
+
+(defmethod keysig ((element element))
+ (let* ((staff (staff element))
+ (key-signatures (gsharp-buffer::key-signatures staff))
+ (bar (bar element))
+ (slice (slice bar))
+ (bars (bars slice)))
+ (%keysig staff key-signatures bar bars element)))
+
(define-gsharp-command com-tie-note-left ()
(let ((note (cur-note)))
(when note
@@ -1188,10 +1274,10 @@
(remove-staff-from-layer staff layer)))
(define-gsharp-command com-more-sharps ()
- (more-sharps (keysig (car (staves (layer (current-cursor)))))))
+ (more-sharps (keysig (current-cursor))))
(define-gsharp-command com-more-flats ()
- (more-flats (keysig (car (staves (layer (current-cursor)))))))
+ (more-flats (keysig (current-cursor))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
--- /project/gsharp/cvsroot/gsharp/measure.lisp 2006/06/13 01:18:10 1.30
+++ /project/gsharp/cvsroot/gsharp/measure.lisp 2006/06/19 17:40:34 1.31
@@ -224,7 +224,7 @@
(loop for note in group do
(setf (final-accidental note)
(if (eq (accidentals note)
- (aref (alterations (keysig (staff note))) (mod (pitch note) 7)))
+ (aref (alterations (keysig note)) (mod (pitch note) 7)))
nil
(accidentals note)))))
--- /project/gsharp/cvsroot/gsharp/modes.lisp 2006/06/14 19:20:41 1.18
+++ /project/gsharp/cvsroot/gsharp/modes.lisp 2006/06/19 17:40:34 1.19
@@ -44,6 +44,8 @@
(set-key 'com-insert-note-g 'melody-table '(#\g))
(set-key 'com-insert-rest 'melody-table '((#\,)))
(set-key 'com-insert-empty-cluster 'melody-table '((#\Space)))
+(set-key 'com-insert-keysig 'melody-table '(#\K))
+
(set-key 'com-more-sharps 'melody-table '((#\# :meta)))
(set-key 'com-more-sharps 'melody-table '((#\# :meta :shift)))
(set-key 'com-more-flats 'melody-table '((#\@ :meta :shift)))
1
0
Update of /project/gsharp/cvsroot/gsharp
In directory clnet:/tmp/cvs-serv3865
Modified Files:
gui.lisp
Log Message:
Recompute measures in a :before method on redisplay-frame-pane
as opposed to redisplay-frame-panes. This turns out to be necessary
because redisplay-frame-panes is not always called. In particular
redisplay-frame-pane is called from adopt-frame without going through
redisplay-frame-panes, and adopt-frame is called when Gsharp is
started from the CLIM desktop.
--- /project/gsharp/cvsroot/gsharp/gui.lisp 2006/06/14 19:20:41 1.67
+++ /project/gsharp/cvsroot/gsharp/gui.lisp 2006/06/17 19:15:02 1.68
@@ -25,13 +25,17 @@
((cursor :initarg :cursor :reader cursor)
(buffer :initarg :buffer :reader buffer)))
-(defclass gsharp-pane (score-pane:score-pane)
+;;; exists for the sole purpose of a :before method that updates the
+;;; measures of each modified buffer.
+(defclass gsharp-pane-mixin () ())
+
+(defclass gsharp-pane (score-pane:score-pane gsharp-pane-mixin)
((view :initarg :view :accessor view)))
(defvar *info-bg-color* +gray85+)
(defvar *info-fg-color* +black+)
-(defclass gsharp-info-pane (info-pane)
+(defclass gsharp-info-pane (info-pane gsharp-pane-mixin)
()
(:default-initargs
:height 20 :max-height 20 :min-height 20
@@ -183,8 +187,11 @@
(buffer view))
(setf (score-pane:number-of-pages view) page-number))))
-(defmethod redisplay-frame-panes :before ((frame gsharp) &key force-p)
- (declare (ignore force-p))
+;;; I tried making this a :before method on redisplay-frame-panes,
+;;; but it turns out that McCLIM calls redisplay-frame-pane from
+;;; places other than redisplay-frame-panes.
+(defmethod redisplay-frame-pane :before ((frame gsharp) (pane gsharp-pane-mixin) &key force-p)
+ (declare (ignore pane force-p))
(mapc #'recompute-measures (buffers frame))
(update-page-numbers frame))
1
0
Update of /project/gsharp/cvsroot/gsharp
In directory clnet:/tmp/cvs-serv31881
Modified Files:
gui.lisp modes.lisp
Log Message:
New commands: com-octave-up and com-octave-down that work for
clusters, bound to Meta-U and Meta-D.
They move the current note up/down by an entire octave. These
commands are useful when the automatic pitch follower gets it wrong.
--- /project/gsharp/cvsroot/gsharp/gui.lisp 2006/06/14 03:38:56 1.66
+++ /project/gsharp/cvsroot/gsharp/gui.lisp 2006/06/14 19:20:41 1.67
@@ -784,6 +784,28 @@
cursor)
(forward-element cursor)))))
+(define-gsharp-command com-octave-down ()
+ (let ((element (cur-element)))
+ (let* ((note (cur-note))
+ (new-note (make-note (- (pitch note) 7) (staff note)
+ :head (head note)
+ :accidentals (accidentals note)
+ :dots (dots note))))
+ (remove-note note)
+ (add-note element new-note)
+ (setf *current-note* new-note))))
+
+(define-gsharp-command com-octave-up ()
+ (let ((element (cur-element)))
+ (let* ((note (cur-note))
+ (new-note (make-note (+ (pitch note) 7) (staff note)
+ :head (head note)
+ :accidentals (accidentals note)
+ :dots (dots note))))
+ (remove-note note)
+ (add-note element new-note)
+ (setf *current-note* new-note))))
+
(define-gsharp-command com-sharper ()
(let* ((cluster (cur-cluster))
(note (cur-note))
--- /project/gsharp/cvsroot/gsharp/modes.lisp 2006/06/14 19:06:55 1.17
+++ /project/gsharp/cvsroot/gsharp/modes.lisp 2006/06/14 19:20:41 1.18
@@ -85,6 +85,8 @@
(set-key 'com-rotate-stem-direction 'cluster-table '((#\s :meta)))
(set-key 'com-current-increment 'cluster-table '((#\p)))
(set-key 'com-current-decrement 'cluster-table '((#\n)))
+(set-key 'com-octave-up 'cluster-table '((#\U :shift :meta)))
+(set-key 'com-octave-down 'cluster-table '((#\D :shift :meta)))
;;; lyrics mode table
1
0
Update of /project/gsharp/cvsroot/gsharp
In directory clnet:/tmp/cvs-serv30173
Modified Files:
modes.lisp
Log Message:
Make com-up and com-down work for rests as well.
--- /project/gsharp/cvsroot/gsharp/modes.lisp 2006/06/13 19:39:56 1.16
+++ /project/gsharp/cvsroot/gsharp/modes.lisp 2006/06/14 19:06:55 1.17
@@ -60,6 +60,8 @@
(set-key 'com-fewer-rbeams 'rhythmic-table '((#\x) (#\])))
(set-key 'com-rotate-notehead 'rhythmic-table '((#\h :meta)))
(set-key 'com-rotate-notehead 'rhythmic-table '((#\r :control))) ; why this one too?
+(set-key 'com-up 'rhythmic-table '((#\u :meta)))
+(set-key 'com-down 'rhythmic-table '((#\d :meta)))
;;; the cluster table contains commands that are specific to
;;; clusters
@@ -76,8 +78,6 @@
(set-key 'com-add-note-g 'cluster-table '(#\G))
(set-key 'com-add-note-a 'cluster-table '(#\A))
(set-key 'com-add-note-b 'cluster-table '(#\B))
-(set-key 'com-up 'cluster-table '((#\u :meta)))
-(set-key 'com-down 'cluster-table '((#\d :meta)))
(set-key 'com-tie-note-left 'cluster-table '((#\{)))
(set-key 'com-tie-note-right 'cluster-table '((#\})))
(set-key 'com-untie-note-left 'cluster-table '((#\x) (#\{)))
1
0
Update of /project/gsharp/cvsroot/gsharp/Scores
In directory clnet:/tmp/cvs-serv24264
Modified Files:
bach-suite-iv-prelude.gsh
Log Message:
Typed a few more bars.
Now I need to know how to change the key signature in the middle of
a staff.
--- /project/gsharp/cvsroot/gsharp/Scores/bach-suite-iv-prelude.gsh 2006/06/14 05:01:31 1.2
+++ /project/gsharp/cvsroot/gsharp/Scores/bach-suite-iv-prelude.gsh 2006/06/14 18:24:08 1.3
@@ -4051,62 +4051,57 @@
:staff #2#
:head :FILLED
:accidentals :NATURAL
- :dots 0 ]) ]) ]) ]
- :tail [GSHARP-BUFFER:SLICE
- :bars ([GSHARP-BUFFER:MELODY-BAR
- :elements COMMON-LISP:NIL ]) ] ]
- [GSHARP-BUFFER:MELODY-LAYER
- :name "treble"
- :staves (#1#)
- :head [GSHARP-BUFFER:SLICE
- :bars ([GSHARP-BUFFER:MELODY-BAR
- :elements COMMON-LISP:NIL ]) ]
- :body [GSHARP-BUFFER:SLICE
- :bars ([GSHARP-BUFFER:MELODY-BAR
- :elements ([GSHARP-BUFFER:REST
+ :dots 0 ]) ]) ]
+ [GSHARP-BUFFER:MELODY-BAR
+ :elements ([GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 2
+ :rbeams 1
:lbeams 0
- :dots 0
- :staff #1#
- :staff-pos 4 ]
+ :dots 1
+ :stem-direction :AUTO
+ :notes ([GSHARP-BUFFER:NOTE
+ :pitch 21
+ :staff #2#
+ :head :FILLED
+ :accidentals :NATURAL
+ :dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 2
- :lbeams 0
+ :rbeams 1
+ :lbeams 2
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 28
- :staff #1#
+ :pitch 22
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 2
- :lbeams 2
- :dots 0
+ :rbeams 1
+ :lbeams 0
+ :dots 1
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 29
- :staff #1#
+ :pitch 20
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 2
+ :rbeams 1
:lbeams 2
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 30
- :staff #1#
+ :pitch 21
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -4118,8 +4113,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 31
- :staff #1#
+ :pitch 21
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -4131,8 +4126,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 32
- :staff #1#
+ :pitch 18
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -4144,8 +4139,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 33
- :staff #1#
+ :pitch 19
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -4157,10 +4152,10 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 31
- :staff #1#
+ :pitch 20
+ :staff #2#
:head :FILLED
- :accidentals :NATURAL
+ :accidentals :FLAT
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
@@ -4168,12 +4163,12 @@
:rbeams 2
:lbeams 0
:dots 0
- :stem-direction :UP
+ :stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 34
- :staff #1#
+ :pitch 21
+ :staff #2#
:head :FILLED
- :accidentals :FLAT
+ :accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
@@ -4183,8 +4178,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 35
- :staff #1#
+ :pitch 22
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -4196,10 +4191,10 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 34
- :staff #1#
+ :pitch 23
+ :staff #2#
:head :FILLED
- :accidentals :FLAT
+ :accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
@@ -4209,12 +4204,13 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 33
- :staff #1#
+ :pitch 21
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
- :dots 0 ]) ]
- [GSHARP-BUFFER:CLUSTER
+ :dots 0 ]) ]) ]
+ [GSHARP-BUFFER:MELODY-BAR
+ :elements ([GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 2
@@ -4222,8 +4218,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 32
- :staff #1#
+ :pitch 24
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -4235,8 +4231,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 35
- :staff #1#
+ :pitch 25
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -4248,10 +4244,10 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 34
- :staff #1#
+ :pitch 24
+ :staff #2#
:head :FILLED
- :accidentals :FLAT
+ :accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
@@ -4261,118 +4257,116 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 35
- :staff #1#
+ :pitch 23
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
- :dots 0 ]) ]) ]
- [GSHARP-BUFFER:MELODY-BAR
- :elements ([GSHARP-BUFFER:CLUSTER
+ :dots 0 ]) ]
+ [GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
+ :rbeams 2
:lbeams 0
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 33
- :staff #1#
+ :pitch 22
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
- :lbeams 1
+ :rbeams 2
+ :lbeams 2
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 31
- :staff #1#
+ :pitch 25
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
- :lbeams 0
- :dots 1
+ :rbeams 2
+ :lbeams 2
+ :dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 38
- :staff #1#
+ :pitch 24
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
+ :rbeams 2
:lbeams 2
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 38
- :staff #1#
+ :pitch 25
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
+ :rbeams 2
:lbeams 0
- :dots 1
+ :dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 38
- :staff #1#
+ :pitch 23
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
+ :rbeams 2
:lbeams 2
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 39
- :staff #1#
+ :pitch 25
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
- :lbeams 0
- :dots 1
+ :rbeams 2
+ :lbeams 2
+ :dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 37
- :staff #1#
+ :pitch 26
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
+ :rbeams 2
:lbeams 2
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 38
- :staff #1#
+ :pitch 27
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
- :dots 0 ]) ]) ]
- [GSHARP-BUFFER:MELODY-BAR
- :elements ([GSHARP-BUFFER:CLUSTER
+ :dots 0 ]) ]
+ [GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 2
@@ -4380,8 +4374,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 38
- :staff #1#
+ :pitch 28
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -4393,8 +4387,8 @@
:dots 0
[8965 lines skipped]
1
0
Update of /project/gsharp/cvsroot/gsharp
In directory clnet:/tmp/cvs-serv13091
Modified Files:
drawing.lisp
Log Message:
Modify distances between systems and staves to fit a printed A4 better.
Constants are still hardcoded, though.
--- /project/gsharp/cvsroot/gsharp/drawing.lisp 2006/06/13 01:18:10 1.69
+++ /project/gsharp/cvsroot/gsharp/drawing.lisp 2006/06/14 05:03:14 1.70
@@ -480,7 +480,7 @@
(right-edge (right-edge buffer))
(systems-per-page (max 1 (floor 12 (length staves)))))
(loop for staff in staves
- for offset from 0 by 90 do
+ for offset from 0 by 70 do
(setf (staff-yoffset staff) offset))
(let ((yy y))
(gsharp-measure::new-map-over-obseq-subsequences
@@ -493,7 +493,7 @@
(loop for measures in measure-seqs do
(compute-and-draw-system pane buffer staves measures
method x yy timesig-offset right-edge)
- (incf yy (* 90 (length staves)))))))
+ (incf yy (+ 20 (* 70 (length staves))))))))
buffer)))))
(define-added-mixin velement () melody-element
1
0
Update of /project/gsharp/cvsroot/gsharp/Scores
In directory clnet:/tmp/cvs-serv13018
Modified Files:
bach-suite-iv-prelude.gsh
Log Message:
Bug fixes and more bars.
--- /project/gsharp/cvsroot/gsharp/Scores/bach-suite-iv-prelude.gsh 2006/06/13 04:21:49 1.1
+++ /project/gsharp/cvsroot/gsharp/Scores/bach-suite-iv-prelude.gsh 2006/06/14 05:01:31 1.2
@@ -1,7 +1,7 @@
G#V4
[GSHARP-BUFFER:BUFFER
- :min-width 17
+ :min-width 12
:spacing-style 0.4
:right-edge 700
:left-offset 30
@@ -3149,6 +3149,14 @@
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
+ [GSHARP-BUFFER:REST
+ :xoffset 0
+ :notehead :FILLED
+ :rbeams 2
+ :lbeams 0
+ :dots 0
+ :staff #2#
+ :staff-pos 4 ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
@@ -3293,36 +3301,29 @@
:accidentals :NATURAL
:dots 0 ]) ]) ]
[GSHARP-BUFFER:MELODY-BAR
- :elements COMMON-LISP:NIL ]) ]
- :tail [GSHARP-BUFFER:SLICE
- :bars ([GSHARP-BUFFER:MELODY-BAR
- :elements COMMON-LISP:NIL ]) ] ]
- [GSHARP-BUFFER:MELODY-LAYER
- :name "treble"
- :staves (#1#)
- :head [GSHARP-BUFFER:SLICE
- :bars ([GSHARP-BUFFER:MELODY-BAR
- :elements COMMON-LISP:NIL ]) ]
- :body [GSHARP-BUFFER:SLICE
- :bars ([GSHARP-BUFFER:MELODY-BAR
- :elements ([GSHARP-BUFFER:REST
+ :elements ([GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 2
:lbeams 0
:dots 0
- :staff #1#
- :staff-pos 4 ]
+ :stem-direction :AUTO
+ :notes ([GSHARP-BUFFER:NOTE
+ :pitch 23
+ :staff #2#
+ :head :FILLED
+ :accidentals :NATURAL
+ :dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
:rbeams 2
- :lbeams 0
+ :lbeams 2
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
:pitch 28
- :staff #1#
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3334,8 +3335,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 29
- :staff #1#
+ :pitch 24
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3347,8 +3348,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 30
- :staff #1#
+ :pitch 28
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3360,8 +3361,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 31
- :staff #1#
+ :pitch 23
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3373,8 +3374,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 32
- :staff #1#
+ :pitch 28
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3386,8 +3387,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 33
- :staff #1#
+ :pitch 22
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3399,8 +3400,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 31
- :staff #1#
+ :pitch 28
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3410,12 +3411,12 @@
:rbeams 2
:lbeams 0
:dots 0
- :stem-direction :UP
+ :stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 34
- :staff #1#
+ :pitch 21
+ :staff #2#
:head :FILLED
- :accidentals :FLAT
+ :accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
@@ -3425,8 +3426,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 35
- :staff #1#
+ :pitch 28
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3438,10 +3439,10 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 34
- :staff #1#
+ :pitch 22
+ :staff #2#
:head :FILLED
- :accidentals :FLAT
+ :accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
@@ -3451,8 +3452,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 33
- :staff #1#
+ :pitch 28
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3464,8 +3465,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 32
- :staff #1#
+ :pitch 23
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3477,8 +3478,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 35
- :staff #1#
+ :pitch 28
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
@@ -3490,10 +3491,10 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 34
- :staff #1#
+ :pitch 24
+ :staff #2#
:head :FILLED
- :accidentals :FLAT
+ :accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
@@ -3503,8 +3504,8 @@
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 35
- :staff #1#
+ :pitch 28
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]) ]
@@ -3512,131 +3513,150 @@
:elements ([GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
+ :rbeams 2
:lbeams 0
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 33
- :staff #1#
+ :pitch 27
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
- [GSHARP-BUFFER:CLUSTER
+ [GSHARP-BUFFER:REST
:xoffset 0
:notehead :FILLED
:rbeams 1
- :lbeams 1
+ :lbeams 0
+ :dots 0
+ :staff #2#
+ :staff-pos 4 ]
+ [GSHARP-BUFFER:REST
+ :xoffset 0
+ :notehead :FILLED
+ :rbeams 0
+ :lbeams 0
+ :dots 0
+ :staff #2#
+ :staff-pos 4 ]) ]
+ [GSHARP-BUFFER:MELODY-BAR
+ :elements ([GSHARP-BUFFER:REST
+ :xoffset 0
+ :notehead :FILLED
+ :rbeams 2
+ :lbeams 0
+ :dots 0
+ :staff #2#
+ :staff-pos 4 ]
+ [GSHARP-BUFFER:CLUSTER
+ :xoffset 0
+ :notehead :FILLED
+ :rbeams 2
+ :lbeams 0
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 31
- :staff #1#
+ :pitch 25
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
- :lbeams 0
- :dots 1
+ :rbeams 2
+ :lbeams 2
+ :dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 38
- :staff #1#
+ :pitch 27
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
+ :rbeams 2
:lbeams 2
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 38
- :staff #1#
+ :pitch 29
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
+ :rbeams 2
:lbeams 0
- :dots 1
+ :dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 38
- :staff #1#
+ :pitch 27
+ :staff #2#
:head :FILLED
- :accidentals :NATURAL
+ :accidentals :FLAT
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
+ :rbeams 2
:lbeams 2
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 39
- :staff #1#
+ :pitch 25
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
- :lbeams 0
- :dots 1
+ :rbeams 2
+ :lbeams 2
+ :dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 37
- :staff #1#
+ :pitch 27
+ :staff #2#
:head :FILLED
- :accidentals :NATURAL
+ :accidentals :FLAT
:dots 0 ]) ]
[GSHARP-BUFFER:CLUSTER
:xoffset 0
:notehead :FILLED
- :rbeams 1
+ :rbeams 2
:lbeams 2
:dots 0
:stem-direction :AUTO
:notes ([GSHARP-BUFFER:NOTE
- :pitch 38
- :staff #1#
+ :pitch 29
+ :staff #2#
:head :FILLED
:accidentals :NATURAL
[6341 lines skipped]
1
0