4 @c A menu is needed before every deeper *section nesting of @nodes
5 @c Run M-x texinfo-all-menus-update
6 @c to automagically fill in these menus
7 @c before saving changes
13 * different staff sizes
16 * move some stuff to refman
17 * merge some stuff with refman entries
19 * add @ref{}s to lilypond-internals:
21 @reng{Name} to engraver
23 there's a very simple, very general noXXX mechanism; try
25 noop \property Staff.VoltaBrace = #'()
26 yes: \property Staff.VoltaBracket = #'((meta . ((interfaces . ()))))
38 * Manual beam settings:: Manual beam settings
39 * Engraver hacking:: Engraver hacking
40 * Markup text:: Markup text
41 * Apply hacking:: Apply hacking
42 * Embedded TeX:: Embedded TeX
43 * Embedded PostScript:: Embedded PostScript
47 @node Manual beam settings
48 @section Manual beam settings
57 @cindex @code{no-stem-extend}
59 Conventionally, stems and beams extend to the middle staff line. This
60 extension can be controlled through @code{Voice.Stem}'s grob-property
61 @code{no-stem-extend}:
64 @lilypond[fragment,relative,verbatim]
66 \property Voice.Stem \set #'no-stem-extend = ##t
71 The direction of a perfectly centred beams can be
72 controlled through @code{Voice.Beam}'s grob-property
73 @code{default-neutral-direction}
76 @lilypond[fragment,relative,verbatim]
78 \property Voice.Beam \set #'default-neutral-direction = #-1
83 There are several ways to calculate the direction of a beam.
86 number count of up or down notes
88 mean center distance of all notes
90 mean centre distance weighted per note
93 You can spot the differences of these settings from these simple
97 @lilypond[fragment,relative,verbatim]
99 \property Voice.Beam \set #'dir-function = #beam-dir-mean
101 \property Voice.Beam \set #'dir-function = #beam-dir-median
107 @lilypond[fragment,relative,verbatim]
110 \property Voice.Beam \set #'dir-function = #beam-dir-mean
112 \property Voice.Beam \set #'dir-function = #beam-dir-median
117 These beam direction functions are defined in @file{scm/beam.scm}. If
118 your favourite algorithm isn't one of these, you can hook up your own.
122 @node Engraver hacking
123 @section Engraver hacking
125 No time signature, no barlines...
128 \notes \relative c'' {
137 \remove "Time_signature_engraver";
143 No staff, no clef, squash pitches
146 \notes { c4 c4 c8 c8 }
151 \remove Staff_symbol_engraver;
152 \consists Pitch_squash_engraver;
153 \remove Clef_engraver;
168 #(define text-flat '((font-relative-size . -2 ) (music "accidentals--1")))
170 \property VoiceCombineStaff.instrument = #`((kern . 0.5) (lines
171 "2 Clarinetti" (rows " (B" ,text-flat ")")))
174 \property StaffCombineStaff.instrument = #'((kern . 0.5)
175 (lines "Violoncello" (rows " e") (rows "Contrabasso")))
184 [todo: hack this into C++, use \tempo]
187 #(define note '(rows (music "noteheads-2" ((kern . -0.1) "flags-stem"))))
188 #(define eight-note `(rows ,note ((kern . -0.1) (music ((raise . 3.5) "flags-u3")))))
189 #(define dotted-eight-note `(rows ,eight-note (music "dots-dot")))
192 \notes\relative c'' {
193 a1^#`((rows (font-relative-size . -1)) ,dotted-eight-note " = 64")
199 TextScript \override #'font-shape = #'upright
210 @section Apply hacking
212 [Add Parenthesed note head example?]
214 [Add Smart transpose example?]
218 music = \notes { c'4 d'4( e'4 f'4 }
220 #(define (reverse-music music)
221 (let* ((elements (ly-get-mus-property music 'elements))
222 (reversed (reverse elements))
223 (span-dir (ly-get-mus-property music 'span-direction)))
225 (ly-set-mus-property music 'elements reversed)
228 (ly-set-mus-property music 'span-direction (- span-dir)))
230 (map reverse-music reversed)
237 \apply #reverse-music \music
239 \paper { linewidth = -1.; }
244 @section Embedded TeX
245 @lilypond[fragment,relative,verbatim]
246 a''^"3 $\\times$ \\`a deux"
249 @node Embedded PostScript
250 @section Embedded PostScript
252 Arbitrary lines and curves not supported...
254 [TODO:] Make a direct postscript command?
258 \notes \relative c'' {
259 a-#"\\embeddedps{3 4 moveto 5 3 rlineto stroke}"
260 -#"\\embeddedps{ [ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke}"
261 b-#"\\embeddedps{3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke}"
265 \paper { linewidth = 70 * \staffspace; }