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