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