]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/changes.tely
Issue 4418/6 edits to docs, tests, and changelog
[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.20 since 2.18
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 functions defined with @code{define-music-function},
66 @code{define-event-function}, @code{define-scheme-function} and
67 @code{define-void-function} can now be directly called from Scheme
68 as if they were genuine Scheme procedures.  Argument checking and
69 matching will still be performed in the same manner as when
70 calling the function through LilyPond input.  This includes the
71 insertion of defaults for optional arguments not matching their
72 predicates.  Instead of using @code{\default} in the actual
73 argument list for explicitly skipping a sequence of optional
74 arguments, @code{*unspecified*} can be employed.
75
76 @item
77 Current input location and parser are now stored in GUILE fluids
78 and can be referenced via the function calls @code{(*location*)}
79 and @code{(*parser*)}.  Consequently, a lot of functions
80 previously taking an explicit @code{parser} argument no longer do
81 so.
82
83 Functions defined with @code{define-music-function},
84 @code{define-event-function}, @code{define-scheme-function} and
85 @code{define-void-function} no longer use @code{parser} and
86 @code{location} arguments.
87
88 With those particular definitions, LilyPond will try to recognize
89 legacy use of @code{parser} and @code{location} arguments,
90 providing backwards-compatible semantics for some time.
91
92 @item
93 The @code{whiteout} grob property and @code{\whiteout} markup command
94 now create a white background built from multiple displaced copies of
95 the glyph in order to approximate the contours of its outline.
96 The previous rounded box white background can be achieved with the
97 new @code{whiteout-box} grob property and @code{\whiteout-box} markup
98 command.  Setting the @code{whiteout} property to a number now sets
99 the thickness of the white outline as a multiple of staff-line
100 thickness.  Similarly, overriding the @code{thickness} property of
101 the @code{\whiteout} markup command sets the thickness of the white
102 outline it produces.
103
104 @item
105 In the "english" notename language, the long notenames for pitches
106 with accidentals now contain a hyphen for better readability.  You
107 now have to write
108 @example
109 \key a-flat \major
110 @end example
111 instead of the previous
112 @example
113 \key aflat \major
114 @end example
115
116 Double accidentals do not get another hyphen, so the Dutch
117 @code{cisis} has the long English notename @code{c-sharpsharp}.
118
119 @item
120 The visual style of tremolo slashes (shape, style and slope)
121 is now more finely controlled.
122 @lilypond[quote,relative=2]
123   a8:32 b: c: d:
124   \override StemTremolo.shape = #'beam-like
125   a: b: c: d:
126   \override StemTremolo.style = #'constant
127   a: b: c: d:
128   g,2
129 @end lilypond
130
131
132 @item
133 Multi-measure rests have length according to their total duration,
134 under the control of @code{MultiMeasureRest.space-increment}.
135 @lilypond[quote]
136 { \compressFullBarRests
137   \override Staff.MultiMeasureRest.space-increment = 3.0
138   R1*2 R1*12 R1*64 }
139 @end lilypond
140
141 @item
142 Page numbers may now be printed in roman numerals, by setting the
143 @code{page-number-type} paper variable.
144
145 @item
146 It is now possible to use @code{\time} and @code{\partial}
147 together to change the time signature in mid measure.
148
149 @lilypond[verbatim,quote,relative=1]
150 \override Score.BarNumber.break-visibility = #end-of-line-invisible
151 \partial 4 \time 3/4 f4 | 2 4 | 2 \bar "||"
152 \time 9/8 \partial 4. f8 8 8 | 2. 8 8 8 |
153 @end lilypond
154
155 @item
156 It is now possible to override the @code{text} property of
157 chord names.
158
159 @lilypond[verbatim,fragment,quote]
160 <<
161 \new ChordNames \chordmode {
162   a' b c:7
163   \once \override ChordName.text = #"foo"
164   d
165 }
166 >>
167 @end lilypond
168
169 @item
170 Improved horizontal alignment when using @code{TextScript},
171 with @code{DynamicText} or @code{LyricText}.
172
173 @item
174 A new command @code{\magnifyStaff} has been added which scales staff
175 sizes, staff lines, bar lines, beamlets and horizontal spacing generally
176 at the @code{Staff} context level.  Staff lines are prevented from being
177 scaled smaller than the default since the thickness of stems, slurs, and
178 the like are all based on the staff line thickness.
179
180 @item
181 @code{InstrumentName} now supports @code{text-interface}.
182
183 @item
184 There is now support for controlling the @q{expression level} of
185 MIDI channels using the @code{Staff.midiExpression} context property.
186 This can be used to alter the perceived volume of even sustained notes
187 (albeit in a very @q{low-level} way) and accepts a number value between
188 @code{0.0} and @code{1.0}.
189
190 @example
191 \score @{
192   \new Staff \with @{
193     midiExpression = #0.6
194     midiInstrument = #"clarinet"
195   @}
196   <<
197     @{ a'1~ a'1 @}
198     @{
199       \set Staff.midiExpression = #0.7 s4\f\<
200       \set Staff.midiExpression = #0.8 s4
201       \set Staff.midiExpression = #0.9 s4
202       \set Staff.midiExpression = #1.0 s4
203
204       \set Staff.midiExpression = #0.9 s4\>
205       \set Staff.midiExpression = #0.8 s4
206       \set Staff.midiExpression = #0.7 s4
207       \set Staff.midiExpression = #0.6 s4\!
208     @}
209   >>
210   \midi @{ @}
211 @}
212 @end example
213
214 @item
215 Support for making it easier to use alternative @q{music} fonts other
216 than the default Emmentaler in LilyPond has been added.  See
217 @uref{http://fonts.openlilylib.org/} for more information.
218
219 @item
220 Grobs and their parents can now be aligned separately allowing
221 more flexibility for grob positions.  For example the @q{left} edge of a
222 grob can now be aligned on the @q{center} of its parent.
223
224 @item
225 Improvements to the @code{\partial} command have been made to
226 avoid problems when using multiple, parallel contexts.
227
228 @item @code{\chordmode} can now use @code{< >} and @code{<< >>}
229 constructs.
230
231 @item
232 The @code{NullVoice} context is now @q{below} @code{Score}.
233
234 @item
235 A new command @code{\tagGroup} has now been added.  This compliments
236 the existing @code{\keepWithTag} and @code{\removeWithTag} commands.
237 For Example:
238
239 @example
240 \tagGroup #'(violinI violinII viola cello)
241 @end example
242
243 declares a list of @q{tags} that belong to a single @q{tag group}.
244
245 @example
246 \keepwithTag#'violinI
247 @end example
248
249 Is now only concerned with @q{tags} from @q{violinI}’s tag group.
250
251 Any element of the included music tagged with one or more tags from the
252 group, but @emph{not} with @var{violinI}, will be removed.
253
254 @item
255 The @code{\addlyrics} function now works with arbitrary contexts
256 incuding @code{Staff}.
257
258 @item
259 String numbers can now also be used to print roman numerals
260 (e.g. for unfretted string instruments).
261 @lilypond[verbatim,quote,relative=2]
262 c2\2
263 \romanStringNumbers
264 c\2
265 \arabicStringNumbers
266 c1\3
267 @end lilypond
268
269 @item
270 The @code{thin-kern} property of the @code{BarLine} grob has been
271 renamed to @code{segno-kern}.
272
273 @item
274 @code{KeyCancellation} grobs now ignore cue clefs (like
275 @code{KeySignature} grobs do).
276
277 @item
278 Add support for @code{\once@tie{}\unset}
279
280 @item
281 It is now possible to individually color both the dots and parentheses
282 in fret diagrams when using the @code{\fret-diagram-verbose} markup
283 command.
284
285 @lilypond[verbatim,quote,relative=1]
286 \new Voice {
287   c1^\markup {
288     \override #'(fret-diagram-details . (
289                  (finger-code . in-dot))) {
290       \fret-diagram-verbose #'((mute 6)
291                                (place-fret 5 3 1 red)
292                                (place-fret 4 5 2 inverted)
293                                (place-fret 3 5 3 green)
294                                (place-fret 2 5 4 blue inverted)
295                                (place-fret 1 3 1 violet)
296                                (barre 5 1 3 ))
297     }
298   }
299   c1^\markup {
300     \override #'(fret-diagram-details . (
301                  (finger-code . below-string))) {
302       \fret-diagram-verbose #'((mute 6)
303                              (place-fret 5 3 1 red parenthesized)
304                              (place-fret 4 5 2 yellow
305                                                default-paren-color
306                                                parenthesized)
307                              (place-fret 3 5 3 green)
308                              (place-fret 2 5 4 blue )
309                              (place-fret 1 3 1)
310                              (barre 5 1 3))
311     }
312   }
313 }
314 @end lilypond
315
316 @item
317 Two new properties have been added for use in
318 @code{fret-diagram-details} when using the @code{\fret-diagram-verbose}
319 markup command; @code{fret-label-horizontal-offset} which affects the
320 @code{fret-label-indication} and @code{paren-padding} which controls the
321 space between the dot and the parentheses surrounding it.
322
323 @lilypond[verbatim,quote,relative=1]
324 \new Voice {
325   c1^\markup {
326     \fret-diagram-verbose #'((mute 6)
327                              (place-fret 5 3 1)
328                              (place-fret 4 5 2)
329                              (place-fret 3 5 3)
330                              (place-fret 1 6 4 parenthesized)
331                              (place-fret 2 3 1)
332                              (barre 5 2 3))
333   }
334   c1^\markup {
335     \override #'(fret-diagram-details . (
336                  (fret-label-horizontal-offset . 2)
337                  (paren-padding . 0.25))) {
338       \fret-diagram-verbose #'((mute 6)
339                                (place-fret 5 3 1)
340                                (place-fret 4 5 2)
341                                (place-fret 3 5 3)
342                                (place-fret 1 6 4 parenthesized)
343                                (place-fret 2 3 1)
344                                (barre 5 2 3))
345     }
346   }
347 }
348 @end lilypond
349
350 @item
351 A new markup command @code{\justify-line} has been added.  Similar to
352 the @code{\fill-line} markup command except that instead of setting
353 @emph{words} in columns, the @code{\justify-line} command balances the
354 whitespace between them ensuring that when there are three or more
355 words in a markup, the whitespace is always consistent.
356
357 @lilypond[quote,verbatim,papersize=a6]
358 \markup \fill-line {oooooo oooooo oooooo oooooo}
359 \markup \fill-line {ooooooooo oooooooo oo ooo}
360 @end lilypond
361
362 @lilypond[quote,verbatim,papersize=a6]
363 \markup \justify-line {oooooo oooooo oooooo oooooo}
364 \markup \justify-line {ooooooooo oooooooo oo ooo}
365 @end lilypond
366
367 @item
368 A new command @code{\magnifyMusic} has been added, which allows
369 the notation size to be changed without changing the staff size,
370 while automatically scaling stems, beams, and horizontal spacing.
371
372 @lilypond[verbatim,quote]
373 \new Staff <<
374   \new Voice \relative {
375     \voiceOne
376     <e' e'>4 <f f'>8. <g g'>16 <f f'>8 <e e'>4 r8
377   }
378   \new Voice \relative {
379     \voiceTwo
380     \magnifyMusic 0.63 {
381       \override Score.SpacingSpanner.spacing-increment = #(* 1.2 0.63)
382       r32 c'' a c a c a c r c a c a c a c
383       r c a c a c a c a c a c a c a c
384     }
385   }
386 >>
387 @end lilypond
388
389 @item
390 A new flexible template suitable for a range of choral music, is now
391 provided.  This may be used to create simple choral music, with or
392 without piano accompaniment, in two or four staves. Unlike other
393 templates, this template is @q{built-in}, which means it does not
394 need to be copied and edited: instead it is simply @code{\include}'d
395 in the input file.  For details, see @rlearning{Built-in templates}.
396
397 @item
398 The positioning of tuplet numbers for kneed beams has been significantly
399 improved.  Previously, tuplet numbers were placed according to the
400 position of the tuplet bracket, even if it was not printed.  This could
401 lead to stranded tuplet numbers.  Now they are now positioned
402 closer to the kneed-beam when an appropriate beam segment exists for its
403 placement and when the the bracket is not drawn.
404
405 Collision detection is also added, offsetting horizontally if too close
406 to an adjoining note column but preserving the number's vertical
407 distance from the kneed beam.  If the number itself is too large to
408 fit in the available space the original, bracket-based, positioning
409 system is used instead; and in the event of a collision (e.g. with an
410 accidental) the tuplet number is moved vertically away instead.
411
412 @lilypond[verbatim,fragment,quote,relative=1]
413 \time 3/4
414 \override Beam.auto-knee-gap = 3
415 \tuplet 3/2 4 {
416   g8 c'' e,
417   c'8 g,, e''
418   g,,8 e''' c,,
419 }
420 @end lilypond
421
422 @noindent
423 The original kneed-beam tuplet behavior is still available through an
424 @code{\override} via a new, @code{knee-to-beam} property.
425
426 @lilypond[verbatim,fragment,quote,relative=1]
427 \time 3/4
428 \override Beam.auto-knee-gap = 3
429 \override TupletNumber.knee-to-beam = ##f
430 \tuplet 3/2 4 {
431   g8 c'' e,
432   c'8 g,, e''
433   g,,8 e''' c,,
434 }
435 @end lilypond
436
437 @item
438 @code{\lyricsto} and @code{\addLyrics} have been @q{harmonized}.  Both
439 now accept the same kind of delimited argument list that @code{\lyrics}
440 and @code{\chords} accept.  Backward compatibility has been added so
441 music identifiers (i.e. @code{\mus}) are permitted as arguments.  A
442 @code{convert-ly} rule has been added that removes redundant uses of
443 @code{\lyricmode} and rearranges combinations with context starters such
444 that @code{\lyricsto} in general is applied last (i.e. like
445 @code{\lyricmode} would be).
446
447 @item
448 Scheme functions and identifiers can now be used as output definitions.
449
450 @item
451 Scheme expressions can now be used as chord constituents.
452
453 @item
454 Improved visual spacing of small and regular @q{MI} Funk and Walker
455 noteheads so they are now the same width as other shaped notes in
456 their respective sets.  @code{SOL} noteheads are also now visually
457 improved when used with both the normal Aiken and Sacred Harp heads, as
458 well as with the thin variants.
459
460 @item
461 @code{LeftEdge} now has a definable @code{Y-extent} (i.e.vertical).  See
462 @rinternals{LeftEdge}.
463
464 @item
465 Added a new @code{make-path-stencil} function that supports all
466 @code{path} commands both relative and absolute:
467
468 @code{lineto}, @code{rlineto}, @code{curveto}, @code{rcurveto},
469 @code{moveto}, @code{rmoveto}, @code{closepath}.  The function also
470 supports @q{single-letter} syntax used in standard SVG path commands:
471
472 @code{L}, @code{l}, @code{C}, @code{c}, @code{M}, @code{m}, @code{Z} and
473 @code{z}.  The new command is also backward-compatible with the original
474 @code{make-connected-path-stencil} function.  Also see
475 @file{scm/stencil.scm}.
476
477 @item
478 Context properties named in the @samp{alternativeRestores} property are
479 restored to their value at the start of the @emph{first} alternative in
480 all subsequent alternatives.
481
482 Currently the default set restores @q{current meter};
483
484 @lilypond[verbatim,fragment,quote,relative=2]
485 \time 3/4
486 \repeat volta 2 { c2 e4 | }
487 \alternative {
488   { \time 4/4 f2 d | }
489   { f2 d4 | }
490 }
491 g2. |
492 @end lilypond
493
494 @noindent
495 @q{measure position};
496
497 @lilypond[verbatim,fragment,quote,relative=2]
498 \time 3/4
499 \repeat volta 2 { c2 e4 | }
500 \alternative {
501   { \time 4/4
502     \set Timing.measurePosition = #(ly:make-moment -1/2)
503     f2 | }
504   { f2 d4 | }
505 }
506 g2. |
507 @end lilypond
508
509 @noindent
510 and @q{chord changes};
511
512 @lilypond[verbatim,fragment,quote]
513 <<
514   \new ChordNames {
515     \set chordChanges = ##t
516     \chordmode { c1:m d:m c:m d:m }
517   }
518   \new Staff {
519     \repeat volta 2 { \chordmode { c1:m } }
520     \alternative {
521       { \chordmode { d:m } }
522       { \chordmode { c:m } }
523     }
524   \chordmode { d:m }
525 }
526 >>
527 @end lilypond
528
529 @item
530 Improved MIDI output for breathe marks.  After tied notes, breaths take
531 time @emph{only} from the last note of the tie; e.g.
532 @code{@{ c4~ c8 \breathe @}} performs as @code{@{ c4~ c16 r @}} instead
533 of @code{@{ c4 r8 @}}.  This is more consistent with articulations and
534 how humans interpret breaths after ties.  It now also makes it easier to
535 align simultaneous breathe marks over multiple parts, all with different
536 note lengths.
537
538 @item
539 A new note head style for Tabulature has been added;
540 @code{TabNoteHead.style = #'slash}.
541
542 @item
543 Four new Clef glyphs have been added @emph{Double G}, @emph{Tenor G},
544 @emph{Varpercussion} and @emph{varC} and their related tessitura.
545 @lilypond[verbatim,quote,fragment]
546   \override Staff.Clef.full-size-change = ##t
547
548   \clef "GG" c c c c
549   \clef "tenorG" c c c c
550   \clef "varC" c c c c
551   \clef "altovarC" c c c c
552   \clef "tenorvarC" c c c c
553   \clef "baritonevarC" c c c c
554   \clef "varpercussion" c c c c
555
556   \break
557   \override Staff.Clef.full-size-change = ##f
558
559   \clef "GG" c c c c
560   \clef "tenorG" c c c c
561   \clef "varC" c c c c
562   \clef "altovarC" c c c c
563   \clef "tenorvarC" c c c c
564   \clef "baritonevarC" c c c
565   \clef "varpercussion" c c c c
566 @end lilypond
567
568 @item
569 Isolated durations in music sequences now stand for unpitched
570 notes.  This may be useful for specifying rhythms to music or
571 scheme functions.  When encountered in the final score, the
572 pitches are provided by the preceding note or chord.  Here are two
573 examples where this makes for readable input:
574
575 @lilypond[verbatim,quote]
576 \new DrumStaff \with { \override StaffSymbol.line-count = 1 }
577 \drummode {
578   \time 3/4
579   tambourine 8 \tuplet 3/2 { 16 16 16 }
580              8 \tuplet 3/2 { 16 16 16 } 8 8 |
581 }
582 @end lilypond
583
584 @lilypond[verbatim,quote]
585 \new Staff { r16 c'16 ~ 8 ~ 4 ~ 2 | }
586 @end lilypond
587
588 @item
589 @code{\displayLilyMusic} and its underlying Scheme functions no
590 longer omit redundant note durations.  This makes it easier to
591 reliably recognize and format standalone durations in expressions
592 like
593 @example
594 @{ c4 d4 8 @}
595 @end example
596
597 @item
598 Beaming exceptions can now be constructed using the
599 @code{\beamExceptions} scheme function.  One can now write
600
601 @lilypond[verbatim,quote,relative=1]
602 \time #'(2 1) 3/16
603 \set Timing.beamExceptions =
604   \beamExceptions { 32[ 32] 32[ 32] 32[ 32] }
605 c16 c c |
606 \repeat unfold 6 { c32 } |
607 @end lilypond
608
609 @noindent
610 with multiple exceptions separated with @code{|} bar checks
611 (writing the exception pattern without pitches is convenient but
612 not mandatory).  Previously, setting the beam exceptions would
613 have required writing
614
615 @example
616 \set Timing.beamExceptions =
617 #'(                         ;start of alist
618    (end .                   ;entry for end of beams
619     (                       ;start of alist of end points
620      ((1 . 32) . (2 2 2))   ;rule for 1/32 beams -- end each 1/16
621     )))
622 @end example
623
624 @item
625 The most common articulations are now reflected in MIDI output.
626 Accent and marcato make notes louder; staccato, staccatissimo and
627 portato make them shorter. Breath marks shorten the previous
628 note.
629
630 This behavior is customizable through the @code{midiLength} and
631 @code{midiExtraVelocity} properties on @code{ArticulationEvent}.
632 See @file{script-init.ly} for examples.
633
634 @item
635 The PostScript functionality of stroke adjustment is no longer
636 applied automatically but left to the discretion of the PostScript
637 device (by default, Ghostscript uses it for resolutions up to
638 150dpi when generating raster images).  When it is enabled, a more
639 complex drawing algorithm designed to benefit from stroke
640 adjustment is employed mostly for stems and bar lines.
641
642 Stroke adjustment can be forced by specifying the command line
643 option @samp{-dstrokeadjust} to LilyPond.  When generating
644 @code{PDF} files, this will usually result in markedly better
645 looking @code{PDF} previews but significantly larger file size.
646 Print quality at high resolutions will be unaffected.
647
648 @end itemize
649
650 @ifhtml
651 For older news, go to
652 @uref{http://lilypond.org/doc/v2.18/Documentation/changes/},
653 @uref{http://lilypond.org/doc/v2.16/Documentation/changes/},
654 or @uref{../,go back} to the Documentation index.
655
656
657 @end ifhtml
658
659 @bye