lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

improved accidental algorithm


From: Han-Wen Nienhuys
Subject: improved accidental algorithm
Date: Wed, 24 Jul 2002 17:18:14 +0200

(to lilypond-devel, perhaps you can report the original on devel too
for the benefit of the readers.)

address@hidden writes:
> the same time in a staff; it makes sense to add an option to handle
> chords grouped by stem direction (this should also cover the case
> where a single stem connects notes from different staves).
> 
> I forgot to put Wanske's book into my travelling baggage -- can
> someone please test my algorithm against her collected devils?
> 
> As soon as I know how to shift accidentals, I will provide images.

it's kind of hairy  (as you might imagine), but the trick is to use
\outputproperty  and to \turnOff AccidentalPlacement (the last thing
probably needs a fix that is in CVS).

something like:


   #(define (make-acc-position-checker  pos)
     (lambda (elt)
      (and
        (eq?  (ly-get-grob-property elt 'staff-position) pos)
        (not (eq? #f (memq accidental-interface (ly-get-grob-property elt 
'interfaces)))))))



  \context Staff \outputproperty #(make-acc-position-checker 15)
     #'extra-offset = #'(X . Y)
  


-- 

Han-Wen Nienhuys   |   address@hidden    | http://www.cs.uu.nl/~hanwen/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]