[CM] CMN - weird accent placement

andersvi@extern.uio.no andersvi@extern.uio.no
Sat, 14 Apr 2007 16:59:15 +0200


>>>>> "B" == Bill Sack <bsack23@gmail.com> writes:

    B> CMN seems to be putting accents above the staff no matter
    B> what. I tried the test case in cmn1.lisp and there seem to be
    B> similar problems with little-swell, down-bow, up-bow and some
    B> others.  Shouldn't the default, for accent at least, be
    B> opposite the stem direction? i don't recall this being a
    B> problem before - i wonder if it's recently broken ...

    B> bill sack

Dont know when this crept in, but at least accents should be placed
opposite stems.  The fix is easy, put a test on

  '(direction-from-note mark note)'

to check for direction. ie:  

(defun display-accent (mark note score &optional justifying)
  (declare (ignore justifying))
  (let ((dir (direction-from-note mark note)))
    (show score mark
	  :matrix (translate-matrix
		   score mark
		   (+ (box-x0 note) (vis-dx mark) (center note) -.2 (x0 mark))
		   (+ (box-y0 mark) (vis-dy mark) 
		      (if (eq dir :down)
			  (+ (staff-y0 note) (min (* (- (head-line note) 4) *staff-line-separation*) -.5))
			(max (+ (or (stem-end note) 0) .125)
			     (+ (staff-y0 note)
				(* (max 10 (+ 3 (head-line note))) 
				   *staff-line-separation*)))))))))


But some marks are placed above staff by default.  If someone could
compile or link to a list of default-placement for the marks (and
ideally all marks in accent.lisp as well):

	      staccato
	      accent 
	      little-swell 
	      edge
	      tenuto
	      marcato
	      down-bow
	      up-bow  
	      detache
	      martele
	      thumb
	      natural-harmonic
	      bartok-pizzicato
	      stopped-note
	      open-note
	      left-hand-pizzicato

and fill in default direction (ie: opposite-stem/up/down) for the
various marks, it would be a rather small job going through the
various #'display-some-mark programs which needs fixing (i think...)
Anyone?

-anders