From d7eed87eb0cd7a9c51891dae918339f38013a11d Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:58:41 +0000 Subject: [PATCH] lilypond-1.3.141 --- CHANGES | 67 ++++++ Documentation/user/refman.itely | 297 +++++++++++++++++-------- Documentation/user/tutorial.itely | 12 +- input/denneboom.ly | 9 +- input/just-friends.ly | 6 +- input/praeludium-fuga-E.ly | 6 +- input/regression/arpeggio-collision.ly | 2 +- input/test/caps.ly | 13 ++ input/test/lyrics.ly | 6 +- input/test/transposition.ly | 23 +- input/test/updown.ly | 10 +- input/tricks/boxed-molecule.ly | 58 +++++ input/twinkle-pop.ly | 2 +- lily/hairpin.cc | 1 + lily/include/slur.hh | 2 +- lily/include/spanner.hh | 3 + lily/molecule.cc | 13 ++ lily/slur.cc | 17 -- lily/spanner.cc | 18 ++ lily/tie.cc | 21 -- scm/font.scm | 19 +- scm/grob-description.scm | 11 +- 22 files changed, 443 insertions(+), 173 deletions(-) create mode 100644 input/test/caps.ly create mode 100644 input/tricks/boxed-molecule.ly diff --git a/CHANGES b/CHANGES index 9cc8901a9c..9d254b09da 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,70 @@ +1.3.140.jcn6 +============ + +* po update. + +* Renamed remaining mudela -> lilypond (except for old change logs). + +* Dropped Solo-Cello-Suite II and gnossienne-4 from ./mutopia, as +they're now accessible throug the ports. + +* Fixed compilation of lots of examples. + +* Convert-ly: added and fixed some conversions. + +* Doco updates. + +* Ly2dvi: don't hang compilation process: run latex in batchmode. + +* Some ly2dvi updates. + +* Junked cruft from makefiles. + +* Added message about make help at end of configure. + +* Some documentation updates. + +* Convert-ly: added some missing rules. + +* Ly2dvi: changed footer (and header) macros to match mutopia headers again. + +* Convert-ly: always insert or update version number. New option: +--assume-old will apply all conversions if version cannot be +determined. + +* Small documentation fixes. + +* Removed default (font-shape . italic) settings from TextScript and +TextSpanner. + +* Moved ports section of mutopia to mutopia/ports. Fixed make +bootstrapping. Added sync target, synced with www.mutopiaproject.org. + +* Bugfix: ly2dvi sets footers, headers, tagline. Pagenumbering on by default. + +1.3.140.hwn1 +============ + +* input/trick/boxed-molecule.ly : show how to draw boxes around grobs. + +* added font-shape caps, input/test/caps. + +* Added minimum-length for hairpin. Unified Tie::set_spacing_rods and +Slur::set_spacing_rods into Spanner::set_spacing_rods + +* Small doco fixes. + +1.3.140.mb1 +=========== + +* Bugfix: Some more examples in input/test/ work again. + +* bugfix: cautionary accidentals + + +1.3.140 +======= + 1.3.139.jcn5 ============ diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index d4a668bc27..3ec6395039 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -19,7 +19,7 @@ @chapter Reference Manual This document describes GNU LilyPond and its input format. The last -revision of this document was for LilyPond 1.3.138. +revision of this document was for LilyPond 1.3.141. @menu @@ -41,6 +41,7 @@ revision of this document was for LilyPond 1.3.138. * Page layout:: * Sound:: * Music entry:: +* Using LilyPond:: * Interpretation context:: * Syntactic details:: * Lexical details:: @@ -60,7 +61,7 @@ by `music compiler' or `music to notation compiler'. LilyPond is linked to GUILE, GNU's Scheme library for extension. The Scheme library provides the glue that holds together the low-level -routines and separate modules general, which are C++ +routines and separate modules general, which are C++. When lilypond is run to typeset sheet music, the following happens: @itemize @bullet @@ -133,7 +134,7 @@ The verbose syntax for pitch specification is @example \pitch @var{scmpitch} @end example -9 + @var{scmpitch} is a pitch scheme object, see @ref{Pitch data type}. In Note and Chord mode, pitches may be designated by names. The default @@ -350,8 +351,7 @@ If you dislike the amount of ties created for a chord, you set @code{Voice.sparseTies} to true, resulting in a smaller number of ties: @lilypond[fragment,verbatim,center] -%oops: core dump -% \property Voice.sparseTies = ##t + \property Voice.sparseTies = ##t ~ @end lilypond @@ -430,7 +430,7 @@ Rests are entered like notes, with note name `@code{r}'. Skips the amount of time specified by @var{duration}. If no other music is played, a gap will be left for the skipped time with no notes -printed. The short hand is only available in Note and Chord mode. +printed. The shorthand is only available in Note and Chord mode. @@ -464,6 +464,7 @@ numbers in this mode. @menu * Key signature:: +* Clef:: * Time signature:: * Unmetered music:: * Bar lines:: @@ -507,13 +508,14 @@ This command sets context property @code{Staff.keySignature}. @cindex @code{keySignature} @c . {Clef} -@subsection Clef changes +@node Clef +@subsection Clef @cindex @code{\clef} @example \clef @var{clefname} @code{;} @end example -Short-cut for +Shortcut for @example \property Staff.clefGlyph = @var{glyph associated with clefname} @@ -580,7 +582,7 @@ The time signature is changed by the @code{\time} command. Syntax: @example \time @var{numerator}@code{/}@var{denominator} @code{;} @end example -Internally, this is a short-cut for doing +Internally, this is a shortcut for doing @example \property Score.timeSignatureFraction = #'(@var{numerator} . @var{denominator}) @end example @@ -602,7 +604,7 @@ Partial measures are entered using the @code{\partial} command: \partial @var{duration} @code{;} @end example -Internally, this is a short cut for +Internally, this is a shortcut for @example \property Score.measurePosition = -@var{length of duration} @@ -643,7 +645,7 @@ achieve the same effect. \bar @var{bartype}; @end example -This is a short-cut for doing +This is a shortcut for doing @example \property Score.whichBar = @var{bartype} @end example @@ -711,14 +713,25 @@ Similarly, for slurs use @code{\slurBoth}, @code{\slurDown}, @code{\slurUp}. -@cindex @code{\slurBoth} -@cindex @code{\slurDown} -@cindex @code{\slurUp} -Aand for ties use + +@cindex @code{\tieBoth} +@cindex @code{\tieDown} +@cindex @code{\tieUp} +For ties use @code{\tieBoth}, @code{\tieDown}, @code{\tieUp}. +@cindex @code{\dynacmicBoth} +@cindex @code{\dynamicDown} +@cindex @code{\dynamicUp} +For dynamics use +@code{\dynamicBoth}, +@code{\dynamicDown}, +@code{\dynamicUp}. + +@c text scripts? articulation scripts? fingering? + @cindex @code{\voiceOne} @cindex @code{\voiceTwo} @cindex @code{\voiceThree} @@ -822,6 +835,18 @@ Automatic beaming is on by default, but it can switched off by setting @code{Voice.noAutoBeaming} to true. You you may find this necessary for a melody that goes with lyrics. +@refbugs + +It is not possible to specify beaming for beams with mixed durations, +that differs from the beaming of all separate durations, ie, you'll +have to specify manual beams to get: +@lilypond[fragment,singleline,relative] + \property Voice.autoBeamSettings + \override #'(end * * * *) = #(make-moment 3 8) + \time 12/8; c'8 c c c16 c c c c c [c c c c] c8 c c4 +@end lilypond + + @c . {Manual beams} @cindex Automatic beams @subsection Manual beams @@ -834,7 +859,6 @@ beaming algorithm. For example, the auto beamer will not beam over rests or bar lines, so if you want that, specify the begin and end point manually using @code{[} and @code{]}: -@quotation @lilypond[fragment,relative,verbatim] \context Staff { r4 [r8 g'' a r8] r8 [g | a] r8 @@ -855,7 +879,6 @@ control the number of beams through the properties [f8 r16 \property Voice.stemLeftBeamCount = #1 f g a] } @end lilypond -@end quotation @cindex @code{stemRightBeamCount} The beam symbol can be tweaked through @code{Voice.Beam}'s @@ -864,24 +887,20 @@ in staff-spaces. Set @code{height} to zero, to get horizontal beams: -@quotation @lilypond[fragment,relative,verbatim] \property Voice.Beam \set #'direction = #1 \property Voice.Beam \set #'height = #0 [a''8 e' d c] @end lilypond -@end quotation Here's how you'd specify a weird looking beam that instead of being horizontal, falls two staff spaces: -@quotation @lilypond[fragment,relative,verbatim] \property Voice.Beam \set #'staff-position = #2 \property Voice.Beam \set #'height = #-2 [c'8 c] @end lilypond -@end quotation @cindex @code{default-neutral-direction} @node Expressive marks @@ -915,7 +934,6 @@ stem end. If you want to override this layout you can do this through Maybe reinclude other slur features and move back to tricks? Esp. the second example, how to fix, can be very helpful. -@quotation @lilypond[fragment,relative,verbatim] \property Voice.Slur \set #'direction = #1 \property Voice.Stem \set #'length = #5.5 @@ -923,13 +941,11 @@ second example, how to fix, can be very helpful. \property Voice.Slur \set #'attachment = #'(stem . stem) g8(g)g4 @end lilypond -@end quotation If a slur would strike through a stem or beam, the slur will be moved away upward or downward. If this happens, attaching the slur to the stems might look better: -@quotation @lilypond[fragment,relative,verbatim] \property Voice.Stem \set #'direction = #1 \property Voice.Slur \set #'direction = #1 @@ -937,7 +953,6 @@ stems might look better: \property Voice.Slur \set #'attachment = #'(stem . stem) d,32( d'4 )d8.. @end lilypond -@end quotation Similarly, the curvature of a slur is adjusted to stay clear of note @@ -1058,6 +1073,8 @@ An application---or rather, a hack---is to fake octavation indications. * Articulation:: * Text scripts:: * Grace notes:: +* Glissando :: +* Dynamics:: @end menu @c . {Articulation} @@ -1231,15 +1248,12 @@ Unbeamed eighth notes and shorter by default have a slash through the stem. This behavior can be controlled with the @code{Stem}.@code{flag-style} property. -@quotation @lilypond[fragment,verbatim] \relative c'' { \grace c8 c4 \grace { [c16 c16] } c4 \grace { \property Grace.Stem \override #'flag-style = #'() c16 } c4 } - @end lilypond -@end quotation At present, nesting @code{\grace} notes is not supported. The following @@ -1275,7 +1289,7 @@ also be implemented. @c . {Glissando} @node Glissando -@subsubsection Glissando +@subsection Glissando @cindex Glissando @cindex @code{\glissando} @@ -1283,11 +1297,9 @@ also be implemented. A glissando line can be requested by attaching a @code{\glissando} to a note: -@quotation @lilypond[fragment,relative,verbatim] c'' \glissando c' @end lilypond -@end quotation @refbugs @@ -1298,7 +1310,7 @@ manually. @c . {Dynamics} @node Dynamics -@subsubsection Dynamics +@subsection Dynamics @cindex Dynamics @@ -1327,6 +1339,10 @@ note: @code{c4-\ff}. The available dynamic marks are: @code{\ppp}, @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff}, @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}. +@lilypond[verbatim,singleline,fragment,relative] + c''\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff + c2\sf c\rfz +@end lilypond @cindex Crescendo and Decrescendo @cindex crescendo @@ -1439,34 +1455,28 @@ Normal notation repeats are used like this: @end lilypond With alternative endings: -@quotation @lilypond[fragment,verbatim] c'1 \repeat volta 2 {c'4 d' e' f'} \alternative { {d'2 d'} {f' f} } @end lilypond -@end quotation Folded repeats look like this:@footnote{Folded repeats offer little more over simultaneous music. However, it is to be expected that more functionality -- especially for the MIDI backend -- will be implemented at some point in the future.} -@quotation @lilypond[fragment,verbatim] c'1 \repeat fold 2 {c'4 d' e' f'} \alternative { {d'2 d'} {f' f} } @end lilypond -@end quotation - If you don't give enough alternatives for all of the repeats, then the first alternative is assumed to be repeated often enough to equal the specified number of repeats. -@quotation @lilypond[fragment,verbatim] \context Staff { \relative c' { @@ -1476,7 +1486,6 @@ the specified number of repeats. } } @end lilypond -@end quotation @refbugs @@ -1685,7 +1694,7 @@ Piano pedal instruction can be expressed using @code{\sustainDown}, @code{\sustainUp}, @code{\unaChorda}, @code{\treChorde}, @code{\sostenutoDown} and @code{\sostenutoUp}. -These identifiers are short hands for spanner commands of the types +These identifiers are shorthands for spanner commands of the types @code{Sustain}, @code{UnaChorda} and @code{Sostenuto}: @lilypond[fragment,verbatim] @@ -1715,17 +1724,14 @@ You can specify an arpeggio sign on a chord by attaching an @code{\arpeggio} to a note of the chord. -@quotation @lilypond[fragment,relative,verbatim] \context Voice @end lilypond -@end quotation When an arpeggio crosses staffs in piano music, you attach an arpeggio to the chords in both staffs, and set @code{PianoStaff.connectArpeggios}. -@quotation @lilypond[fragment,relative,verbatim] \context PianoStaff < \property PianoStaff.connectArpeggios = ##t @@ -1733,7 +1739,6 @@ to the chords in both staffs, and set \context Voice = other { \clef bass; } > @end lilypond -@end quotation This command creates @code{Arpeggio} grobs. @@ -1757,7 +1762,6 @@ Whenever a voice switches to another staff a line connecting the notes can be printed automatically. This is enabled if the property @code{PianoStaff.followVoice} is set to true: -@quotation @lilypond[fragment,relative,verbatim] \context PianoStaff < \property PianoStaff.followVoice = ##t @@ -1769,7 +1773,6 @@ can be printed automatically. This is enabled if the property \context Staff=two {\clef bass; \skip 1*2;} > @end lilypond -@end quotation @c . {Lyrics} @@ -2029,9 +2032,6 @@ must be separated by a dot (@code{.}). Throughout these examples, chords have been shifted around the staff using @code{\transpose}. - -@quotation - @lilypond[fragment,verbatim] \transpose c'' { \chords { @@ -2039,9 +2039,7 @@ using @code{\transpose}. c:9 c:9-.5+.7+ c:3-.5- c:4.6.8 } } - @end lilypond -@end quotation @cindex @code{aug} @cindex @code{dim} @@ -2056,17 +2054,13 @@ raises the 5th, `@code{dim}' which lowers the 5th, `@code{maj}' which adds a raised 7th, and `@code{sus}' which replaces the 5th with a 4th. -@quotation - @lilypond[fragment,verbatim] \transpose c'' { \chords { c1:m c:min7 c:maj c:aug c:dim c:sus } } - @end lilypond -@end quotation Chord subtractions are used to eliminate notes from a chord. The @@ -2128,7 +2122,6 @@ For displaying printed chord names, use the @code{ChordNames} context. The chords may be entered either using the notation described above, or directly using simultaneous music. -@quotation @lilypond[verbatim,singleline] scheme = \notes { \chords {a1 b c} @@ -2140,14 +2133,12 @@ scheme = \notes { > } @end lilypond -@end quotation You can make the chord changes stand out by setting property @code{ChordNames.chordChanges} to true. This will only display chord names when there's a change in the chords scheme and at the start of the line. -@quotation @lilypond[verbatim] scheme = \chords { c1:m \break c:m c:m c:m d @@ -2161,7 +2152,6 @@ scheme = \chords { \context Staff \transpose c'' \scheme > } @end lilypond -@end quotation LilyPond examines chords specified as lists of notes to determine a name to give the chord. LilyPond will not try to identify chord inversions or @@ -2170,7 +2160,6 @@ entered as a list of pitches: [base vs. bass ?] -@quotation @lilypond[verbatim,center,singleline] scheme = \notes { @@ -2185,7 +2174,6 @@ scheme = \notes { > } @end lilypond -@end quotation By default LilyPond uses chord name system proposed by Harald Banter @@ -2303,7 +2291,6 @@ This means that middle C in @var{musicexpr} is transposed to a tone. The first version will print sharps and the second version will print flats. -@quotation @lilypond[fragment,verbatim] \context Staff { \clef "F"; @@ -2312,9 +2299,7 @@ will print flats. \transpose des'' { \key e \major; c d e f } \transpose cis'' { \key e \major; c d e f } } - @end lilypond -@end quotation If you want to use both @code{\transpose} and @code{\relative}, then you must use @code{\transpose} first. @code{\relative} will have no @@ -2426,6 +2411,24 @@ the behavior of part combining, refer to the automatically generated documentation. Look for @code{Thread_devnull_engraver} @code{Voice_devnull_engraver} and @code{A2_engraver}. +@refbugs + +In @code{soloADue} mode, when the two voices play the same notes on and +off, the part combiner may typeset @code{a2} more than once in a +measure. + +@lilypond[fragment,singleline] + \context Staff < + \context Voice=one \partcombine Voice + \context Thread=one \relative c'' { + c b c b c a c a + } + \context Thread=two \relative c'' { + b b b b f a f a + } + > +@end lilypond + @cindex @code{Thread_devnull_engraver} @cindex @code{Voice_engraver} @cindex @code{A2_engraver} @@ -2473,7 +2476,6 @@ anticipates the pitch of the first note(s) of the following line and thus helps the player or singer to manage line breaks during performance, thus enhancing readability of a score. -@quotation @lilypond[verbatim] \score { \notes { c'1 d' e' d' \break c' d' e' d' } @@ -2486,7 +2488,6 @@ performance, thus enhancing readability of a score. } } @end lilypond -@end quotation Custodes were frequently used in music notation until the 16th century. There were different appearences for different notation styles. @@ -2613,6 +2614,9 @@ and @var{grobname} are strings and @var{value} is a Scheme expression. @refbugs LilyPond will hang or crash if @var{value} contains cyclic references. +The backend is not very strict in type-checking grob properties. If you +@code{\revert} properties that are expected to be set by default, +LilyPond may crash. @@ -2784,8 +2788,6 @@ the @TeX{} family. @cindex font magnification @cindex @code{font-interface} -@refbugs - @node Text markup @subsection Text markup @@ -2796,16 +2798,16 @@ LilyPond has an internal mechanism to typeset texts. You can form text markup expressions by composing scheme expressions in the following way. - -[BUG] - @lilypond[verbatim, singleline] \relative c' { - b_#"italic" - c^#'(upright "upright") - c_#'((bold upright) "bold") - d^#'(lines "one" ((bold upright) "two")) - e_#'(music (named "noteheads-2" "flags-u3")) + \fatText + a^#"upright" + b_#'(bold "bold") + c^#'(italic "italic") + d_#'((bold italic) "ff") + e^#'(dynamic "ff") + f_#'(lines "one" (bold "two")) + g^#'(music "noteheads-2" "flags-u3") } @end lilypond @@ -2815,17 +2817,17 @@ of a grob. Formally, it is defined as follows: @example text: string | (head? text+) head: markup | (markup+) -markup-item: property | abbrev | @var{fontstyle} +markup-item: property | abbrev property: (@var{key} . @var{value}) abbrev: @code{rows lines roman music bold italic named super sub text} + @code{finger volta timesig mmrest mark script large Large dynamic} @end example The markup is broken down and converted into a list of grob properties, which are prepended to the property list. The @var{key}-@var{value} pair is a grob property. -The following abbreviations are currently -defined: +The following abbreviations are currently defined: @table @code @item rows @@ -2848,14 +2850,26 @@ horizontal mode: set all text on one line (default) superscript @item sub subscript +@item finger + select fingering number fontstyle +@item volta + select volta number fontstyle +@item timesig + select time signature number fontstyle +@item mmrest + select multi measure rest number fontstyle +@item mark + select mark number fontstyle +@item script + select scriptsize roman fontstyle +@item large + select large roman fontstyle +@item Large + select Large roman fontstyle +@item dynamic + select dynamics fontstyle @end table -@var{fontstyle} may be any of @code{finger volta timesig mmrest mark -script large Large dynamic} - -[wat is het verschil tussen fontstyle en abbrev? ] - - It is possible to use @TeX{} commands in the strings, but this should be avoided because this makes it impossible for LilyPond to compute the exact length of the string, which may lead to collisions. Also, @TeX{} @@ -2933,8 +2947,10 @@ use either this or @code{stafflinethickness} @item @code{linewidth} Sets the width of the lines. -If set to a negative value, a single - unjustified line is produced. +If set to a negative value, a single unjustified line is produced. +@c rename to singleLinePaper ? +The shorthand @code{\singleLine} defines a default paper block that +produces a single line. @cindex @code{textheight} @@ -3297,7 +3313,7 @@ package) to @file{emacsclient.c} and @file{server.el} from the emacs source code. Recompile and stick the recompiled emacsclient into a bin directory, and put @file{server.el} into a elisp directory (eg. @file{~/usr/share/emacs/}). Add the following to your @file{.emacs} -init file, beifore invoking server-start. +init file, before invoking server-start. @example (setq load-path (cons "~/usr/share/emacs" load-path)) @@ -3322,6 +3338,107 @@ will complain about not finding @code{src:X:Y} files. Those complaints are harmless, and can be ignored. +@c . {Using LilyPond} +@node Using LilyPond +@section Using LilyPond +@cindex Using LilyPond +@cindex Generating output + +@c slaat dit ergens op? + +@c direct postscript? + +@table @code +@item plain lilypond +@example +lilypond foo.ly +@end example +For more information on how to use lilypond see +@ifnottex +@ref{Invoking LilyPond}. +@end ifnottex +@iftex +the online manual. +@end iftex + +@item ly2dvi +Ly2dvi produces titling from @code{\header} fields. +@example +ly2dvi foo.ly +@end example +For more information on how to use ly2dvi see +@ifnottex +@ref{ly2dvi}. +@end ifnottex +@iftex +the online manual. +@end iftex + +@item lilypond-book +Lilypond-book supports interleaving text and music. +@example +lilypond-book foo.doc +@end example +For more information on how to use lilypond-book see +@ifnottex +@ref{lilypond-book}. +@end ifnottex +@iftex +the online manual. +@end iftex +@end table + + +An emacs mode for LilyPond is included with the source archive as +@file{lilypond-mode.el} and @file{lilypond-font-lock.el}. If you have +an RPM, it is in @file{/usr/share/doc/lilypond-X/}. You have to install +it yourself. + +Add this to your ~/.emacs or ~/.emacs.el: +@example + (load-library "lilypond-mode.el") + (setq auto-mode-alist + (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist)) + (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))) +@end example + +If you have the latest LilyPond-1.3.x Debian package, LilyPond-mode +is automatically loaded, so you need not modify your ~/.emacs file. + +@menu +* Pre-cooked makefile:: +@end menu + +@node Pre-cooked makefile +@subsection Pre-cooked makefile + +@c waar deze info? is uiteindelijk wel handig, schat ik. +[TODO: cut blabla] +If you have a big music project, or just a lot of LilyPond input files, +all generated output from LilyPond, @TeX{} and metafont will clutter +your working directory. LilyPond comes with a one-size-fits-all +pre-cooked makefile that helps you manage producing ouptut. It will +produce all output in @file{out}, generate and track dependencies. +Also, it helps in preparing your submission to the @ref{Mutopia +project}. + +@file{make/ly.make} +@example +mkdir my-project +cd my-project +cp /usr/share/lilypond/make/ly.make GNUmakefile +cp /usr/share/doc/lilypond/examples/input/tutorial/menuet.ly . +make menuet +[..] +Generated out/menuet.ps for target menuet. +@end example + +Type @samp{make help} to see possible targets. + +[TODO] +@file{/usr/share/lilypond/doc/lilypond/examples/input/mutopia-header.ly} + + @node Interpretation context @section Interpretation context @@ -3385,8 +3502,6 @@ This instructs lilypond to interpret @var{musicexpr} within the context of type @var{contexttype} and with name @var{contextname}. If this context does not exist, it will be created. -@quotation - @lilypond[verbatim,singleline] \score { \notes \relative c'' { @@ -3395,7 +3510,6 @@ context does not exist, it will be created. } @end lilypond -@end quotation In this example, the @code{c} and @code{d} are printed on the default staff. For the @code{e}, a context Staff called @@ -3648,7 +3762,6 @@ be used as the very first item of a translator. In order to define such an identifier outside of @code{\score}, you must do @quotation - @example \paper @{ foo = \translator @{ @dots{} @} diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index c3389062a3..04265373c0 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -182,6 +182,9 @@ manual was written using lilypond-book. lilypond-book is discussed in [TODO] +* setting of env vars (TFMINPUTS,MFINPUTS,TEXINPUTS) +* dvi viewer doesn't display postscript + @node The first tune @section The first tune @@ -1135,7 +1138,7 @@ oboes = \notes \relative c'' \context Voice = oboe { } hoomPah = \repeat unfold 8 - \notes \transpose c' { c8 \stemDown c'8 \stemUp } + \notes \transpose c' { \stemUp c8 \stemBoth \stemDown c'8 \stemBoth } bassvoices = \notes \relative c' { c4 g8. b,16 @@ -1819,9 +1822,8 @@ bars. @section The end That's all folks. From here, you can either try fiddling with input -files, or you can read the reference manual. +files, or you can read the reference manual. You can find more example +files in @file{input} and @file{input/test}. You can also look at Real +Music (TM), have a look at the @ref{Mutopia project}. -@c @lilypond[nofragment] -@c #(set! point-and-click #f) -@c @end lilypond diff --git a/input/denneboom.ly b/input/denneboom.ly index a68d3f565e..a29abcfa48 100644 --- a/input/denneboom.ly +++ b/input/denneboom.ly @@ -4,6 +4,7 @@ enteredby = "jcn"; copyright = "public domain"; } %{ file tests silly line shapes %} +% Broken since 1.3.55 \include "paper20.ly" @@ -66,7 +67,7 @@ verseOne = \notes{ } verseOneStaff = \context Lyrics = one - \verse_one + \$verse_one verseTwo = \notes{ @@ -77,7 +78,7 @@ verseTwo = \notes{ } verseTwoStaff = \context Lyrics = two - \verse_two + \$verse_two denneboomShape = \paper{ @@ -107,9 +108,9 @@ denneboomShape = \paper{ \score{ \addlyrics \context Staff { \time 3/4; \melody } - \context Lyrics \verse_one + \context Lyrics \$verse_one \paper{ - \denneboom_shape + \$denneboom_shape } \midi{ \tempo 4 = 90; } } diff --git a/input/just-friends.ly b/input/just-friends.ly index 9d704f3a9e..e73326463f 100644 --- a/input/just-friends.ly +++ b/input/just-friends.ly @@ -32,7 +32,7 @@ of a certain tune (Jazz, Real Book, for example), like \score{ \context ChordNames \chords{ \property Score.barAtLineStart = 1 - \repeat semi 2 { + \repeat volta 2 { f1:maj f:maj f:7 bes:7 c:maj c:maj es es d:7 g:7 b2:7/fis e:7 a1:7\break @@ -49,9 +49,9 @@ of a certain tune (Jazz, Real Book, for example), like linewidth = 100.0\mm; \translator{ \ChordNamesContext - barAuto = "1"; + barNonAuto = ##f; \consists Bar_engraver; - \consists "Repeat_engraver"; + \consists "Volta_engraver"; } } } diff --git a/input/praeludium-fuga-E.ly b/input/praeludium-fuga-E.ly index 970a1053e5..b63607a78d 100644 --- a/input/praeludium-fuga-E.ly +++ b/input/praeludium-fuga-E.ly @@ -190,12 +190,12 @@ breakmusic = \notes { \context PianoStaff < \context Staff = treble { \property Score.midiInstrument = "church organ" - \praeludium_right \breakmusic \fugaII_right } + \praeludiumRight \breakmusic \fugaIIRight } \context Staff = bass { - \praeludium_left \breakmusic \fugaII_left } + \praeludiumLeft \breakmusic \fugaIILeft } > \context Staff = pedal { - \praeludium_pedal \breakmusic \fugaII_pedal } + \praeludiumPedal \breakmusic \fugaIIPedal } > \paper { diff --git a/input/regression/arpeggio-collision.ly b/input/regression/arpeggio-collision.ly index 6425b98217..7a8d7f0aee 100644 --- a/input/regression/arpeggio-collision.ly +++ b/input/regression/arpeggio-collision.ly @@ -1,5 +1,5 @@ -xheader = { +header = { texidoc = "arpeggio stays clear of accidentals and flipped note heads. Since Arpeggio engraver is Voice, it does nothing for voice collisions." }; diff --git a/input/test/caps.ly b/input/test/caps.ly new file mode 100644 index 0000000000..fc2ec02d08 --- /dev/null +++ b/input/test/caps.ly @@ -0,0 +1,13 @@ +\header { +texidoc = " Small caps is available as font-shape caps. + + "; } +shapeSC = \property Lyrics.LyricText \override #'font-shape = #'caps + shapeNorm = \property Lyrics.LyricText \revert #'font-shape + +\score { < + \notes \relative c'' { c4 c4 c8 c8 } +\lyrics \context Lyrics { + what4 is4 \shapeSC Bud8 -- dha?8 }> +\paper { linewidth = -1.;} + } diff --git a/input/test/lyrics.ly b/input/test/lyrics.ly index a7e1fc562d..e19086252c 100644 --- a/input/test/lyrics.ly +++ b/input/test/lyrics.ly @@ -1,7 +1,7 @@ somewhatLong = \lyrics{ - \property Lyrics.LyricText \set #'font-style = #'roman + \property Lyrics . LyricText \set #'font-style = #'roman AaaaaaA2 BbbbbbB2 CcccccC2 @@ -11,7 +11,7 @@ somewhatLong = \lyrics{ } ratherLong = \lyrics{ - \property Lyrics.LyricText \set #'font-style = #'roman + \property Lyrics . LyricText \set #'font-style = #'roman LLLLoooonggggg2 Syyllllaaabbble2 LLLLoooonggggg2 @@ -21,7 +21,7 @@ ratherLong = \lyrics{ } quiteLong = \lyrics{ - \property Lyrics.LyricText \set #'font-style = #'roman + \property Lyrics . LyricText \set #'font-style = #'roman LLLLLLLLLooooongggggggg2 Syyyyyyyyyyyyylllllllaaaaaabbble2 LLLLLLLLLooooongggggggg2 diff --git a/input/test/transposition.ly b/input/test/transposition.ly index ee8388b370..e0948ac178 100644 --- a/input/test/transposition.ly +++ b/input/test/transposition.ly @@ -12,6 +12,12 @@ As you can see in output = the example file "test.ly" there are a few problems The solution gis=as etc. would concern both note and key transposistion Eric + +- Note that transpose eses of fis-major = as-major +- Note also that key signatures specified with \property keySignature + are not transposed! + + /Mats B, March 21, 2001 %} \header{ @@ -39,12 +45,15 @@ vTwo = \notes \transpose d' { \vOne } vThree = \notes \relative c''{ \clef"violin"; - \keysignature fis cis; +% \keysignature fis cis; + \property Staff.keySignature = #'((0 . 1)(3 . 1)) \time 2/4 ; d4 d | - \keysignature bes es fis; +% \keysignature bes es fis; + \property Staff.keySignature = #'((3 . 1)(2 . -1)(6 . -1)) fis4 fis | - \keysignature fis cis gis dis ais eis; +% \keysignature fis cis gis dis ais eis; + \property Staff.keySignature = #'((2 . -1)(5 . -1)(1 . 1)(4 . 1)(0 . 1)(3 . 1)) cis4 ais4 | } @@ -52,10 +61,10 @@ vFour = \notes \transpose d' \vThree \score { \context StaffGroup < - \vOne - \vTwo - \vThree - \vFour + \context Staff=vOne \vOne + \context Staff=vTwo \vTwo + \context Staff=vThree \vThree + \context Staff=vFour \vFour > \paper { linewidth= 130.\mm; } } diff --git a/input/test/updown.ly b/input/test/updown.ly index 2e0a473fdc..55869799b8 100644 --- a/input/test/updown.ly +++ b/input/test/updown.ly @@ -1,16 +1,12 @@ \score { \context Voice \notes\relative c { - % this used to work: + % this used to work (long time ago): % <{\voiceOne e} % {\voiceTwo c}> % now we need: - \context Staff - <{\voiceOne e} - {\voiceTwo c}> - - - ; + <\context Voice=one {\voiceOne e} + \context Voice=two {\voiceTwo c}> } \paper { } diff --git a/input/tricks/boxed-molecule.ly b/input/tricks/boxed-molecule.ly new file mode 100644 index 0000000000..1dc8cb0fd3 --- /dev/null +++ b/input/tricks/boxed-molecule.ly @@ -0,0 +1,58 @@ +\header { + +texidoc = "overriding the molecule callback can also be used to draw a + box around arbitrary grobs. + + TODO: check whether the corners are really correct. + + "; +} +#(define (box-molecule xext yext) + (ly-make-molecule + (list 'filledbox (- (car xext)) (cdr xext) + (- (car yext)) (cdr yext)) + xext yext) +) + +#(define (widen-interval iv amount) + (cons (- (car iv) amount) + (+ (cdr iv) amount)) +) + +#(define (make-molecule-boxer callback) + (define (molecule-boxer grob) + (let* + ( + (mol (callback grob)) + (box-padding 0.1) + (x-ext (widen-interval (ly-get-molecule-extent mol 0) box-padding)) + (y-ext (widen-interval (ly-get-molecule-extent mol 1) box-padding)) + (rule-thick 0.1) + (x-rule (box-molecule (widen-interval x-ext rule-thick) + (cons 0 rule-thick))) + (y-rule (box-molecule (cons 0 rule-thick) y-ext)) + ) + + (set! mol (ly-combine-molecule-at-edge mol 0 1 y-rule (* 0.5 box-padding))) + (set! mol (ly-combine-molecule-at-edge mol 0 -1 y-rule (* 0.5 box-padding))) + (set! mol (ly-combine-molecule-at-edge mol 1 1 x-rule 0.0)) + (set! mol (ly-combine-molecule-at-edge mol 1 -1 x-rule 0.0)) + + mol + )) + molecule-boxer + ) + + + \score { \notes { + + \property Voice.TextScript \override #'molecule-callback = + #(make-molecule-boxer Text_item::brew_molecule) + + c'4^"foo" + +\property Voice.Stem \override #'molecule-callback = + #(make-molecule-boxer Stem::brew_molecule) + + c''8 + }} diff --git a/input/twinkle-pop.ly b/input/twinkle-pop.ly index f95be9930c..43be947cc8 100644 --- a/input/twinkle-pop.ly +++ b/input/twinkle-pop.ly @@ -33,7 +33,7 @@ acc = \chords { } text = \lyrics{ - \property Lyrics.LyricText \set #'font-style = #'italic + \property Lyrics . LyricText \set #'font-style = #'italic Ah!4 vous dir -- ai -- je ma man2 Ce4 qui cau -- se mon tour -- ment2 diff --git a/lily/hairpin.cc b/lily/hairpin.cc index a42dea8a11..23de3362d4 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -93,3 +93,4 @@ Hairpin::brew_molecule (SCM smob) } + diff --git a/lily/include/slur.hh b/lily/include/slur.hh index f4e28b7947..7313ee7e6c 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -22,7 +22,7 @@ public: static Bezier get_curve (Grob *me); static Direction get_default_dir (Grob *me); DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); - DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM )); + DECLARE_SCHEME_CALLBACK (height, (SCM,SCM)); private: static Real get_first_notecolumn_y (Grob *me, Direction dir); diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 03cb986634..8f94e79bd8 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -33,6 +33,8 @@ class Spanner : public Grob { Drul_array spanned_drul_; public: + DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM )); + Link_array broken_into_l_arr_; // todo: move to somewhere else. @@ -54,6 +56,7 @@ public: virtual SCM do_derived_mark (); protected: void set_my_columns (); + VIRTUAL_COPY_CONS (Grob); virtual void do_break_processing (); virtual Line_of_score*line_l () const; diff --git a/lily/molecule.cc b/lily/molecule.cc index 9ea0eb0a6a..5f1ced7f49 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -201,9 +201,22 @@ Molecule::ly_molecule_combined_at_edge (SCM first, SCM axis, SCM direction, } +SCM +make_molecule (SCM expr, SCM xext, SCM yext) +{ + /* + TODO: typechecking. + */ + Box b (ly_scm2interval (xext), ly_scm2interval(yext)); + Molecule m (b, expr); + return m.smobbed_copy (); +} + + static void molecule_init () { + scm_make_gsubr ("ly-make-molecule", 3, 0, 0, (Scheme_function_unknown) make_molecule); scm_make_gsubr ("ly-combine-molecule-at-edge", 5 , 0, 0, (Scheme_function_unknown) Molecule::ly_molecule_combined_at_edge); scm_make_gsubr ("ly-set-molecule-extent!", 3 , 0, 0, (Scheme_function_unknown) Molecule::ly_set_molecule_extent_x); scm_make_gsubr ("ly-get-molecule-extent", 2 , 0, 0, (Scheme_function_unknown) Molecule::ly_get_molecule_extent); diff --git a/lily/slur.cc b/lily/slur.cc index 316774e37d..3e2743385b 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -479,23 +479,6 @@ Slur::get_encompass_offset_arr (Grob *me) } -MAKE_SCHEME_CALLBACK (Slur,set_spacing_rods,1); -SCM -Slur::set_spacing_rods (SCM smob) -{ - Grob*me = unsmob_grob (smob); - - Rod r; - Spanner*sp = dynamic_cast (me); - r.item_l_drul_[LEFT] = sp->get_bound (LEFT); - r.item_l_drul_[RIGHT] = sp->get_bound (RIGHT); - r.distance_f_ = - gh_scm2double (me->get_grob_property ("minimum-length")) - * 1.0; - - r.add_to_cols (); - return SCM_UNSPECIFIED; -} /* diff --git a/lily/spanner.cc b/lily/spanner.cc index b51c332d5f..0fba92f847 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -381,3 +381,21 @@ extend_spanner_over_elements (Grob*s) sp->set_bound (RIGHT, p2); } + +MAKE_SCHEME_CALLBACK (Spanner,set_spacing_rods,1); +SCM +Spanner::set_spacing_rods (SCM smob) +{ + Grob*me = unsmob_grob (smob); + + Rod r; + Spanner*sp = dynamic_cast (me); + r.item_l_drul_[LEFT] = sp->get_bound (LEFT); + r.item_l_drul_[RIGHT] = sp->get_bound (RIGHT); + r.distance_f_ = + gh_scm2double (me->get_grob_property ("minimum-length")) + * 1.0; + + r.add_to_cols (); + return SCM_UNSPECIFIED; +} diff --git a/lily/tie.cc b/lily/tie.cc index d465ae8b66..58ef8d549b 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -278,27 +278,6 @@ Tie::get_control_points (SCM smob) return controls; } -MAKE_SCHEME_CALLBACK (Tie,set_spacing_rods,1); - -/* - TODO: set minimum distances for begin/end of line - */ -SCM -Tie::set_spacing_rods (SCM smob) -{ - Grob*me = unsmob_grob (smob); - Spanner*sp = dynamic_cast (me); - Rod r; - - r.item_l_drul_ [LEFT]=sp->get_bound (LEFT); - r.item_l_drul_ [RIGHT]=sp->get_bound (RIGHT); - - r.distance_f_ - = gh_scm2double (me->get_grob_property ("minimum-length")) - * 1.0; - r.add_to_cols (); - return SCM_UNSPECIFIED; -} MAKE_SCHEME_CALLBACK (Tie,brew_molecule,1); SCM diff --git a/scm/font.scm b/scm/font.scm index dc5dfeba9a..874e8fcc43 100644 --- a/scm/font.scm +++ b/scm/font.scm @@ -90,6 +90,12 @@ ((-1 bold upright roman cmbx 8) . "cmbx8") ((-2 bold upright roman cmbx 7) . "cmbx7") + ((2 bold italic roman cmbxti 12) . "cmbxti12") + ((1 bold italic roman cmbxti 12) . "cmbxti12") + ((0 bold italic roman cmbxti 10) . "cmbxti10") + ((-1 bold italic roman cmbxti 8) . "cmbxti8") + ((-2 bold italic roman cmbxti 7) . "cmbxti7") + ((4 medium upright typewriter cmtt 17) . "cmtt17") ((3 medium upright typewriter cmtt 17) . "cmtt17") ((2 medium upright typewriter cmtt 12) . "cmtt12") @@ -100,7 +106,16 @@ ((-3 medium upright typewriter cmtt 6) . "cmtt6" ) ((-4 medium upright typewriter cmtt 5) . "cmtt5" ) ((-5 medium upright typewriter cmtt 5) . "cmtt5" ) + + ((3 medium caps roman cmcsc 12) . "cmcsc12") + ((2 medium caps roman cmcsc 12) . "cmcsc12") + ((1 medium caps roman cmcsc 12) . "cmcsc12") + ((0 medium caps roman cmcsc 10) . "cmcsc10") + ((-1 medium caps roman cmcsc 8) . "cmcsc8") + ((-2 medium caps roman cmcsc 7) . "cmcsc7") + ((-3 medium caps roman cmcsc 7) . "cmcsc7") + ;; should use the same brace font every where and fix C++ code. ((2 * * braces feta-braces 26) . "feta-braces26") ((1 * * braces feta-braces 23) . "feta-braces23") @@ -199,8 +214,8 @@ (mark . ((font-family . number) (font-relative-size . 1))) (script . ((font-family . roman) (font-relative-size . -1))) (large . ((font-family . roman) (font-relative-size . 1))) - (Large . ((font-series . bold) (font-shape . upright) - (font-family . roman) (font-relative-size . 2))) + (Large . ((font-series . bold) (font-family . roman) + (font-relative-size . 2))) (dynamic . ((font-family . dynamic) (font-relative-size . 0))) )) (properties-to-font . diff --git a/scm/grob-description.scm b/scm/grob-description.scm index ab3b20afbc..d12715908c 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -143,7 +143,8 @@ (molecule-callback . ,Hairpin::brew_molecule) (thickness . 1.0) (height . 0.6666) - + (spacing-procedure . ,Spanner::set_spacing_rods) + (minimum-length . 2.0) (if-text-padding . 1.0) (width-correct . -1.0) @@ -385,7 +386,7 @@ (PhrasingSlur . ( (molecule-callback . ,Slur::brew_molecule) (thickness . 1.2) - (spacing-procedure . ,Slur::set_spacing_rods) + (spacing-procedure . ,Spanner::set_spacing_rods) (minimum-length . 1.5) (after-line-breaking-callback . ,Slur::after_line_breaking) (extremity-rules . ,default-slur-extremity-rules) @@ -456,7 +457,7 @@ (Slur . ( (molecule-callback . ,Slur::brew_molecule) (thickness . 1.2) - (spacing-procedure . ,Slur::set_spacing_rods) + (spacing-procedure . ,Spanner::set_spacing_rods) (minimum-length . 1.5) (after-line-breaking-callback . ,Slur::after_line_breaking) (extremity-rules . ,default-slur-extremity-rules) @@ -620,12 +621,10 @@ (padding . 0.5) (baseline-skip . 2) (font-family . roman) - (font-shape . italic) (meta . ,(grob-description "TextScript" text-script-interface text-interface side-position-interface font-interface )) )) (TextSpanner . ( (molecule-callback . ,Text_spanner::brew_molecule) - (font-shape . italic) (font-family . roman) (type . "line") @@ -638,7 +637,7 @@ )) (Tie . ( (molecule-callback . ,Tie::brew_molecule) - (spacing-procedure . ,Tie::set_spacing_rods) + (spacing-procedure . ,Spanner::set_spacing_rods) (staffline-clearance . 0.35) (details . ((ratio . 0.333) (height-limit . 1.0))) (thickness . 1.2) -- 2.39.5