From: Han-Wen Nienhuys Date: Sun, 20 Feb 2005 20:03:28 +0000 (+0000) Subject: * scm/define-grobs.scm (all-grob-descriptions): put ledger lines X-Git-Tag: release/2.5.14~116 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=10588ba1bb8ab61187248d00876845f41d93776a;p=lilypond.git * scm/define-grobs.scm (all-grob-descriptions): put ledger lines in layer 0 too. * scm/define-context-properties.scm (all-user-translation-properties): add tieWaitForNote * scm/define-grobs.scm (all-grob-descriptions): add Tie_column::before_line_breaking * lily/tie.cc (get_column_rank): new function * lily/tie-column.cc (before_line_breaking): new function. (werner_directions): take into account ties that start on different columns. * lily/score-engraver.cc (set_columns): move add_column() so we have column rank available. * lily/tie.cc (get_column_rank): new function. --- diff --git a/ChangeLog b/ChangeLog index ddfed302aa..c9de4da868 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,25 @@ 2005-02-20 Han-Wen Nienhuys + * scm/define-grobs.scm (all-grob-descriptions): put ledger lines + in layer 0 too. + + * scm/define-context-properties.scm + (all-user-translation-properties): add tieWaitForNote + + * scm/define-grobs.scm (all-grob-descriptions): add + Tie_column::before_line_breaking + + * lily/tie.cc (get_column_rank): new function + + * lily/tie-column.cc (before_line_breaking): new function. + (werner_directions): take into account ties that start on + different columns. + + * lily/score-engraver.cc (set_columns): move add_column() so we + have column rank available. + + * lily/tie.cc (get_column_rank): new function. + * input/regression/utf8.ly (japanese): add japanese lyrics. * lily/pfb.cc (LY_DEFINE): ly:ttf->pfa, new function. diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely new file mode 100644 index 0000000000..253ceb93bf --- /dev/null +++ b/Documentation/topdocs/NEWS.tely @@ -0,0 +1,1246 @@ +\input texinfo @c -*-texinfo-*- +@setfilename NEWS.info +@settitle NEWS + +@node Top, , , +@top +@unnumbered New features in 2.5 since 2.4 + +@itemize @bullet + +@item +With the new @code{tieWaitForNote} property, arpeggios may be written +out using ties, for example, + +@lilypond[fragment,verbatim,relative=1,raggedright] +\set tieWaitForNote = ##t +\grace { c16[~ e~ g]~ } 4 +@end lilypond + +Thanks to Steve Doonan for funding development of this feature. + +@item +Individual objects may be assigned colors, for example, + +@lilypond[fragment,relative=1,verbatim,raggedright] + \override Beam #'color = #cyan + \override NoteHead #'color = #darkyellow + c4 +@end lilypond + +@item +The PostScript backend is now used by default. This backend requires +less machinery to run, and gives more consistent results. + +Due bugs in GhostScript's PDF handling, it is recommended to upgrade +to GhostScript 8.x. + +@item +Separator slashes may be inserted between systems in a score. For an +example, see +@file{input/regression/system-separator.ly}: + +@lilypondfile{system-separator.ly} + +@item +Locations of errors in the input are now calculated more precisely. + +@item +LilyPond now uses Pango and FontConfig for selecting and rendering +internationalized text in non-@TeX{} backends. A font may be selected +by using a FontConfig name, + +@example +\override TextScript #'font-name = #"Serif" +@end example + + +@noindent +or using the classic font selection mechanism + +@example +\override TextScript #'font-family = #'roman +\override TextScript #'font-series = #'bold +@end example + +Any Type1 and TrueType font recognized by FontConfig is available in +LilyPond as well. + +@noindent +Input strings encoded in UTF-8 are then rendered through Pango. + +@item +Metrics of blocks of text can be retrieved from (La)@TeX{} directly, +using the @code{-f texstr} output backend. This provides exact metrics +for texts, including kerning and accents. + +@item +LilyPond now uses FreeType read the Feta font as an OpenType +font. This is cleaner design and more robust. A recent version of +FontForge (11122004 or newer) and Freetype is required. + +As a result, the SVG backend is now a fully functional backend. + +@item +A new script, @code{\espressivo} has been added, for a combination of +crescendo and decrescendo on a single note. + +@item +In markups, expressions stacked with @code{\column}, +@code{\center-align}, etc, are not grouped with @code{< ... >} anymore, +but with @code{@{ ... @}}, eg: +@example +\markup \column @{ + \line @{ first line @} + \line @{ second line @} +@} +@end example + +@item +LilyPond will now avoid line breaks that cause long texts to stick +outside of the page staff. + +@item +Grace notes following a main note, used to be entered by letting the +grace notes follow a skip in a parallel expression, for example, + +@verbatim + << { d1 } + { s2 \grace { c16[ d] } } >> + c4 +@end verbatim + +@noindent +This can now be shortened by doing + +@example +\afterGrace @{ d1 @} @{ c16[ d] @} +@end example + +@item +Pagebreaks can now be forced or forbidden after title blocks. This is +achieved by setting @code{breakbefore} in the @code{\header} block to +true or false. + +@item +Shaped note heads. This feature has been sponsored by Jonathan Walther. + +@item +Layout for titles, page header and footer can now be entered as +@code{\markup} commands. + +@item Positioning of slurs can now be adjusted manually + +@item Grace notes are correctly quoted and formatted when using cue notes. + +@item Cue notes can now be created with + +@example +\cueDuring #@var{voice-name} #@var{direction} @{ @var{music} @} +@end example + +@noindent +This will set stem directions and put the cue notes in the @code{cue} +@code{Voice} + +@item Stemlets, short stems over beamed rests, have been added. + +@end itemize + + +@unnumbered New features in 2.4 since 2.2 + +@itemize @bullet + +@item Parts that use @code{\quote} can now be transposed. + +@item LilyPond does not try to produce output for files that +have a parse error. + +@item @code{lilypond-book} will now remove any output files that +contain failed music snippets. + +@item The mode changing commands (@code{\chords}, @code{\lyrics}, etc.) +have been renamed to @code{\chordmode}, @code{\lyricmode}, etc. The +command @code{\chords} is an abbreviation for + +@example + \new ChordNames \chordmode ... +@end example + +@noindent +@code{\drums}, @code{\lyrics}, @code{\chords}, @code{\figures} +function similarly. + +@item The types of events quoted with @code{\quote} can now be tuned +with @code{quotedEventTypes}. By default, only notes and rests end up +in quotes. + +@item LilyPond will try to keep +staves at the same distances across a page, but it will stretch +distances to prevent collisions. This results in a more even +appearance of the page. + +@item Key signature cancellations are now printed before the bar line, +and their appearance has been improved. + +@item Different voices that all use @code{\quote} can now refer to +each other. + + +@item The automatic staff changer, which is invoked with +@code{\autochange}, now creates the @code{up} and @code{down} staff +automatically, and uses bass clef for the bottom staff. + +@item There is now support for putting two slurs on chords, both above +and below. This is switched on with the @code{doubleSlurs} property. + +@item Running trills now have their own spanner and event, + +@example + c1\startTrillSpan c4\stopTrillSpan +@end example + +@item There is a new markup command @code{\postscript} that takes a +string that is dumped as verbatim PostScript in the output. + +@item The melody for a @code{\lyricsto} text can be changed during a +melody by setting the @code{associatedVoice} property. + +@item The @code{\lyricsto} keyword now automatically switches on +lyrics mode. + +@item The LilyPond binary now supports output options +@code{--dvi} @code{--png} @code{--ps} @code{--pdf} and +@code{--preview}. The old wrapper script for La@TeX{} has been +renamed to @code{lilypond-latex}. + +@item Support for ambitus has been rewritten. The Ambitus object is now +a grouping object, composed of @code{AmbitusLine}, +@code{AmbitusAccidental} and @code{AmbitusNoteHead}. These objects may +be tuned similar to accidentals and note heads. + +@item Ledger lines are now shortened when the spacing is tight. This +prevents ledger lines from colliding with each other. + +@item Slur formatting has been rewritten. The new slur code +works similar to the Beam formatter: scores are assigned for all +esthetic components of a slur. A large number of combinations for +begin and end points is then tried out. Slurs will now also take into +account collisions with staff lines, scripts (like staccato and +accent) and accidentals. + + +@item In the LilyPond emacs mode, entering @code{|} will display the + current beat within the measure. + +@item Colliding notes are now correctly aligned relative to notes in other staves. + +@item An experimental GNOME output backend is available for developers. +It depends on several unreleased packages such as gnome-guile TLA and +Pango CVS. The output interface coverage is sparse, but it already +does support point-and-click on the GNOME Canvas. See also +@file{scm/output-gnome.scm}. + +@item Context definitions are now stored in identifiers that match the +context name, in other words, to modify a @code{Staff} context, the +following code may be used. + +@example +\context @{ + \Staff + .. +@} +@end example + +@item +The @code{\paper} block has been renamed to @code{\layout}. A new +@code{\paper} block has been introduced to hold settings for paper +size and output scaling. Further options include @code{raggedbottom} +(if set, systems are not vertically filled to reach the bottom of the +page), and @code{raggedlastbottom}. + + +@item Support for fret diagrams has been contributed by Carl +D. Sorensen. @file{input/test/fret-diagram.ly} contains an example. + +@item The @code{--safe-mode} has been revisited: GUILE evaluation +is done in the R5RS safe module, with only the basic @code{ly:} +interface available and malicious @TeX{} code is stopped. However, to +be reasonably safe, you are advised to use the PostScript backend +rather than the @TeX{} backend anyway; and if possible use an UML +sandbox to run gs or latex. + +@item Music syntax can now be extended seamlessly. As an example, +here is the new implementation @code{\applymusic}, + +@example + applymusic = #(ly:make-music-function + (list procedure? ly:music?) ; signature + (lambda (where func music) ; the function + (func music))) +@end example + +@item @code{\apply} has been renamed to @code{\applymusic}. + +@item Music can be used as a markup. +When inserting a @code{score} block as part of a @code{\markup}, it +produces a rendered markup of the music. An example is in +@file{input/test/markup-score.ly}. + +@item LilyPond expressions can be embedded into Scheme. The syntax for +this is @code{#@{ ... #@}}. Within such a block, Scheme forms can be +introduced using a @code{$} character (@code{$$} results in a single +`$' character). These forms are then inserted in the pattern. + +@example +#(define (textoffset dx dy) + (ly:export + #@{ \override Voice.TextScript #'extra-offset = #(cons $dx $dy) #@})) + +@{ + c'^"normal text" + %% The following embedded scheme call is the same as + %% \override Voice.TextScript #'extra-offset = #(cons 2 -3) + #(textoffset 2 -3) + c'^"text with offset" +@} +@end example + +@item A music list at toplevel is interpreted as implicit @code{\score} +a @code{\score} block at toplevel is interpreted as an implicit +@code{\book} and @code{\notemode} mode is the default lexer mode. The +result is that + +@example +\header @{ title = "The Title" @} +@{ a b c @} +@end example + +is interpreted as + +@example +\header @{ title = "The Title" @} +\book @{ + \score @{ + \notemode @{ a b c @} + @} +@} +@end example + +This is handled by the function defined in +@code{toplevel-music-handler}. Similarly, @code{\score} and +@code{\book} are handled by @code{toplevel-score-handler} and a +@code{toplevel-book-handler}. By changing these variables, different +results can be obtained. + +@item Mode changing commands, +such as @code{\chordmode} and @code{\figuremode} must now be directly +followed by delimiters. The following example demonstrates the new +behavior, + +@verbatim + \figuremode \context Figures { .. } % wrong + \context Figures \figuremode { .. } % right +@end verbatim + + +@item The starting pitch for @code{relative} music is optional for music lists. +The default value is middle C. + +@item Combining lyrics with music can be done with @code{\addlyrics} + +@example + \relative @{ + \clef bass + d2 d c4 bes a2 \break + @} + \addlyrics @{ + My first Li -- ly song, + @} + \addlyrics @{ + Not much can go wrong! + @} +@end example + +Syntactically, @code{\addlyrics} is an infix operator. It is a +shortcut for a combination of @code{\new Lyrics}, @code{\lyricmode} +and @code{\lyricsto}. + +@item The parser is encapsulated in a Scheme function +@code{ly:parse-file}, so the following fragment processes two files + +@verbatim +#(ly:parse-file "another.ly") +\score { \notes { c4 }} +@end verbatim + +@item The @code{font-encoding} property can now be used to select +differently encoded fonts. The previous default setting +@code{TeX-text} has been replaced by latin1. LilyPond requires the +@uref{http://www.lilypond.org/download/fonts/,ec-fonts-mftraced} +package installed to function properly. + +@item The encoding of a file can be switched with +@code{\encoding}. The strings for markup texts are translated +automatically. + +@item The toplevel block @code{\book} introduces page layout. +A @code{\book} groups @code{\score} blocks into one page layout +entity. For example, two scores are combined in one book with + +@example +\book @{ + \score @{ ... @} + \score @{ ... @} +@} +@end example + + +@item +Titling and page breaks are handled by LilyPond. Page breaks may be +inserted manually with + +@example + \pageBreak +@end example + +@item +Invoking @code{lilypond} runs the actual binary, which not use +La@TeX{} for titling or page layout. If you need La@TeX{} code in +titles, you can use the @code{lilypond-book} program. The former +@code{lilypond} script has been retained as @code{lilypond-latex}. + +@item There is now less of a noticeable ``hook'' at the end of a long slur. + +@item The meaning of the @code{|} in the input can be redefined, by + assigning a music expression to @code{pipeSymbol}. + +@end itemize + + + +@c **************************************************************** + +@unnumbered New features in 2.2 since 2.0 + +@itemize @bullet + +@item Setting @code{raggedlast = ##t} in the @code{\paper} block +causes the last line to be set flush-left instead of justified. + +@item The @code{Timing_engraver} now sets the @code{Timing} alias on +its containing context automatically. + +@item The code for font selection has been rewritten. In addition to +existing font selection properties, the property @code{font-encoding} +has been added, which makes the switch between normal @code{text} and +other encodings like @code{braces}, @code{music} and @code{math}. + +@item The pmx2ly script has been removed from the distribution. + +@item Pedal brackets will now run to the last bar of a piece if they are not +explicitly ended. + +@item Context definitions now use the word @code{\context} instead of @code{\translator}. + +@item Property functions may be used as an argument to @code{set!}, +for example + +@example + (set! (ly:grob-property grob 'beam) ... ) +@end example + +@item In anticipation of Emacs 21.4 or 22.1, the info documentation contains +images. + +@item Cue notes can be quoted directly from the parts that +contain them. This will take into account transposition of source and target +instrument. For example, + +@verbatim +\addquote clarinet \notes\relative c' { + \transposition bes + fis4 fis fis fis +} + +\score { + \notes \relative c'' { + c8 d8 \quote 2 oboe es8 gis + } +} +@end verbatim + +@item The transposition of an instrument can be specified using the +@code{\transposition} command. An +E-flat alto saxophone is specified as + +@example + \transposition es' +@end example + +@item The naming of exported Scheme functions now follows Scheme conventions. +Changes be applied to Scheme files with + +@example + convert-ly -e -n --from=2.1.24 --to=2.1.26 *.scm +@end example + + +@item Notes can be excluded from auto-beaming, by marking them with +@code{\noBeam} +@example + c8 c \noBeam c c +@end example + +@noindent +will print two separate eighth notes, and two beamed notes. + +@item Translators and contexts have been split. The result of this +internal cleanup is that @code{Score} no longer is the top context; +@code{Score} is contained in the @code{Global} context. Consequently, +it is possible to tweak @code{Score} as follows: + +@example + \context Score \with @{ + @dots{} + @} +@end example + +@item The number of staff lines in Tablature notation is now +automatically deduced from the @code{stringTunings} property. + +@item The program reference has been cleaned up and revised. + +@item The syntax for setting properties has been simplified: +the following table lists the differences: + +@example + (old) (new) + +\property A.B = #C \set A.B = #C +\property A.B \unset \unset A.B +\property A.B \set #C = #D \override A.B #C = #D +\property A.B \override #C = #D (removed) +\property A.B \revert #C \revert A.B #C +@end example + +Furthermore, if @code{A} is left out, the bottommost context is used +by default. In other words, it is no longer necessary to explicitly +mention @code{Voice}, @code{Lyrics} or @code{ChordNames}. + +Old: + +@example + \property Voice.autoBeaming = ##f + \property Staff.TimeSignature \set #'style = #'C +@end example + +New: + +@example + \set autoBeaming = ##f + \override Staff.TimeSignature #'style = #'C +@end example + + +@item Tweaks made with @code{\override} and @code{\revert} no longer +hide tweaks at higher context levels. + +@item Melismata in lyrics are also properly handled in the MIDI output. + +@item The lilypond-book script has been rewritten. +It is shorter, cleaner and faster. The special construct +@code{mbinclude} has been removed, plain @code{@@include} or +@code{\input} can be used now. + +It now supports running convert-ly on the lilypond snippets, +@example + lilypond-book --filter='convert-ly --from=2.0.0' my-book.tely +@end example + +@item The @code{LyricsVoice} context has been removed. Lyrics should only +be constructed in @code{Lyrics}. + +@item The @code{Thread} context has been removed. Note heads and rests +are now constructed at @code{Voice} level. + +@item Harmonic notes can now be entered as + +@example + +@end example + +@item Drum notation is now supported as a regular feature: +percussion may be entered in @code{\drums} mode, and printed or +performed in a @code{DrumStaff} context: + +@example + \score @{ + \drums \new DrumStaff @{ hihat4 cowbell8 @} + @} +@end example + +@item The automatic staff changer was internally rewritten. As a +result, the syntax has been simplified as well: + +@example + \autochange @var{the-music} +@end example + +@item The ergonomic syntax of @code{\markup} now has an equivalent in +Scheme. The @code{markup*} macro creates such objects; the following +two markup commands are equivalent: +@example + f4^#(markup* #:raise 0.2 #:bold "hi") + f4^\markup @{ \raise #0.2 \bold hi @} +@end example + +@item Voice names, for vocal lines, have been added. They are similar +to instrument names. They can be set by defining @code{vocalName} +and @code{vocNam}. + +@item Safe mode has been reinstated for lilypond. +When lilypond is invoked with @code{--safe-mode}, @TeX{} and +PostScript file output is disallowed, and lilypond-bin is invoked with +@code{--safe-mode}, the user's Guile expressions are evaluated in a +safe environment and file inclusion is not allowed. + +Warning: this does not protect against denial-of-service attacks using +Guile, @TeX{} or PostScript. + +(This feature is still experimental.) + +@item There is now a Scheme macro for defining markup +commands. Special mark-up commands can be defined in user-files too. + +@item Many fixes for dimension scaling have been made, +resulting in correct results for scores that mix staves in different +sizes. + +@item Improved robustness when layout properties are accidentally removed. + +@item A more cleanly constructed part combiner has been installed. +It is more robust and less buggy. The part-combiner can be used with +@example + \partcombine @var{mus1} @var{mus2} +@end example + +@noindent +See @file{input/regression/new-part-combine.ly} for an example. + +@item Formatting of rehearsal marks has been improved. The @code{\mark} +command now only does automatic incrementing for marks specified as +integer. For example, @code{\mark #1} will print an A in the default +style. See @file{input/regression/rehearsal-mark-letter.ly}, +@file{input/regression/rehearsal-mark-number.ly}. + +@item Formatting of ottava brackets has been much improved. + +@item Objects in the output can now be documented: the following fragment + boxes the note head, and adds the text ``heads or tails?'' three +spaces below the box. + +@example + \context Voice \applyoutput #(add-balloon-text + 'NoteHead "heads, or tails?" + '(0 . -3)) + + + c8 +@end example + + +@item Default staff sizes are now scalable. There are two new mechanisms for +setting staff sizes. Both are demonstrated in this fragment: + +@example + #(set-global-staff-size 15) + \paper @{ + #(paper-set-staff-size (* 15 pt)) + @} +@end example + + +@noindent +Both have the same effect on the global layout of a piece. Similarly, +the paper size may be changed as follows + +@example + #(set-default-paper-size "a4") + \paper @{ + #(set-paper-size "a4") + @} +@end example + + +@item Warnings for bar check errors are more cleverly printed. This +makes @code{barCheckSynchronize} superfluous, so it is now switched +off by default. + +Warning: this will cause problems in scores that use bar checks to +shorten measures. + +@item The black note head was made a little rounder, which causes a less + frantic graphic impression. + +@item +A more concise syntax for checking octaves was introduced. A note may +be followed by @code{=}@var{quotes} which indicates what its absolute +octave should be. In the following example, + +@example + \relative c'' @{ c='' b=' d,='' @} +@end example + +@noindent +the d will generate a warning, because a d'' is +expected, but a d' is found. +@c @code adds ` ', very confusing. + +@item There is a new mechanism for putting lyrics to melodies. +With this mechanism, @code{Lyrics} lines can be put melodies +individually, allowing for different melismatic sections in every +@code{Lyrics}. See @file{input/regression/lyric-combine-new.ly}. + +@item Bar lines may now be dotted. + + +@item The documentation now has links to a wiki, where everyone can +add personal comments to the manual. + +@item Contexts may now be changed locally for an isolated music +expression. For example, + +@example + \new Voice \with @{ + \consists "Pitch_squash_engraver" + @} @{ + c'4 + @} +@end example + +@item The syntax for changing staffs has changed. The keyword +@code{\change} should now be used, e.g. + +@example + \change Staff = up +@end example + +@item Features of spanner contexts, like @code{Staff}, can now be changed + using @code{\set}, eg. + +@example + \new Staff @{ + \override Staff.StaffSymbol #'line-count = #4 + c'4 + @} +@end example + +@noindent +puts a quarter note C on a staff with 4 lines. + + +@item Multi measure rests are now truly centered between the +clefs/barlines of the staff, their position is independent of symbols +on the other staffs. + +@item Collision resolution for dots in chords has been improved greatly. + +@item +Spacing following barlines was improved for widely stretched lines. + +@item +Lyric hyphens and extenders now conform to standard typesetting +practice. + +@item +Lyrics are now aligned under note heads conforming to engraving +standards. The responsible code has been rewritten, and is drastically +simpler from the previous version. To aid this rewrite, the syntactic +function of the extender line ( __ ) has been changed: it is now +attached to the lyric syllable. + +@item +When redefining a context, the associated identifier is also +updated. For example, after reading + +@example + \translator @{ + \ScoreContext + autoBeaming = ##f + @} +@end example + +@noindent +the definition of @code{ScoreContext} is updated to include the changed +setting. + + +@item +The weight of the stafflines is now heavier at smaller staff sizes. +The font has been modified to match this look: at smaller sizes, the +font is heavier and the note heads are more rounded. + +@item Processing scores is now done while parsing the file. New +Scheme functions give more flexibility: for example, it is now possible +interpret a score, collecting synchronized musical events in a list, and +manipulate that information using inline Scheme. For an example, see +@file{input/no-notation/recording.ly}. + +@item Font sizes can now truly be scaled continuously: the @code{font-size} +is similar to the old @code{font-relative-size}, but may be set to +fractional values; the closest design size will be scaled to achieve +the desired size. As a side-effect, there are now no longer +limitations in using smaller fonts (eg. grace notes) at small staff +sizes. + +@item Stem tips are now also engraved with rounded corners. + +@item +The placement of accidentals on chords and ledgered notes is improved. + +@end itemize + + +@unnumbered New features in 2.0 since 1.8 + +@itemize + +@item +Crescendos can now be drawn dotted or dashed. + +@item +Quarter tones are now supported. They are entered by suffixing +@code{ih} for a half-sharp and @code{eh} for a half-flat. Hence, the +following is an ascending list of pitches: + +@example + ceses ceseh ces ceh c cih cis cisih cisis +@end example + +@item +The following constructs have been removed from the syntax: + +@example + \duration #SCHEME-DURATION + \pitch #SCHEME-PITCH + \outputproperty @var{func} @var{symbol} = @var{value} +@end example + +For @code{\outputproperty}, the following may be substituted: + +@example + \applyoutput #(outputproperty-compatibility @var{func} + @var{symbol} @var{value}) +@end example + +@item +Clefs may now be transposed arbitrarily, for example + +@example + \clef "G_8" + \clef "G_15" + \clef "G_9" +@end example + + +@item +The syntax for chords and simultaneous music have changed. +Chords are entered as + +@example + <@var{pitches}> +@end example + +while simultaneous music is entered as + +@example + <<@var{..music list..}>> +@end example + +In effect, the meanings of both have been swapped relative to their 1.8 +definition. The syntax for lists in @code{\markup} has changed +alongside, but figured bass mode was not changed, i.e.: + +@example + \markup @{ \center <@var{..list of markups..}> @} + \figure @{ <@var{figures}> @} +@end example + +As chords the more often used than simultaneous music, this change will +save keystrokes. + +@item +Each music expression can now be tagged, to make different printed +versions from the same music expression. In the following example, +we see two versions of a piece of music, one for the full score, and +one with cue notes for the instrumental part: + +@example +<< \tag #'part << + @{ c4 f2 g4 @} % in the part, we have cue-notes + \\ R1 >> + \tag #'score R1 % in the score: only a rest +>> +@end example + +The same can be applied to articulations, texts, etc.: they are +made by prepending + +@example + -\tag #@var{your-tags} +@end example + +to an articulation, for example, + +@example + c4-\tag #'with-fingerings -4 -\tag #'with-strings \6 +@end example + +This defines a note, which has a conditional fingering and a +string-number indication. + +@item +The settings for chord-fingering are more flexible. You can specify a +list where fingerings may be placed, eg. + +@example + \property Voice.fingeringOrientations = #'(left down) +@end example + +This will put the fingering for the lowest note below the chord, and the +rest to the left. + +@item +The script previously known as @code{ly2dvi} has been renamed to +@code{lilypond}. The binary itself is now installed as +@code{lilypond-bin}. + +@item +Markup text (ie. general text formatting) may now be used for lyrics too. + +@item +Two new commands for grace notes have been added, @code{\acciaccatura} +and @code{\appoggiatura}, + +@example + \appoggiatura f8 e4 + \acciaccatura g8 f4 +@end example + +Both reflect the traditional meanings of acciaccatura and appogiatura, +and both insert insert a slur from the first grace note to the main +note. + +@item +Layout options for grace notes are now stored in a context property, +and may now be set separately from musical content. + +@item +The @code{\new} command will create a context with a unique +name automatically. Hence, for multi-staff scores, it is no longer +necessary to invent arbitrary context names. For example, a two-staff +score may be created by + +@example + \simultaneous @{ + \new Staff @{ @var{notes for 1st staff} @} + \new Staff @{ @var{notes for 2nd staff} @} + @} +@end example + + + +@item +Octave checks make octave errors easier to correct. +The syntax is + +@example + \octave @var{pitch} +@end example + +This checks that @var{pitch} (without octave) yields @var{pitch} (with +octave) in \relative mode. If not, a warning is printed, and the +octave is corrected. + +@item +All articulations must now be entered postfix. For example, + +@example + c8[( d8]) +@end example + +@noindent +is a pair of beamed slurred eighth notes. + +@item +The definition of @code{\relative} has been simplified. Octaves are +now always propagated in the order that music is entered. In the +following example, + +@example + PRE + \repeat "unfold" 3 BODY \alternative @{ ALT1 ALT2 @} + POST +@end example + +@noindent +the octave of BODY is based on PRE, the starting octave of ALT1 on +BODY, the starting octave of ALT2 on ALT1, and the starting octave of +POST on ALT2. + +The same mechanism is used for all other music expressions, except the +chord. Backwards compatibility is retained through a special program option, +which is set through + +@example + #(ly:set-option 'old-relative) +@end example + +@item +Windows users can double click a @code{.ly} file to process and view +it automagically through the new @code{lily-wins} frontend. + +@end itemize + + + + +@unnumbered New features in 1.8 since 1.6 + +@itemize + +@item +The chord entry code has been completely rewritten. It is now +cleaner and more flexible. + +@item +A new syntax has been added for text entry. This syntax is more +friendly than the old mechanism, and it is implemented in a more +robust and modular way. For more information, refer to the section on +"Text markup" in the notation manual. + +@item +The integration of the input language and Scheme has been made deeper: +you can now use LilyPond identifiers in Scheme, and use Scheme +expressions instead of LilyPond identifiers. + +@item +The internal representation of music has been cleaned up completely +and converted to Scheme data structures. The representation may be +exported as XML. + +@item +A new uniform postfix syntax for articulation has been introduced. +A beamed slurred pair of eighth notes can be entered as + +@example + c8-[-( d8-]-) +@end example + +In version 2.0, postfix syntax will be the only syntax +available, and the dashes will become optional. + +This will simplify the language: all articulations can be entered as +postfix, in any order. + +@item +A new syntax has been added for chords: + + +@example + << PITCHES >> +@end example + +It is not necessary to update files to this syntax, but it will be for +using LilyPond version 2.0. In version 2.0, this syntax will be +changed to + +@example + < PITCHES > +@end example + +for chords, and + +@example + \simultaneous @{ .. @} +@end example + +for simultaneous music. + +To convert your files from to <>, use the script +included in @file{buildscripts/convert-new-chords.py}. + +This change was introduced for the following reasons + +@itemize @bullet +@item +It solves the "start score with chord" problem, where you have to + state \context Voice explicitly when a chord was the start of a + Staff or Score. +@item +With the new syntax, it is possible to distinguish between + articulations (or fingerings) which are for a single chord note, + and which are for the entire chord. This allows for per-note + fingerings, and is more logical on the whole. +@end itemize + +@item +User code may now be executed during interpreting. The syntax for +this code is + +@example + \applycontext #SCHEME-FUNCTION +@end example + +@item +User code may now be executed on arbitrary grobs during interpreting. +The syntax for this feature is + +@example + \applyoutput #SCHEME-FUNCTION +@end example + +@noindent +SCHEME-FUNCTION takes a single argument, and is called for every grob +that is created in the current context. + +@item +New algorithms for chord-name formatting have been installed. They +can be tuned and have ergonomic syntax for entering exceptions. + +@item +Texts may now be put on multimeasure rests, e.g. + +@example + R1*20^\markup @{ "GP" @} +@end example + +@item +Ancient notation now prints ligatures in Gregorian square neumes +notation, roughly following the typographical style of the Liber +hymnarius of Solesmes, published in 1983. Ligatures are still printed +without the proper line breaking and horizontal spacing. + +@item +Glissandi can now be printed using the zigzag style. + +@item +LilyPond can now print clusters. The syntax is + +@example + \apply #notes-to-clusters @{ NOTE NOTE .. @} +@end example + +@item +For irregular meters, beat grouping marks can be printed. The +syntax for this is + +@example + #(set-time-signature 7 8 '(3 2 2)) +@end example + + +@item +Nested horizontal brackets for music analysis can now be printed: + +@example + NOTE-\startGroup + .. + NOTE-\stopGroup +@end example + + +@item Ottava brackets are now fully supported as a feature. The syntax +is + +@example + #(set-octavation 1) +@end example + + +@item Metronome markings are printed when a \tempo command is processed. + + + +@item Fingerings can be put on chords horizontally. + + + +@item The appearance of various glyphs has been fine-tuned. + + + +@item Different types of percent style repeats may now be nested. + + + +@item The emacs support has been extended. + + +@item +The manual has been completely revised and extended. + +@end itemize + +@unnumbered New features in 1.6 since 1.4 + + +@itemize @bullet + +@item +Support for figured bass and tablature. + +@item +Completely rewritten beam formatting: provides much better output +now. + + +@item +Completely revised and improved music font. + + +@item +Completely rewritten MIDI import support. + +@item +Completely rewritten grace note support. Practically speaking this +means that grace notes can be slurred to normal normal notes. + + +@item +Improved accidental handling and formatting: styles for producing +cautionaries may vary, and complex collisions between accidentals of a +chord are handled much better. + +@item +Better spacing: both globally and locally. This includes subtle +details like optical stem spacing. + +@item +More support for ancient notation: mensural ligatures, ambitus +(pitch range) of voices, more shapes, etc. + +@item +More support for piano notation: bracket pedals, directed arpeggios, +arpeggio brackets. + +@item +Easier music polyphonic music entry. + +@item +More extensibility, many speedups and bugfixes + +@item +The manual has been thoroughly revised. + +@item +Development is now hosted at http://savannah.gnu.org, and sources +can be downloaded through anonymous CVS. + +@item +Support for windows: LilyPond is part of the cygwin distribution, +which comes with a user-friendly installer. + +@end itemize diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi deleted file mode 100644 index 873644620e..0000000000 --- a/Documentation/topdocs/NEWS.texi +++ /dev/null @@ -1,1220 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@setfilename NEWS.info -@settitle NEWS - -@node Top, , , -@top -@unnumbered New features in 2.5 since 2.4 - -@itemize @bullet - -@item -The PostScript backend is now used by default. This backend requires -less machinery to run, and gives more consistent results. - -Due bugs in GhostScript's PDF handling, it is recommended to upgrade -to GhostScript 8.x. - -@item -Separator slashes may be inserted between systems in a score. See -@file{input/regression/system-separator.ly} for an example. - -@item -Locations of errors in the input are now calculated more precisely. - -@item -LilyPond now uses Pango and FontConfig for selecting and rendering -internationalized text in non-@TeX{} backends. A font may be selected -by using a FontConfig name, - -@example -\override TextScript #'font-name = #"Serif" -@end example - - -@noindent -or using the classic font selection mechanism - -@example -\override TextScript #'font-family = #'roman -\override TextScript #'font-series = #'bold -@end example - -@noindent -Input strings encoded in UTF-8 are then rendered through Pango. - -@item -Metrics of blocks of text can be retrieved from (La)@TeX{} directly, -using the @code{-f texstr} output backend. This provides exact metrics -for texts, including kerning and accents. - -@item -LilyPond now uses FreeType read the Feta font as an OpenType -font. This is cleaner design and more robust. A recent version of -FontForge (11122004 or newer) and Freetype is required. - -As a result, the SVG backend is now a fully functional backend. - -@item -A new script, @code{\espressivo} has been added, for a combination of -crescendo and decrescendo on a single note. - -@item -In markups, expressions stacked with @code{\column}, -@code{\center-align}, etc, are not grouped with @code{< ... >} anymore, -but with @code{@{ ... @}}, eg: -@example -\markup \column @{ - \line @{ first line @} - \line @{ second line @} -@} -@end example - -@item -LilyPond will now avoid line breaks that cause long texts to stick -outside of the page staff. - -@item -Grace notes following a main note, used to be entered by letting the -grace notes follow a skip in a parallel expression, for example, - -@verbatim - << { d1 } - { s2 \grace { c16[ d] } } >> - c4 -@end verbatim - -@noindent -This can now be shortened by doing - -@example -\afterGrace @{ d1 @} @{ c16[ d] @} -@end example - -@item -Pagebreaks can now be forced or forbidden after title blocks. This is -achieved by setting @code{breakbefore} in the @code{\header} block to -true or false. - -@item -Shaped note heads. This feature has been sponsored by Jonathan Walther. - -@item -Layout for titles, page header and footer can now be entered as -@code{\markup} commands. - -@item Positioning of slurs can now be adjusted manually - -@item Grace notes are correctly quoted and formatted when using cue notes. - -@item Cue notes can now be created with - -@example -\cueDuring #@var{voice-name} #@var{direction} @{ @var{music} @} -@end example - -@noindent -This will set stem directions and put the cue notes in the @code{cue} -@code{Voice} - -@item Stemlets, short stems over beamed rests, have been added. - -@end itemize - - -@unnumbered New features in 2.4 since 2.2 - -@itemize @bullet - -@item Parts that use @code{\quote} can now be transposed. - -@item LilyPond does not try to produce output for files that -have a parse error. - -@item @code{lilypond-book} will now remove any output files that -contain failed music snippets. - -@item The mode changing commands (@code{\chords}, @code{\lyrics}, etc.) -have been renamed to @code{\chordmode}, @code{\lyricmode}, etc. The -command @code{\chords} is an abbreviation for - -@example - \new ChordNames \chordmode ... -@end example - -@noindent -@code{\drums}, @code{\lyrics}, @code{\chords}, @code{\figures} -function similarly. - -@item The types of events quoted with @code{\quote} can now be tuned -with @code{quotedEventTypes}. By default, only notes and rests end up -in quotes. - -@item LilyPond will try to keep -staves at the same distances across a page, but it will stretch -distances to prevent collisions. This results in a more even -appearance of the page. - -@item Key signature cancellations are now printed before the bar line, -and their appearance has been improved. - -@item Different voices that all use @code{\quote} can now refer to -each other. - - -@item The automatic staff changer, which is invoked with -@code{\autochange}, now creates the @code{up} and @code{down} staff -automatically, and uses bass clef for the bottom staff. - -@item There is now support for putting two slurs on chords, both above -and below. This is switched on with the @code{doubleSlurs} property. - -@item Running trills now have their own spanner and event, - -@example - c1\startTrillSpan c4\stopTrillSpan -@end example - -@item There is a new markup command @code{\postscript} that takes a -string that is dumped as verbatim PostScript in the output. - -@item The melody for a @code{\lyricsto} text can be changed during a -melody by setting the @code{associatedVoice} property. - -@item The @code{\lyricsto} keyword now automatically switches on -lyrics mode. - -@item The LilyPond binary now supports output options -@code{--dvi} @code{--png} @code{--ps} @code{--pdf} and -@code{--preview}. The old wrapper script for La@TeX{} has been -renamed to @code{lilypond-latex}. - -@item Support for ambitus has been rewritten. The Ambitus object is now -a grouping object, composed of @code{AmbitusLine}, -@code{AmbitusAccidental} and @code{AmbitusNoteHead}. These objects may -be tuned similar to accidentals and note heads. - -@item Ledger lines are now shortened when the spacing is tight. This -prevents ledger lines from colliding with each other. - -@item Slur formatting has been rewritten. The new slur code -works similar to the Beam formatter: scores are assigned for all -esthetic components of a slur. A large number of combinations for -begin and end points is then tried out. Slurs will now also take into -account collisions with staff lines, scripts (like staccato and -accent) and accidentals. - - -@item In the LilyPond emacs mode, entering @code{|} will display the - current beat within the measure. - -@item Colliding notes are now correctly aligned relative to notes in other staves. - -@item An experimental GNOME output backend is available for developers. -It depends on several unreleased packages such as gnome-guile TLA and -Pango CVS. The output interface coverage is sparse, but it already -does support point-and-click on the GNOME Canvas. See also -@file{scm/output-gnome.scm}. - -@item Context definitions are now stored in identifiers that match the -context name, in other words, to modify a @code{Staff} context, the -following code may be used. - -@example -\context @{ - \Staff - .. -@} -@end example - -@item -The @code{\paper} block has been renamed to @code{\layout}. A new -@code{\paper} block has been introduced to hold settings for paper -size and output scaling. Further options include @code{raggedbottom} -(if set, systems are not vertically filled to reach the bottom of the -page), and @code{raggedlastbottom}. - - -@item Support for fret diagrams has been contributed by Carl -D. Sorensen. @file{input/test/fret-diagram.ly} contains an example. - -@item The @code{--safe-mode} has been revisited: GUILE evaluation -is done in the R5RS safe module, with only the basic @code{ly:} -interface available and malicious @TeX{} code is stopped. However, to -be reasonably safe, you are advised to use the PostScript backend -rather than the @TeX{} backend anyway; and if possible use an UML -sandbox to run gs or latex. - -@item Music syntax can now be extended seamlessly. As an example, -here is the new implementation @code{\applymusic}, - -@example - applymusic = #(ly:make-music-function - (list procedure? ly:music?) ; signature - (lambda (where func music) ; the function - (func music))) -@end example - -@item @code{\apply} has been renamed to @code{\applymusic}. - -@item Music can be used as a markup. -When inserting a @code{score} block as part of a @code{\markup}, it -produces a rendered markup of the music. An example is in -@file{input/test/markup-score.ly}. - -@item LilyPond expressions can be embedded into Scheme. The syntax for -this is @code{#@{ ... #@}}. Within such a block, Scheme forms can be -introduced using a @code{$} character (@code{$$} results in a single -`$' character). These forms are then inserted in the pattern. - -@example -#(define (textoffset dx dy) - (ly:export - #@{ \override Voice.TextScript #'extra-offset = #(cons $dx $dy) #@})) - -@{ - c'^"normal text" - %% The following embedded scheme call is the same as - %% \override Voice.TextScript #'extra-offset = #(cons 2 -3) - #(textoffset 2 -3) - c'^"text with offset" -@} -@end example - -@item A music list at toplevel is interpreted as implicit @code{\score} -a @code{\score} block at toplevel is interpreted as an implicit -@code{\book} and @code{\notemode} mode is the default lexer mode. The -result is that - -@example -\header @{ title = "The Title" @} -@{ a b c @} -@end example - -is interpreted as - -@example -\header @{ title = "The Title" @} -\book @{ - \score @{ - \notemode @{ a b c @} - @} -@} -@end example - -This is handled by the function defined in -@code{toplevel-music-handler}. Similarly, @code{\score} and -@code{\book} are handled by @code{toplevel-score-handler} and a -@code{toplevel-book-handler}. By changing these variables, different -results can be obtained. - -@item Mode changing commands, -such as @code{\chordmode} and @code{\figuremode} must now be directly -followed by delimiters. The following example demonstrates the new -behavior, - -@verbatim - \figuremode \context Figures { .. } % wrong - \context Figures \figuremode { .. } % right -@end verbatim - - -@item The starting pitch for @code{relative} music is optional for music lists. -The default value is middle C. - -@item Combining lyrics with music can be done with @code{\addlyrics} - -@example - \relative @{ - \clef bass - d2 d c4 bes a2 \break - @} - \addlyrics @{ - My first Li -- ly song, - @} - \addlyrics @{ - Not much can go wrong! - @} -@end example - -Syntactically, @code{\addlyrics} is an infix operator. It is a -shortcut for a combination of @code{\new Lyrics}, @code{\lyricmode} -and @code{\lyricsto}. - -@item The parser is encapsulated in a Scheme function -@code{ly:parse-file}, so the following fragment processes two files - -@verbatim -#(ly:parse-file "another.ly") -\score { \notes { c4 }} -@end verbatim - -@item The @code{font-encoding} property can now be used to select -differently encoded fonts. The previous default setting -@code{TeX-text} has been replaced by latin1. LilyPond requires the -@uref{http://www.lilypond.org/download/fonts/,ec-fonts-mftraced} -package installed to function properly. - -@item The encoding of a file can be switched with -@code{\encoding}. The strings for markup texts are translated -automatically. - -@item The toplevel block @code{\book} introduces page layout. -A @code{\book} groups @code{\score} blocks into one page layout -entity. For example, two scores are combined in one book with - -@example -\book @{ - \score @{ ... @} - \score @{ ... @} -@} -@end example - - -@item -Titling and page breaks are handled by LilyPond. Page breaks may be -inserted manually with - -@example - \pageBreak -@end example - -@item -Invoking @code{lilypond} runs the actual binary, which not use -La@TeX{} for titling or page layout. If you need La@TeX{} code in -titles, you can use the @code{lilypond-book} program. The former -@code{lilypond} script has been retained as @code{lilypond-latex}. - -@item There is now less of a noticeable ``hook'' at the end of a long slur. - -@item The meaning of the @code{|} in the input can be redefined, by - assigning a music expression to @code{pipeSymbol}. - -@end itemize - - - -@c **************************************************************** - -@unnumbered New features in 2.2 since 2.0 - -@itemize @bullet - -@item Setting @code{raggedlast = ##t} in the @code{\paper} block -causes the last line to be set flush-left instead of justified. - -@item The @code{Timing_engraver} now sets the @code{Timing} alias on -its containing context automatically. - -@item The code for font selection has been rewritten. In addition to -existing font selection properties, the property @code{font-encoding} -has been added, which makes the switch between normal @code{text} and -other encodings like @code{braces}, @code{music} and @code{math}. - -@item The pmx2ly script has been removed from the distribution. - -@item Pedal brackets will now run to the last bar of a piece if they are not -explicitly ended. - -@item Context definitions now use the word @code{\context} instead of @code{\translator}. - -@item Property functions may be used as an argument to @code{set!}, -for example - -@example - (set! (ly:grob-property grob 'beam) ... ) -@end example - -@item In anticipation of Emacs 21.4 or 22.1, the info documentation contains -images. - -@item Cue notes can be quoted directly from the parts that -contain them. This will take into account transposition of source and target -instrument. For example, - -@verbatim -\addquote clarinet \notes\relative c' { - \transposition bes - fis4 fis fis fis -} - -\score { - \notes \relative c'' { - c8 d8 \quote 2 oboe es8 gis - } -} -@end verbatim - -@item The transposition of an instrument can be specified using the -@code{\transposition} command. An -E-flat alto saxophone is specified as - -@example - \transposition es' -@end example - -@item The naming of exported Scheme functions now follows Scheme conventions. -Changes be applied to Scheme files with - -@example - convert-ly -e -n --from=2.1.24 --to=2.1.26 *.scm -@end example - - -@item Notes can be excluded from auto-beaming, by marking them with -@code{\noBeam} -@example - c8 c \noBeam c c -@end example - -@noindent -will print two separate eighth notes, and two beamed notes. - -@item Translators and contexts have been split. The result of this -internal cleanup is that @code{Score} no longer is the top context; -@code{Score} is contained in the @code{Global} context. Consequently, -it is possible to tweak @code{Score} as follows: - -@example - \context Score \with @{ - @dots{} - @} -@end example - -@item The number of staff lines in Tablature notation is now -automatically deduced from the @code{stringTunings} property. - -@item The program reference has been cleaned up and revised. - -@item The syntax for setting properties has been simplified: -the following table lists the differences: - -@example - (old) (new) - -\property A.B = #C \set A.B = #C -\property A.B \unset \unset A.B -\property A.B \set #C = #D \override A.B #C = #D -\property A.B \override #C = #D (removed) -\property A.B \revert #C \revert A.B #C -@end example - -Furthermore, if @code{A} is left out, the bottommost context is used -by default. In other words, it is no longer necessary to explicitly -mention @code{Voice}, @code{Lyrics} or @code{ChordNames}. - -Old: - -@example - \property Voice.autoBeaming = ##f - \property Staff.TimeSignature \set #'style = #'C -@end example - -New: - -@example - \set autoBeaming = ##f - \override Staff.TimeSignature #'style = #'C -@end example - - -@item Tweaks made with @code{\override} and @code{\revert} no longer -hide tweaks at higher context levels. - -@item Melismata in lyrics are also properly handled in the MIDI output. - -@item The lilypond-book script has been rewritten. -It is shorter, cleaner and faster. The special construct -@code{mbinclude} has been removed, plain @code{@@include} or -@code{\input} can be used now. - -It now supports running convert-ly on the lilypond snippets, -@example - lilypond-book --filter='convert-ly --from=2.0.0' my-book.tely -@end example - -@item The @code{LyricsVoice} context has been removed. Lyrics should only -be constructed in @code{Lyrics}. - -@item The @code{Thread} context has been removed. Note heads and rests -are now constructed at @code{Voice} level. - -@item Harmonic notes can now be entered as - -@example - -@end example - -@item Drum notation is now supported as a regular feature: -percussion may be entered in @code{\drums} mode, and printed or -performed in a @code{DrumStaff} context: - -@example - \score @{ - \drums \new DrumStaff @{ hihat4 cowbell8 @} - @} -@end example - -@item The automatic staff changer was internally rewritten. As a -result, the syntax has been simplified as well: - -@example - \autochange @var{the-music} -@end example - -@item The ergonomic syntax of @code{\markup} now has an equivalent in -Scheme. The @code{markup*} macro creates such objects; the following -two markup commands are equivalent: -@example - f4^#(markup* #:raise 0.2 #:bold "hi") - f4^\markup @{ \raise #0.2 \bold hi @} -@end example - -@item Voice names, for vocal lines, have been added. They are similar -to instrument names. They can be set by defining @code{vocalName} -and @code{vocNam}. - -@item Safe mode has been reinstated for lilypond. -When lilypond is invoked with @code{--safe-mode}, @TeX{} and -PostScript file output is disallowed, and lilypond-bin is invoked with -@code{--safe-mode}, the user's Guile expressions are evaluated in a -safe environment and file inclusion is not allowed. - -Warning: this does not protect against denial-of-service attacks using -Guile, @TeX{} or PostScript. - -(This feature is still experimental.) - -@item There is now a Scheme macro for defining markup -commands. Special mark-up commands can be defined in user-files too. - -@item Many fixes for dimension scaling have been made, -resulting in correct results for scores that mix staves in different -sizes. - -@item Improved robustness when layout properties are accidentally removed. - -@item A more cleanly constructed part combiner has been installed. -It is more robust and less buggy. The part-combiner can be used with -@example - \partcombine @var{mus1} @var{mus2} -@end example - -@noindent -See @file{input/regression/new-part-combine.ly} for an example. - -@item Formatting of rehearsal marks has been improved. The @code{\mark} -command now only does automatic incrementing for marks specified as -integer. For example, @code{\mark #1} will print an A in the default -style. See @file{input/regression/rehearsal-mark-letter.ly}, -@file{input/regression/rehearsal-mark-number.ly}. - -@item Formatting of ottava brackets has been much improved. - -@item Objects in the output can now be documented: the following fragment - boxes the note head, and adds the text ``heads or tails?'' three -spaces below the box. - -@example - \context Voice \applyoutput #(add-balloon-text - 'NoteHead "heads, or tails?" - '(0 . -3)) - - - c8 -@end example - - -@item Default staff sizes are now scalable. There are two new mechanisms for -setting staff sizes. Both are demonstrated in this fragment: - -@example - #(set-global-staff-size 15) - \paper @{ - #(paper-set-staff-size (* 15 pt)) - @} -@end example - - -@noindent -Both have the same effect on the global layout of a piece. Similarly, -the paper size may be changed as follows - -@example - #(set-default-paper-size "a4") - \paper @{ - #(set-paper-size "a4") - @} -@end example - - -@item Warnings for bar check errors are more cleverly printed. This -makes @code{barCheckSynchronize} superfluous, so it is now switched -off by default. - -Warning: this will cause problems in scores that use bar checks to -shorten measures. - -@item The black note head was made a little rounder, which causes a less - frantic graphic impression. - -@item -A more concise syntax for checking octaves was introduced. A note may -be followed by @code{=}@var{quotes} which indicates what its absolute -octave should be. In the following example, - -@example - \relative c'' @{ c='' b=' d,='' @} -@end example - -@noindent -the d will generate a warning, because a d'' is -expected, but a d' is found. -@c @code adds ` ', very confusing. - -@item There is a new mechanism for putting lyrics to melodies. -With this mechanism, @code{Lyrics} lines can be put melodies -individually, allowing for different melismatic sections in every -@code{Lyrics}. See @file{input/regression/lyric-combine-new.ly}. - -@item Bar lines may now be dotted. - - -@item The documentation now has links to a wiki, where everyone can -add personal comments to the manual. - -@item Contexts may now be changed locally for an isolated music -expression. For example, - -@example - \new Voice \with @{ - \consists "Pitch_squash_engraver" - @} @{ - c'4 - @} -@end example - -@item The syntax for changing staffs has changed. The keyword -@code{\change} should now be used, e.g. - -@example - \change Staff = up -@end example - -@item Features of spanner contexts, like @code{Staff}, can now be changed - using @code{\set}, eg. - -@example - \new Staff @{ - \override Staff.StaffSymbol #'line-count = #4 - c'4 - @} -@end example - -@noindent -puts a quarter note C on a staff with 4 lines. - - -@item Multi measure rests are now truly centered between the -clefs/barlines of the staff, their position is independent of symbols -on the other staffs. - -@item Collision resolution for dots in chords has been improved greatly. - -@item -Spacing following barlines was improved for widely stretched lines. - -@item -Lyric hyphens and extenders now conform to standard typesetting -practice. - -@item -Lyrics are now aligned under note heads conforming to engraving -standards. The responsible code has been rewritten, and is drastically -simpler from the previous version. To aid this rewrite, the syntactic -function of the extender line ( __ ) has been changed: it is now -attached to the lyric syllable. - -@item -When redefining a context, the associated identifier is also -updated. For example, after reading - -@example - \translator @{ - \ScoreContext - autoBeaming = ##f - @} -@end example - -@noindent -the definition of @code{ScoreContext} is updated to include the changed -setting. - - -@item -The weight of the stafflines is now heavier at smaller staff sizes. -The font has been modified to match this look: at smaller sizes, the -font is heavier and the note heads are more rounded. - -@item Processing scores is now done while parsing the file. New -Scheme functions give more flexibility: for example, it is now possible -interpret a score, collecting synchronized musical events in a list, and -manipulate that information using inline Scheme. For an example, see -@file{input/no-notation/recording.ly}. - -@item Font sizes can now truly be scaled continuously: the @code{font-size} -is similar to the old @code{font-relative-size}, but may be set to -fractional values; the closest design size will be scaled to achieve -the desired size. As a side-effect, there are now no longer -limitations in using smaller fonts (eg. grace notes) at small staff -sizes. - -@item Stem tips are now also engraved with rounded corners. - -@item -The placement of accidentals on chords and ledgered notes is improved. - -@end itemize - - -@unnumbered New features in 2.0 since 1.8 - -@itemize - -@item -Crescendos can now be drawn dotted or dashed. - -@item -Quarter tones are now supported. They are entered by suffixing -@code{ih} for a half-sharp and @code{eh} for a half-flat. Hence, the -following is an ascending list of pitches: - -@example - ceses ceseh ces ceh c cih cis cisih cisis -@end example - -@item -The following constructs have been removed from the syntax: - -@example - \duration #SCHEME-DURATION - \pitch #SCHEME-PITCH - \outputproperty @var{func} @var{symbol} = @var{value} -@end example - -For @code{\outputproperty}, the following may be substituted: - -@example - \applyoutput #(outputproperty-compatibility @var{func} - @var{symbol} @var{value}) -@end example - -@item -Clefs may now be transposed arbitrarily, for example - -@example - \clef "G_8" - \clef "G_15" - \clef "G_9" -@end example - - -@item -The syntax for chords and simultaneous music have changed. -Chords are entered as - -@example - <@var{pitches}> -@end example - -while simultaneous music is entered as - -@example - <<@var{..music list..}>> -@end example - -In effect, the meanings of both have been swapped relative to their 1.8 -definition. The syntax for lists in @code{\markup} has changed -alongside, but figured bass mode was not changed, i.e.: - -@example - \markup @{ \center <@var{..list of markups..}> @} - \figure @{ <@var{figures}> @} -@end example - -As chords the more often used than simultaneous music, this change will -save keystrokes. - -@item -Each music expression can now be tagged, to make different printed -versions from the same music expression. In the following example, -we see two versions of a piece of music, one for the full score, and -one with cue notes for the instrumental part: - -@example -<< \tag #'part << - @{ c4 f2 g4 @} % in the part, we have cue-notes - \\ R1 >> - \tag #'score R1 % in the score: only a rest ->> -@end example - -The same can be applied to articulations, texts, etc.: they are -made by prepending - -@example - -\tag #@var{your-tags} -@end example - -to an articulation, for example, - -@example - c4-\tag #'with-fingerings -4 -\tag #'with-strings \6 -@end example - -This defines a note, which has a conditional fingering and a -string-number indication. - -@item -The settings for chord-fingering are more flexible. You can specify a -list where fingerings may be placed, eg. - -@example - \property Voice.fingeringOrientations = #'(left down) -@end example - -This will put the fingering for the lowest note below the chord, and the -rest to the left. - -@item -The script previously known as @code{ly2dvi} has been renamed to -@code{lilypond}. The binary itself is now installed as -@code{lilypond-bin}. - -@item -Markup text (ie. general text formatting) may now be used for lyrics too. - -@item -Two new commands for grace notes have been added, @code{\acciaccatura} -and @code{\appoggiatura}, - -@example - \appoggiatura f8 e4 - \acciaccatura g8 f4 -@end example - -Both reflect the traditional meanings of acciaccatura and appogiatura, -and both insert insert a slur from the first grace note to the main -note. - -@item -Layout options for grace notes are now stored in a context property, -and may now be set separately from musical content. - -@item -The @code{\new} command will create a context with a unique -name automatically. Hence, for multi-staff scores, it is no longer -necessary to invent arbitrary context names. For example, a two-staff -score may be created by - -@example - \simultaneous @{ - \new Staff @{ @var{notes for 1st staff} @} - \new Staff @{ @var{notes for 2nd staff} @} - @} -@end example - - - -@item -Octave checks make octave errors easier to correct. -The syntax is - -@example - \octave @var{pitch} -@end example - -This checks that @var{pitch} (without octave) yields @var{pitch} (with -octave) in \relative mode. If not, a warning is printed, and the -octave is corrected. - -@item -All articulations must now be entered postfix. For example, - -@example - c8[( d8]) -@end example - -@noindent -is a pair of beamed slurred eighth notes. - -@item -The definition of @code{\relative} has been simplified. Octaves are -now always propagated in the order that music is entered. In the -following example, - -@example - PRE - \repeat "unfold" 3 BODY \alternative @{ ALT1 ALT2 @} - POST -@end example - -@noindent -the octave of BODY is based on PRE, the starting octave of ALT1 on -BODY, the starting octave of ALT2 on ALT1, and the starting octave of -POST on ALT2. - -The same mechanism is used for all other music expressions, except the -chord. Backwards compatibility is retained through a special program option, -which is set through - -@example - #(ly:set-option 'old-relative) -@end example - -@item -Windows users can double click a @code{.ly} file to process and view -it automagically through the new @code{lily-wins} frontend. - -@end itemize - - - - -@unnumbered New features in 1.8 since 1.6 - -@itemize - -@item -The chord entry code has been completely rewritten. It is now -cleaner and more flexible. - -@item -A new syntax has been added for text entry. This syntax is more -friendly than the old mechanism, and it is implemented in a more -robust and modular way. For more information, refer to the section on -"Text markup" in the notation manual. - -@item -The integration of the input language and Scheme has been made deeper: -you can now use LilyPond identifiers in Scheme, and use Scheme -expressions instead of LilyPond identifiers. - -@item -The internal representation of music has been cleaned up completely -and converted to Scheme data structures. The representation may be -exported as XML. - -@item -A new uniform postfix syntax for articulation has been introduced. -A beamed slurred pair of eighth notes can be entered as - -@example - c8-[-( d8-]-) -@end example - -In version 2.0, postfix syntax will be the only syntax -available, and the dashes will become optional. - -This will simplify the language: all articulations can be entered as -postfix, in any order. - -@item -A new syntax has been added for chords: - - -@example - << PITCHES >> -@end example - -It is not necessary to update files to this syntax, but it will be for -using LilyPond version 2.0. In version 2.0, this syntax will be -changed to - -@example - < PITCHES > -@end example - -for chords, and - -@example - \simultaneous @{ .. @} -@end example - -for simultaneous music. - -To convert your files from to <>, use the script -included in @file{buildscripts/convert-new-chords.py}. - -This change was introduced for the following reasons - -@itemize @bullet -@item -It solves the "start score with chord" problem, where you have to - state \context Voice explicitly when a chord was the start of a - Staff or Score. -@item -With the new syntax, it is possible to distinguish between - articulations (or fingerings) which are for a single chord note, - and which are for the entire chord. This allows for per-note - fingerings, and is more logical on the whole. -@end itemize - -@item -User code may now be executed during interpreting. The syntax for -this code is - -@example - \applycontext #SCHEME-FUNCTION -@end example - -@item -User code may now be executed on arbitrary grobs during interpreting. -The syntax for this feature is - -@example - \applyoutput #SCHEME-FUNCTION -@end example - -@noindent -SCHEME-FUNCTION takes a single argument, and is called for every grob -that is created in the current context. - -@item -New algorithms for chord-name formatting have been installed. They -can be tuned and have ergonomic syntax for entering exceptions. - -@item -Texts may now be put on multimeasure rests, e.g. - -@example - R1*20^\markup @{ "GP" @} -@end example - -@item -Ancient notation now prints ligatures in Gregorian square neumes -notation, roughly following the typographical style of the Liber -hymnarius of Solesmes, published in 1983. Ligatures are still printed -without the proper line breaking and horizontal spacing. - -@item -Glissandi can now be printed using the zigzag style. - -@item -LilyPond can now print clusters. The syntax is - -@example - \apply #notes-to-clusters @{ NOTE NOTE .. @} -@end example - -@item -For irregular meters, beat grouping marks can be printed. The -syntax for this is - -@example - #(set-time-signature 7 8 '(3 2 2)) -@end example - - -@item -Nested horizontal brackets for music analysis can now be printed: - -@example - NOTE-\startGroup - .. - NOTE-\stopGroup -@end example - - -@item Ottava brackets are now fully supported as a feature. The syntax -is - -@example - #(set-octavation 1) -@end example - - -@item Metronome markings are printed when a \tempo command is processed. - - - -@item Fingerings can be put on chords horizontally. - - - -@item The appearance of various glyphs has been fine-tuned. - - - -@item Different types of percent style repeats may now be nested. - - - -@item The emacs support has been extended. - - -@item -The manual has been completely revised and extended. - -@end itemize - -@unnumbered New features in 1.6 since 1.4 - - -@itemize @bullet - -@item -Support for figured bass and tablature. - -@item -Completely rewritten beam formatting: provides much better output -now. - - -@item -Completely revised and improved music font. - - -@item -Completely rewritten MIDI import support. - -@item -Completely rewritten grace note support. Practically speaking this -means that grace notes can be slurred to normal normal notes. - - -@item -Improved accidental handling and formatting: styles for producing -cautionaries may vary, and complex collisions between accidentals of a -chord are handled much better. - -@item -Better spacing: both globally and locally. This includes subtle -details like optical stem spacing. - -@item -More support for ancient notation: mensural ligatures, ambitus -(pitch range) of voices, more shapes, etc. - -@item -More support for piano notation: bracket pedals, directed arpeggios, -arpeggio brackets. - -@item -Easier music polyphonic music entry. - -@item -More extensibility, many speedups and bugfixes - -@item -The manual has been thoroughly revised. - -@item -Development is now hosted at http://savannah.gnu.org, and sources -can be downloaded through anonymous CVS. - -@item -Support for windows: LilyPond is part of the cygwin distribution, -which comes with a user-friendly installer. - -@end itemize diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index 564169a733..5dfe97beb5 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -474,6 +474,16 @@ automatic note splitting (see @ref{Automatic note splitting}). This mechanism automatically splits long notes, and ties them across bar lines. +Ties are sometimes used to write out arpeggios. In this case, two tied +notes need not be consecutive. This can be achieved by setting the +@code{tieWaitForNote} property to true. For example, + +@lilypond[fragment,verbatim,relative=1,raggedright] +\set tieWaitForNote = ##t +\grace { c16[~ e~ g]~ } 4 +@end lilypond + + @refcommands @@ -3633,11 +3643,11 @@ c\sostenutoDown d e c, f g a\sostenutoUp @subsection Arpeggio @cindex Arpeggio -@cindex broken arpeggio +@cindex broken chord @cindex @code{\arpeggio} -You can specify an arpeggio sign on a chord by attaching an -@code{\arpeggio} to a chord +You can specify an arpeggio sign (also known as broken chord) on a +chord by attaching an @code{\arpeggio} to a chord @lilypond[quote,raggedright,fragment,relative=1,verbatim] @@ -3693,9 +3703,13 @@ arpeggiate the chord @seealso +Notation manual: @ref{Ties}, for writing out arpeggios. + Program reference: @internalsref{ArpeggioEvent}, @internalsref{Arpeggio}. + + @refbugs It is not possible to mix connected arpeggios and unconnected diff --git a/input/regression/tie-arpeggio.ly b/input/regression/tie-arpeggio.ly new file mode 100644 index 0000000000..0f05b53585 --- /dev/null +++ b/input/regression/tie-arpeggio.ly @@ -0,0 +1,24 @@ +\header +{ + + texidoc = "when @code{tieWaitForNote} is set, the right-tied note + does not have to follow the lef-tied note directly. When + @code{tieWaitForNote} is set to false, any tie will erase all pending + ties." + +} + +\version "2.5.12" + +\paper { raggedright = ##t } +\relative { + c~ e~ g~ + \set tieWaitForNote = ##t + c~ e~ g~ + + ~ + + \set tieWaitForNote = ##f + ~ + +} diff --git a/lily/include/tie-column.hh b/lily/include/tie-column.hh index 530c845fb9..9bce382846 100644 --- a/lily/include/tie-column.hh +++ b/lily/include/tie-column.hh @@ -20,8 +20,8 @@ public: static bool has_interface (Grob*); static void add_tie (Grob*me, Grob*); DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); + DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM)); static void set_directions (Grob*me); - static void old_directions (Grob*me); static void werner_directions (Grob*me); }; diff --git a/lily/include/tie.hh b/lily/include/tie.hh index 21a8100703..06fba20065 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -21,11 +21,12 @@ public: static void set_interface (Grob*); static bool has_interface (Grob*); static void set_direction (Grob*); - static Grob * head (Grob*, Direction) ; + static Grob *head (Grob*, Direction) ; + static int get_column_rank (Grob*, Direction); static Real get_position (Grob*) ; - DECLARE_SCHEME_CALLBACK (print, (SCM )); static Direction get_default_dir (Grob*) ; static SCM get_control_points (SCM); + DECLARE_SCHEME_CALLBACK (print, (SCM )); DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM )); }; diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 37c60dd94f..d7d699f449 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -129,8 +129,8 @@ Score_engraver::initialize () Object_key const *sys_key = context()->get_grob_key ("System"); pscore_->typeset_line (new System (props, sys_key)); - make_columns (); system_ = pscore_->system_; + make_columns (); system_->set_bound (LEFT, command_column_); command_column_->set_property ("breakable", SCM_BOOL_T); @@ -215,9 +215,6 @@ Score_engraver::stop_translation_timestep () progress_indication ("[" + to_string (breaks_) + "]"); } - - system_->add_column (command_column_); - system_->add_column (musical_column_); command_column_ = 0; musical_column_ = 0; @@ -240,6 +237,9 @@ Score_engraver::set_columns (Paper_column *new_command, { context ()->set_property ("currentMusicalColumn", new_musical->self_scm ()); } + + system_->add_column (command_column_); + system_->add_column (musical_column_); } Music_output* diff --git a/lily/tie-column.cc b/lily/tie-column.cc index 187536553c..b4c541595f 100644 --- a/lily/tie-column.cc +++ b/lily/tie-column.cc @@ -8,7 +8,7 @@ */ #include "tie-column.hh" - +#include "paper-column.hh" #include "spanner.hh" #include "group-interface.hh" #include "tie.hh" @@ -22,23 +22,25 @@ TODO: this doesn't follow standard pattern. Regularize. */ void -Tie_column::add_tie (Grob*me, Grob *s) +Tie_column::add_tie (Grob*me, Grob *tie) { - if (s->get_parent (Y_AXIS) - && Tie_column::has_interface (s->get_parent (Y_AXIS))) + if (tie->get_parent (Y_AXIS) + && Tie_column::has_interface (tie->get_parent (Y_AXIS))) return ; - + + if (!Pointer_group_interface::count (me, ly_symbol2scm ("ties"))) { - dynamic_cast (me)->set_bound (LEFT, Tie::head (s, LEFT)); - dynamic_cast (me)->set_bound (RIGHT, Tie::head (s, RIGHT)); + dynamic_cast (me)->set_bound (LEFT, Tie::head (tie, LEFT)); + dynamic_cast (me)->set_bound (RIGHT, Tie::head (tie, RIGHT)); } - s->set_parent (me, Y_AXIS); - Pointer_group_interface::add_grob (me, ly_symbol2scm ("ties"), s); - s->add_dependency (me); + + + tie->set_parent (me, Y_AXIS); + Pointer_group_interface::add_grob (me, ly_symbol2scm ("ties"), tie); + tie->add_dependency (me); } - void Tie_column::set_directions (Grob*me) { @@ -53,77 +55,21 @@ tie_compare (Grob* const & s1, } /* - See [Ross p. 138]. - +Werner: - In normal chord cases, the outer ties point outwards, and the - direction of the rest is determined by their staff position. + . The algorithm to choose the direction of the ties doesn't work + properly. I suggest the following for applying ties sequentially + from top to bottom: - Ross forgets about the tie that is *on* the middle staff line. We - assume it goes UP. (TODO: make me settable) */ -void -Tie_column::old_directions (Grob*me) -{ - Link_array ties = - Pointer_group_interface__extract_grobs (me, (Grob*)0, "ties"); - - for (int i = ties.size (); i--;) - if (get_grob_direction (ties[i])) - ties.del (i); - - if (!ties.size ()) - return ; + + The topmost tie is always `up'. - Direction d = get_grob_direction (me); - if (d) - { - for (int i = ties.size (); i--;) - { - Grob * t = ties[i]; - set_grob_direction (t, d); - } - return; - } - - if (ties.size () == 1) - { - Grob * t = ties[0]; - set_grob_direction (t, Tie::get_default_dir (t)); - return; - } - - ties.sort (tie_compare); - set_grob_direction (ties[0], DOWN); - ties.del (0); - - set_grob_direction (ties.pop (), UP); - for (int i = ties.size (); i--;) - { - Grob * t = ties[i]; - Real p = Tie::get_position (t); - Direction d = (Direction) sign (p); - if (!d) - d = UP; - set_grob_direction (t, d); - } - -} + + If there is a vertical gap to the last note above larger than + or equal to a fifth (or sixth?), the tie is `up', otherwise it + is `down'. -/* - -% . The algorithm to choose the direction of the ties doesn't work -% properly. I suggest the following for applying ties sequentially -% from top to bottom: -% -% + The topmost tie is always `up'. -% -% + If there is a vertical gap to the last note above larger than -% or equal to a fifth (or sixth?), the tie is `up', otherwise it -% is `down'. -% -% + The bottommost tie is always `down'. + + The bottommost tie is always `down'. - */ +*/ void Tie_column::werner_directions (Grob *me) { @@ -159,7 +105,11 @@ Tie_column::werner_directions (Grob *me) Real last_down_pos = 10000; if (!get_grob_direction (ties[0])) set_grob_direction (ties[0], DOWN); - + + /* + Go downward. + */ + Grob *last_tie = 0; for (int i = ties.size (); i--;) { Grob *t = ties[i]; @@ -168,7 +118,13 @@ Tie_column::werner_directions (Grob *me) Real p = Tie::get_position (t); if (!d) { - if (last_down_pos - p > 5) + if (last_tie + && Tie::get_column_rank (t, LEFT) + < Tie::get_column_rank (last_tie, LEFT)) + { + d = DOWN; + } + else if (last_down_pos - p > 5) { d = UP; } @@ -182,6 +138,8 @@ Tie_column::werner_directions (Grob *me) if (d == DOWN) last_down_pos = p; + + last_tie = t; } return ; @@ -196,7 +154,30 @@ Tie_column::after_line_breaking (SCM smob) return SCM_UNSPECIFIED; } - +/* + Extend the spanner over its Tie constituents. + */ +MAKE_SCHEME_CALLBACK (Tie_column, before_line_breaking, 1); +SCM +Tie_column::before_line_breaking (SCM smob) +{ + Spanner *me = dynamic_cast (unsmob_grob (smob)); + for (SCM s = me->get_property ("ties"); scm_is_pair (s); s = scm_cdr (s)) + { + Spanner *tie = dynamic_cast (unsmob_grob (scm_car (s))); + Direction dir = LEFT; + do + { + if (dir * Paper_column::get_rank (tie->get_bound (dir)->get_column ()) + > dir * Paper_column::get_rank (me->get_bound (dir)->get_column ())) + { + me->set_bound (dir, Tie::head (tie, dir)); + } + } + while (flip (&dir) != LEFT); + } + return SCM_UNSPECIFIED; +} ADD_INTERFACE (Tie_column, "tie-column-interface", "Object that sets directions of multiple ties in a tied chord", diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index e0649feb2d..f8b998f59c 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -27,14 +27,29 @@ TODO: Remove the dependency on musical info. We should tie on the basis of position and duration-log of the heads (not of the events). */ + +struct Head_event_tuple +{ + Grob *head_; + SCM tie_definition_; + Music *event_; + Head_event_tuple() + { + } + Head_event_tuple(Grob *h, Music *m, SCM def) + { + head_ = h; + event_ = m; + tie_definition_ = def; + } +}; + class Tie_engraver : public Engraver { Music *event_; - Music *last_event_; Link_array now_heads_; - Link_array heads_to_tie_; + Array heads_to_tie_; Link_array ties_; - SCM tie_start_definition_; Spanner * tie_column_; @@ -51,19 +66,18 @@ public: }; +void +Tie_engraver::derived_mark () const +{ + Engraver::derived_mark (); + for (int i = 0; i < heads_to_tie_.size(); i++) + scm_gc_mark (heads_to_tie_[i].tie_definition_); +} Tie_engraver::Tie_engraver () { event_ = 0; - last_event_ = 0; tie_column_ = 0; - tie_start_definition_ = SCM_EOL; -} - -void -Tie_engraver::derived_mark () const -{ - scm_gc_mark (tie_start_definition_); } @@ -96,7 +110,7 @@ Tie_engraver::acknowledge_grob (Grob_info i) now_heads_.push (h); for (int i = heads_to_tie_.size (); i--;) { - Grob *th = heads_to_tie_[i]; + Grob *th = heads_to_tie_[i].head_; Music * right_mus = unsmob_music (h->get_property ("cause")); Music * left_mus = unsmob_music (th->get_property ("cause")); @@ -107,21 +121,22 @@ Tie_engraver::acknowledge_grob (Grob_info i) && ly_c_equal_p (right_mus->get_property ("pitch"), left_mus->get_property ("pitch"))) { - Grob * p = new Spanner (tie_start_definition_, context()->get_grob_key ("Tie")); - announce_grob (p, last_event_->self_scm ()); + Grob * p = new Spanner (heads_to_tie_[i].tie_definition_, + context()->get_grob_key ("Tie")); + announce_grob (p, heads_to_tie_[i].event_->self_scm ()); Tie::set_interface (p); // cannot remove yet! Tie::set_head (p, LEFT, th); Tie::set_head (p, RIGHT, h); ties_.push (p); + heads_to_tie_.del (i); } } if (ties_.size () && ! tie_column_) { - tie_column_ = make_spanner ("TieColumn", SCM_EOL); - + tie_column_ = make_spanner ("TieColumn", ties[0]->self_scm ()); } if (tie_column_) @@ -134,7 +149,7 @@ void Tie_engraver::start_translation_timestep () { context ()->set_property ("tieMelismaBusy", - ly_bool2scm (heads_to_tie_.size ())); + ly_bool2scm (heads_to_tie_.size ())); } @@ -143,23 +158,36 @@ Tie_engraver::stop_translation_timestep () { if (ties_.size ()) { - heads_to_tie_.clear (); + if (!to_boolean (get_property ("tieWaitForNote"))) + { + heads_to_tie_.clear (); + } + for (int i = 0; i< ties_.size (); i++) { typeset_tie (ties_[i]); } ties_.clear (); - last_event_ = 0; tie_column_ = 0; } if (event_) { - tie_start_definition_ = updated_grob_properties (context (), ly_symbol2scm ("Tie")); - heads_to_tie_ = now_heads_; - last_event_ = event_; + SCM start_definition + = updated_grob_properties (context (), ly_symbol2scm ("Tie")); + + if (!to_boolean (get_property ("tieWaitForNote"))) + heads_to_tie_.clear(); + + for (int i = 0; i < now_heads_.size(); i++) + { + heads_to_tie_.push (Head_event_tuple (now_heads_[i], event_, + start_definition + )); + } } + event_ = 0; now_heads_.clear (); } diff --git a/lily/tie.cc b/lily/tie.cc index c2610d6f6f..569aa220ad 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -65,6 +65,18 @@ Tie::head (Grob*me, Direction d) return 0; } +int +Tie::get_column_rank (Grob *me, Direction d) +{ + Spanner *span = dynamic_cast (me); + Grob * h = head (me, d); + if (!h) + h = span->get_bound (d); + + Grob *col = dynamic_cast (h)->get_column (); + return Paper_column::get_rank (col); +} + Real Tie::get_position (Grob*me) { diff --git a/python/lilylib.py b/python/lilylib.py index 42a21f74b0..8e38dc23e1 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -504,7 +504,7 @@ def make_ps_images (ps_name, resolution = 90): if y == 0: y = 1 - cmd = r'''gs -g%dx%d -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=%s -r%d -dNOPAUSE %s %s -c showpage -c quit ''' % \ + cmd = r'''gs -g%dx%d -sDEVICE=png16m -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=%s -r%d -dNOPAUSE %s %s -c showpage -c quit ''' % \ (x, y, output_file, resolution, trans_ps, ps_name) rms = glob.glob (base + '-page*.png') @@ -516,7 +516,7 @@ def make_ps_images (ps_name, resolution = 90): if os.path.isfile (rmfile): os.unlink (rmfile) - cmd = r'''gs -s -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=%s -dNOPAUSE -r%d %s -c quit''' % (output_file, + cmd = r'''gs -s -sDEVICE=png16m -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=%s -dNOPAUSE -r%d %s -c quit''' % (output_file, resolution, ps_name) status = system (cmd) diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index 3bf7c51fc0..d8ac756c8b 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -351,6 +351,8 @@ the system/staff? Set to @code{SystemStartBrace}, takes a string number, a list of string tunings and Pitch object. It returns the text as a string.") + (tieWaitForNote ,boolean? "If true, tied notes do not have to follow each other directly. +This can be used for writing out arpeggios") (timeSignatureFraction ,number-pair? "pair of numbers, signifying the time signature. For example @code{#'(4 . 4)} is a 4/4 time signature.") diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index c7680bd388..fece9d0b2e 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -570,6 +570,7 @@ (X-extent-callback . #f) (Y-extent-callback . #f) (print-function . ,Ledger_line_spanner::print) + (layer . 0) (meta . ((interfaces . (spanner-interface ledger-line-interface)))) )) @@ -1242,6 +1243,7 @@ (TieColumn . ( (after-line-breaking-callback . ,Tie_column::after_line_breaking) + (before-line-breaking-callback . ,Tie_column::before_line_breaking) (X-extent-callback . #f) (Y-extent-callback . #f) (meta . ((interfaces . (tie-column-interface spanner-interface))))