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