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