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