]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/changes.tely
Issue 3292/1: Changes entry for changed \defaultchild behavior (issue 3225)
[lilypond.git] / Documentation / changes.tely
1 \input texinfo @c -*- coding: utf-8; mode: texinfo; -*-
2 @setfilename lilypond-changes.info
3 @settitle LilyPond Changes
4
5 @include macros.itexi
6
7 @ifhtml
8 @macro inputfileref{DIR,NAME}
9 @uref{../../\DIR\/collated-files.html#\NAME\,@file{\DIR\/\NAME\}}@c
10 @end macro
11 @macro usermanref{NAME}
12 @inforef{\NAME\,,../user/lilypond/lilypond}@c
13 @end macro
14 @end ifhtml
15
16 @ifnothtml
17 @macro inputfileref{DIR,NAME}
18 @file{\DIR\/\NAME\}@c
19 @end macro
20 @macro usermanref{NAME}
21 See user manual, \NAME\
22 @end macro
23 @end ifnothtml
24
25 @macro textanchor{NAME}
26 @html
27 <a name="\NAME\"></a>
28 @end html
29 @end macro
30
31
32 @documentencoding utf-8
33 @documentlanguage en
34 @afourpaper
35
36 @finalout
37
38 @node Top
39 @top New features in 2.18 since 2.16
40
41 @allowcodebreaks false
42
43 @itemize
44
45 @ignore
46
47 HINTS
48
49 * add new items at the top
50
51 * only show verbatim input for syntax/input changes
52
53 * try to be as brief possible in those cases
54
55 * don't try to provide real-world examples, they often get too big,
56 which scares away people.
57
58 * Write complete sentences.
59
60 * only show user-visible changes.
61
62 @end ignore
63
64 @item
65 LilyPond no longer automatically infers a @samp{\defaultchild}
66 context in a context definition with @samp{\accepts} clauses.  Any
67 context definition without an explicit or inherited
68 @samp{\defaultchild} definition counts as a @samp{Bottom} context
69 and will be eligible for rhythmic events and overrides without
70 causing the implicit creation of other contexts.  Be sure to
71 specify a @samp{\defaultchild} for non-@samp{Bottom} contexts when
72 defining them from scratch.
73
74 @item
75 There is now extensive support for both discant and bass accordion
76 register symbols in the @samp{scm accreg} module, see
77 @ruser{Accordion Registers}.
78 @lilypond[verbatim,quote]
79 #(use-modules (scm accreg))
80 \new PianoStaff
81 <<
82   \new Staff \relative
83   { \clef "treble"  \discant "10"
84     r8 s32 f'[ bes f] s e[ a e] s d[ g d] s16 e32[ a]
85     \discant "121"
86     << { r16 <f bes> r <e a> r <d g> } \\
87        { d r a r bes r } >> |
88     <cis e a>1
89   }
90   \new Staff \relative
91   { \clef "treble"  \freeBass "1"
92     r8 d'32 s16. c32 s16. bes32 s16. a32[ cis] s16
93     \clef "bass"  \stdBass "Master"
94     << { r16 <f, bes d>^"b" r <e a c>^"am" r <d g bes>^"gm" |
95          <e a cis>1^"a" } \\
96        { d8_"D" c_"C" bes_"B" | a1_"A" }
97     >>
98   }
99 >>
100 @end lilypond
101
102 @item
103 Decimal numbers can now be written directly in music,
104 without a hash sign.  Together with the previous change
105 in the way object properties are specified, the code to
106 change the length of stems has changed from this:
107 @example
108 \override Stem #'length = #5.6
109 e' f' g' a'
110 @end example
111 to this:
112 @example
113 \override Stem.length = 5.6
114 e' f' g' a'
115 @end example
116
117 One has to write a digit on both sides of the dot -- values like
118 @code{4.} or @code{-.3} are not allowed.
119
120 Decimal fractions are also not accepted in @code{\chordmode}.
121
122 @item
123 A number of shorthands like @code{(}, @code{)}, @code{|},
124 @code{[}, @code{]}, @code{~}, @code{\(}, @code{\)} and others can
125 now freely be redefined like normal commands.  An example would be
126 @lilypond[verbatim,quote]
127 "\\{" = (
128 "\\}" = )
129 "(" = \melisma
130 ")" = \melismaEnd
131
132 \new Staff <<
133   \relative c' {
134     c8 \{ d e f \} % slurred
135     g ( a b c ) % no slur, but with melisma
136     c,1 \bar "|."
137    }
138    \addlyrics { Li -- ly -- pond. }
139 >>
140 @end lilypond
141
142 @item
143 The articulation shorthand for @code{\staccatissimo} has been
144 renamed from @code{-|} to@tie{}@code{-!}.
145
146 @item
147 Tempo change ranges are now written as @code{\tempo 4 = 60 - 68}
148 rather than @code{\tempo 4 = 60 ~ 68}.
149
150 @item
151 Grob @code{OctavateEight} was renamed to @code{ClefModifier}.
152 Related context properties were renamed from @code{xxxOctavationyyy}
153 to @code{xxxTranspositionyyy}.
154
155 @item
156 There is a new @code{\absolute} command explicitly marking music
157 as being entered in absolute pitch.  While this has been the
158 default previously, an explicit @code{\absolute} also prevents
159 reinterpretation when the passage is placed inside of
160 @code{\relative}:
161 @lilypond[verbatim,quote]
162 \relative c { c'4 \absolute { f'' g'' } c }
163 @end lilypond
164
165 @item
166 When @code{\relative} is used without an explicit reference pitch,
167 the reference pitch now is the middle of the first octave, making
168 the first entered pitch indistinguishable from absolute pitch.
169 Previously, omitting the reference pitch would have lead to a
170 default of @code{c'}.  Since that choice was somewhat arbitrary,
171 recommended usage was to always specify the reference pitch.
172
173 @item
174 A new command @code{\single} can be used for converting a property
175 override into a tweak to be applied on a single music expression:
176
177 @lilypond[quote,verbatim,relative=2]
178 <a \single\voiceTwoStyle e' a>1
179 @end lilypond
180
181 @item
182 Two ways of letting graphical objects not appear in the output are
183 overriding its @code{transparent} property with @code{#t}
184 (retaining the original spacing) or overriding its @code{stencil}
185 property with @code{#f} (not using any space at all).  Those two
186 operations now have the shorthands @code{\hide} and @code{\omit},
187 respectively.  They can either be given a music expression to
188 tweak, or the name of a graphical object for which an override
189 should be created (for specifying both, use @code{\single} on the
190 override form):
191
192 @lilypond[quote,verbatim]
193 \new Staff \with { \omit Clef }
194 \relative c'' <a e' \hide a>1
195 @end lilypond
196
197 @item
198 A new command @code{\temporary} can be applied to overrides in
199 order to not have them replace previous property settings.  If a
200 @code{\revert} is applied to the same property subsequently, the
201 previous setting reappears:
202
203 @lilypond[quote,verbatim,relative=2]
204 \override NoteHead.color = #red c4
205 \override NoteHead.color = #green d
206 \revert NoteHead.color e2
207 \override NoteHead.color = #red c4
208 \temporary\override NoteHead.color = #green d
209 \revert NoteHead.color e
210 \revert NoteHead.color c
211 @end lilypond
212
213 This is mainly useful for writing music functions that need to
214 have some property changed just for the duration of the function.
215
216 @item
217 @code{\tag}, @code{\removeWithTag}, and @code{\keepWithTag} can
218 now accept a list of symbols rather than just a single symbol for
219 marking, removing, and keeping music with any of multiple tags.
220 This is particularly important for @code{\keepWithTag} since one
221 cannot achieve the same effect by using multiple consecutive
222 @code{\keepWithTag} commands.
223
224 @item
225 The @samp{-d old-relative} option has been removed.  Not actually
226 accessible from the command line any more, its remaining use was
227 for interpretating @code{\relative} in LilyPond files converted
228 automatically from version@tie{}1.8 or older.  It is unclear how
229 much of this was actually still operative.
230
231 @item
232 The meaning of @code{instrumentTransposition} has been reversed.
233 After
234 @example
235 \set instrumentTransposition = #@{ b #@}
236 @end example
237 a written @code{c'} now sounds like @code{b}.  Previously, this
238 would have been the other way round.  This and the following change
239 should make dealing with transposing instruments more
240 straightforward.
241
242 @item
243 The music generated by @code{\set} and @code{\override} commands
244 is no longer affected by @code{\transpose}.  The main consequence
245 is that @code{\transpose} will transpose audible/@/concert pitch and
246 printed pitch by the same amount even when the transposed music
247 contains @code{\transposition}.  Previously,
248 @example
249 \transpose c' f' \transposition bes'
250 @end example
251 was equivalent to @code{\transposition f'}.  Now it stays
252 equivalent to @code{\transposition bes'}.
253
254 @item
255 When checking for collisions, LilyPond no longer treats objects as
256 rectangles.  Instead, the actual shape of objects is approximated
257 using an integral-like approach.  This generally results in more
258 even and snug positioning of objects and systems:
259
260 @lilypond[relative=1]
261 #(ly:set-option 'debug-skylines #t)
262 \dynamicUp
263 c'4\f a4\f d\f( f)
264 a,4\< c c c\!
265 d4-.\downbow a4^"r'venu..." c \tempo "T1" e
266 @end lilypond
267
268 Previously, the above snippet looked like this:
269
270 @lilypond[relative=1]
271 #(ly:set-option 'debug-skylines #t)
272 \override Hairpin #'vertical-skylines = #'()
273 \override DynamicText #'vertical-skylines = #'()
274 \override TextScript #'vertical-skylines = #'()
275 \override Score.MetronomeMark #'vertical-skylines = #'()
276 \override Staff.Clef #'vertical-skylines = #'()
277 \dynamicUp
278 c'4\f a4\f d\f( f)
279 a,4\< c c c\!
280 d4-.\downbow a4^"r'venu..." c \tempo "T1" e
281 @end lilypond
282
283 Affected objects include @code{Accidentals}, @code{Beams}, @code{Clefs},
284 @code{Dynamics}, @code{FiguredBass}, @code{Flags}, @code{Glissandos},
285 @code{Lyrics}, @code{MetronomeMarks}, @code{OttavaBrackets},
286 @code{Pedals}, @code{RehearsalMarks}, @code{Rests}, @code{Scripts},
287 @code{TextScripts}, @code{Ties}, @code{Tuplets} and @code{VoltaBrackets}.
288
289 @item
290 Tuplets are now created with the @code{\tuplet} command, which
291 takes a fraction @code{@var{t}/@var{n}} to specify that @var{t}
292 notes are played in the time usually allowed for @var{n}. One
293 @code{\tuplet} command can create several tuplet groups if their
294 duration is typed after the fraction.
295 @lilypond[quote,verbatim,relative=2]
296 \tuplet 3/2 { c8 d e } \tuplet 3/2 { f e d } c2
297 \tuplet 3/2 4 { c8 d e f e d } c2
298 @end lilypond
299 The @code{\times} command with its inverted fraction order
300 @code{@var{n}/@var{t}} is still available.
301
302 @item
303 Introducing two new markup-commands; @code{\draw-dashed-line} and
304 @code{\draw-dotted-line}.
305
306 @noindent
307 The dashed-line extends to the whole length given by @var{dest}, if
308 @code{full-length} is set to @code{#t} (this is the default) without any
309 space at the beginning or end.  @code{off} will then be altered to fit.
310 To insist on the given (or default) values of @code{on}, @code{off} use
311 @code{\override #'(full-length . #f)}.  Manual settings for @code{on},
312 @code{off} and @code{phase} are possible.
313
314 @noindent
315 The dotted-line always extends to the whole length given by @var{dest},
316 without any space at the beginning or end.  Manual settings for
317 @code{off} are possible to get larger or smaller space between the dots.
318 The given (or default) value of @code{off} will be altered to fit the
319 line-length.
320
321 @lilypond[verbatim,quote]
322 \markup {
323   \draw-dashed-line #'(5.1 . 2.3)
324   \override #'(on . 0.3)
325   \override #'(off . 0.5)
326   \draw-dashed-line #'(5.1 . 2.3)
327   \draw-dotted-line #'(5.1 . 2.3)
328   \override #'(thickness . 2)
329   \override #'(off . 0.2)
330   \draw-dotted-line #'(5.1 . 2.3)
331 }
332 @end lilypond
333
334 @item
335 Starting with version@tie{}2.17.10, error messages or the
336 @code{textedit} @acronym{URI} used for point-and-click
337 functionality specify column numbers starting with@tie{}1 rather
338 than@tie{}0.  The byte offset (also part of @code{textedit}
339 @acronym{URI}s) still starts at@tie{}0.
340
341 @item
342 The @code{\clef} command supports optional transposition:
343 @lilypond[verbatim,quote,relative=1]
344 \clef "treble_(8)"
345 c2 c
346 \clef "bass^[15]"
347 c2 c
348 @end lilypond
349
350 @item
351 The LilyPond syntax of dot-separated words @code{Voice.Accidental}
352 has been made interchangeable with @code{#'(Voice Accidental)}, a
353 Scheme list of symbols.  As one result, code like
354 @example
355 \override Voice.TextSpanner #'(bound-details left text) = "rit."
356 @end example
357 is now equivalent to
358 @example
359 \override Voice.TextSpanner bound-details.left.text = "rit."
360 @end example
361 or even
362 @example
363 \override #'(Voice TextSpanner) bound-details.left.text = "rit."
364 @end example
365
366 @item
367 Grob and grob property path no longer need to be specified as two
368 separate arguments to commands like @samp{\override} and
369 @code{\revert}, allowing for the syntax
370 @example
371 \override Voice.TextSpanner.bound-details.left.text = "rit."
372 @end example
373 Since complementary music functions like @samp{\overrideProperty}
374 cannot support forms with and without separating space at the same
375 time, using a single dotted path is now the preferred form.
376 Specifying grob path and grob property path separately, currently
377 still supported with @samp{\override} and @samp{\revert} for
378 compatibility reasons, is deprecated.
379
380 @item
381 Due to words now being accepted as symbol function arguments, the
382 interfaces of @samp{\accidentalStyle}, @samp{\alterBroken},
383 @samp{\footnote} and @samp{\tweak} had to be redesigned where
384 optional symbol arguments were involved.  Please check the
385 respective music function documentation for details.
386
387 @item
388 Several commands now accept symbol lists (conveniently entered as
389 dot-separated words) for various kinds of arguments.  These
390 include @samp{\accidentalStyle}, @samp{\alterBroken},
391 @samp{\footnote}, @samp{\hide}, @samp{\omit},
392 @samp{\overrideProperty}, @samp{\shape}, and @samp{\tweak}.
393
394 @item
395 The bar line user interface has changed. Bar glyphs now resemble the
396 appearance of the bar line, so a left repeat sign has to be coded
397 as @code{.|:}. The command @code{\defineBarLine} provides an easy way
398 to define additional bar line styles.
399
400 @item
401 Accidentals in the key signature may be printed in octaves other
402 than their traditional positions, or in multiple octaves.
403 @lilypond[quote,relative=0]
404 \override Staff.KeySignature #'flat-positions = #'((-5 . 5))
405 \override Staff.KeyCancellation #'flat-positions = #'((-5 . 5))
406 \clef bass \key es \major es g bes d
407 \clef treble \bar "||" \key es \major es g bes d
408 \override Staff.KeySignature #'sharp-positions = #'(2)
409 \bar "||" \key d \major b fis b2
410 @end lilypond
411
412 @end itemize
413
414 @ifhtml
415 For older news, go to
416 @uref{http://lilypond.org/doc/v2.16/Documentation/changes/},
417 @uref{http://lilypond.org/doc/v2.14/Documentation/changes/},
418 or @uref{../,go back} to the Documentation index.
419
420
421 @end ifhtml
422
423 @bye