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