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