]> git.donarmstrong.com Git - lilypond.git/blob - input/test/move-accidentals.ly
ee2133bed258f203b0c03efe416de13327835e0d
[lilypond.git] / input / test / move-accidentals.ly
1 \header {
2
3          texidoc= "Positions of accidentals may be manually set. This
4 involves some scheme code."
5
6 }
7 #(define (make-acc-position-checker pos)
8   (lambda (elt)
9    (and
10       (not (eq? #f (memq 'accidental-interface
11                     (ly-get-grob-property elt 'interfaces))))
12       (eq? (ly-get-grob-property
13             (ly-get-parent elt 1) 'staff-position) pos))))
14
15 \score {
16   \context Voice \notes \relative c'' {
17     c2.
18     <
19 \property Staff.AccidentalPlacement = \turnOff
20 \context Staff \outputproperty #(make-acc-position-checker 9)
21                                #'extra-offset = #'(-1 . 0)
22 \context Staff \outputproperty #(make-acc-position-checker 5)
23                                #'extra-offset = #'(-2 . 0)
24 \context Staff \outputproperty #(make-acc-position-checker 3)
25                                #'extra-offset = #'(-3 . 0)
26 \context Staff \outputproperty #(make-acc-position-checker 2)
27                                #'extra-offset = #'(-4 . 0)
28       d!4
29       eis
30       gis
31       d'!
32     >
33   }
34   \paper {
35     linewidth = -1
36   }
37 }