release commit
[lilypond.git] / input / test / move-accidentals.ly
blobe9a94a51f14ef3470f45a1427e8bac98d1b48918
1 #(ly:set-option 'old-relative)
2 \version "2.1.7"
3 % possible rename to scheme- or something like that. -gp
4 \header { texidoc= "@cindex Scheme Manual Accidentals
5 Positions of accidentals may be manually set. This
6 involves some scheme code. " }
8 #(define (make-acc-position-checker pos)
9 (lambda (elt)
10 (and
11 (not (eq? #f (memq 'accidental-interface
12 (ly:get-grob-property elt 'interfaces))))
13 (eq? (ly:get-grob-property
14 (ly:get-parent elt 1) 'staff-position) pos))))
16 \score {
17 \context Voice \notes \relative c'' {
18 c2.
20 \property Staff.AccidentalPlacement = \turnOff
21 \context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 9)
22 'extra-offset '(-1 . 0))
23 \context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 5)
24 'extra-offset '(-2 . 0))
25 \context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 3)
26 'extra-offset '(-3 . 0))
27 \context Staff \applyoutput #(outputproperty-compatibility (make-acc-position-checker 2)
28 'extra-offset '(-4 . 0))
29 d!4
30 eis
31 gis
32 d'!
35 \paper {
36 raggedright = ##t