5 Look at ly/engraver.ly for inspiration on which XXXX
8 Generally, you can find interesting element properties associated with
9 \property in scm/generic-property.scm. For example, this file contains
11 (define generic-stem-properties
14 (list 'stemVerticalDirection dir? 'direction)
15 (list 'verticalDirection dir? 'direction)
16 (list 'stemLength number? 'length)
17 (list 'flagStyle string? 'flag-style)
21 which means that setting \property stemVerticalDirection overrides
22 setting \property verticalDirection, and that both have the effect of
23 setting `direction' in Stem object. You can use \pushproperty for
24 setting stem directions by doing.
27 \pushproperty #'(Stem) #'direction #1
29 (#-1 if you want down).
31 A modest amount of memory is involved each time you do a
32 \pushproperty. If you do \popproperty in the right order (reversed
33 from \pushproperty), then \popproperty doesn't cost memory.
37 \pushproperty #'( ... ) #'symbolA #valueA
38 \pushproperty #'( ... ) #'symbolB #valueB
39 \popproperty #'( ... ) #'symbolB
40 \popproperty #'( ... ) #'symbolA
42 Incorrect (\popproperty costs memory):
44 \pushproperty #'( ... ) #'symbolA #valueA
45 \pushproperty #'( ... ) #'symbolB #valueB
46 \popproperty #'( ... ) #'symbolA
47 \popproperty #'( ... ) #'symbolB
49 You can use identifiers, eg.
51 slursUp = \context Voice \pushproperty '(Slur)
53 slursBoth = \context Voice \popproperty '(Slur)
60 \property Voice.Dots \push #'direction = #-1
61 \property Voice.Stem \push #'direction = #-1
62 \property Voice.noteColumnProperties \push #'direction = #-1
63 \property Voice.Stem \push #'direction = #-1
67 \property Voice.Slur \push #'direction = #-1
70 \property Dots \pop #'direction
71 \property Stem \pop #'direction
72 \property Script \pop #'direction
73 \property Text \pop #'direction
79 \translator { \VoiceContext
80 NoteHead \push #'font-relative-size = #-2