From: Han-Wen Nienhuys Date: Fri, 9 Feb 2001 14:36:06 +0000 (+0100) Subject: release: 1.3.129 X-Git-Tag: release/1.3.129 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=897b0eef69270bb4c5da4e1df9ce6765b3d8ccf8;hp=13233115f073866390b6222eda6ae1c64bbe3c87;p=lilypond.git release: 1.3.129 ============ * Small doco fixes. * Removed duplicated engraver hierarchies from coriolan and orchestral examples. * Added user control for devnull engravers. Default: switched off * Small doco fixes. 1.3.128.h --- diff --git a/CHANGES b/CHANGES index 812cec848a..d8a5c2349a 100644 --- a/CHANGES +++ b/CHANGES @@ -3,17 +3,28 @@ * Small doco fixes. -* Removed duplicated engraver hieararchies from coriolan and -orchestral examples. +* Removed duplicated engraver hierarchies from coriolan and orchestral +examples. -* Changed defaults for devNullThread, devNullVoice from 'unisolo to '(). +* Added user control for devnull engravers. Default: switched off -1.3.128.jcn1 +* Small doco fixes. + +1.3.128.hwn1 ============ -* Small doco fixes. +* Doco fixes + +* Glissando fix (Rune Zedeler) + +1.3.128.mb2 +=========== + +* Made the percussion clef somewhat fatter, thanks to Rune Zedeler. +Note: font updated! Added this clef to input/regression/clefs.ly. -* Added user control for devnull engravers. +* updated \endincipit macro and the examples input/test/incipit.ly and +input/regression/clefs.ly 1.3.127.jcn3 ============ diff --git a/DEDICATION b/DEDICATION index a6d27aeca9..a5dc993ca5 100644 --- a/DEDICATION +++ b/DEDICATION @@ -7,7 +7,7 @@ Those deserving special mentioning (in no particular order): Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, Maartje, Suzanne, -Ilse (gee, again?), Marieke, Irene, Martine and last (but +Ilse (gee, again?), Marieke, Irene, Martine, Idwine and last (but certainly not least) Janneke! HWN diff --git a/Documentation/user/fdl.itexi b/Documentation/user/fdl.itexi index 5ef0312bef..a497bbae7c 100644 --- a/Documentation/user/fdl.itexi +++ b/Documentation/user/fdl.itexi @@ -1,7 +1,5 @@ @node GNU Free Documentation License -@c @appendixsec GNU Free Documentation License -@c Hmm, only have one section in appendix: move up to chapter level @appendix GNU Free Documentation License @cindex FDL, GNU Free Documentation License diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 1072359261..dcf971b9c1 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -31,7 +31,6 @@ has been revised for LilyPond 1.3.125 @menu * Overview:: -* Music constructs:: * Modifying music:: * Repeats:: * Note entry:: @@ -41,6 +40,7 @@ has been revised for LilyPond 1.3.125 * Piano music:: * Lyrics:: * Chords:: +* Writing parts:: * Page layout:: * Sound:: * Music entry:: @@ -110,133 +110,6 @@ can enter and edit them in manageable chunks. @end itemize -@c . {Music constructs} -@node Music constructs -@section Music constructs -@cindex Music constructs -@menu -* Music expressions:: -* Sequential music:: -* Simultaneous music:: -* Compound music expressions:: -@end menu - -@c . {Music expressions} -@node Music expressions -@subsection Music expressions - -@cindex music expressions - -Music in LilyPond is entered as a music expression. Notes, rests, lyric -syllables are music expressions (the atomic expressions), and you can -combine music expressions to form new ones. This example forms a -compound expressions out of the quarter @code{c} note and a @code{d} -note: - -@example -\sequential @{ c4 d4 @} -@end example - -The meaning of this compound expression is to play the @code{c} -first, and then the @code{d} (as opposed to playing them -simultaneously, for instance). - -@c . {Sequential music} -@node Sequential music -@subsection Sequential music -@cindex Sequential music -@cindex @code{\sequential} -@cindex sequential music - -@example - \sequential @code{@{} @var{musicexprlist} @code{@}} -@end example - -This means that list should be played or written in sequence, i.e., -the second after the first, the third after the second. The duration -of sequential music is the the sum of the durations of the elements. -There is a shorthand, which leaves out the keyword: - -@example -@cindex @code{<} -@cindex @code{>} - - @code{@{} @var{musicexprlist} @code{@}} -@end example - -@c . {Simultaneous music} -@node Simultaneous music -@subsection Simultaneous music -@cindex Simultaneous music -@cindex @code{\simultaneous} - -@example - \simultaneous @code{@{} @var{musicexprlist} @code{@}} -@end example - -It constructs a music expression where all of its arguments start at -the same moment. The duration is the maximum of the durations of the -elements. The following shorthand is a common idiom: - -@example - @code{<} @var{musicexprlist} @code{>} -@end example - -If you try to use a chord as the first thing in your score, you might -get multiple staffs instead of a chord. - -@lilypond[verbatim,center] - \score { - \notes - \paper { - linewidth = -1.; - } - } -@end lilypond - -This happens because the chord is interpreted by a score context. -Each time a note is encountered a default Voice context (along with a -Staff context) is created. The solution is to explicitly instantiate -a Voice context: - -@lilypond[verbatim,center] - \score { - \notes\context Voice - \paper { - linewidth = -1.; - } - } -@end lilypond - -@c . {Compound music expressions} -@node Compound music expressions -@subsection Compound music expressions - -@cindex Compound music expressions - -Music expressions are compound data structures. You can nest music -expressions any way you like. This simple example shows how three -chords can be expressed in two different ways: - -@lilypond[fragment,verbatim,center] - \notes \context Staff { - - < { a b c' } { c' d' e' } > - } - -@end lilypond - -@cindex @code{\context} -@cindex context selection - -@example - \context @var{contexttype} [= @var{contextname}] @var{musicexpr} -@end example - -Interpret @var{musicexpr} within a context of type @var{contexttype}. -If the context does not exist, it will be created. The new context -can optionally be given a name. - @c . {Modifying music} @node Modifying music @@ -250,46 +123,8 @@ Repeated music? Repeating music expressions? @menu -* Transpose:: * Apply:: @end menu -@c . {Transpose} -@node Transpose -@subsection Transpose -@cindex Transpose -@cindex transposition of pitches -@cindex @code{\transpose} - -A music expression can be transposed with @code{\transpose}. The syntax -is -@example - \transpose @var{pitch} @var{musicexpr} -@end example - -This means that middle C in @var{musicexpr} is transposed to -@var{pitch}. - -@code{\transpose} distinguishes between enharmonic pitches: both -@code{\transpose cis'} or @code{\transpose des'} will transpose up half -a tone. The first version will print sharps and the second version -will print flats. - -@quotation -@lilypond[fragment,verbatim] -\context Staff { - \clef "F"; - { \key e \major; c d e f } - \clef "G"; - \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 -effect music that appears inside a @code{\transpose}. @c . {Apply} @node Apply @@ -458,9 +293,10 @@ command can be Print a |: bar line @item 'stop-repeat Print a :| bar line -@item (volta . #f) @item (volta . @var{text}) Print a volta bracket saying @var{text}. +@item (volta . #f) + Stop a running volta bracket @end table @lilypond[verbatim, fragment] @@ -525,7 +361,6 @@ default argument saves a lot of typing. * Durations:: * Notes:: * Rests:: -* Multi measure rests:: * Skip:: @end menu @@ -741,8 +576,6 @@ question mark `@code{?}' after the pitch. @end lilypond - - @c . {Rests} @node Rests @subsection Rests @@ -754,31 +587,6 @@ There is also a note name duration. -@c . {Multi measure rests} -@node Multi measure rests -@subsection Multi measure rests -@cindex Multi measure rests - -@cindex @code{R} - -[todo: moveme to orchestral-part section?] - -Multi measure rests are entered using `@code{R}'. It is specifically -meant for entering parts: the rest can expand to fill a score with -rests, or it can be printed as a single multimeasure rest This expansion -is controlled by the property @code{Score.skipBars}. If this is set to true, -Lily will not expand empty measures, and the appropriate number is added -automatically. - -@lilypond[fragment,verbatim] - \time 3/4; R2.*2 \property Score.skipBars = ##t R2.*17 R2.*4 -@end lilypond - -Currently, there is no way to condense multiple rests into a single -multimeasure rest. - -@cindex condensing rests - @c . {Skip} @node Skip @subsection Skip @@ -1507,7 +1315,6 @@ implemented. * Crescendo and Decrescendo:: * Bar lines:: * Breath marks:: -* Rehearsal marks:: @end menu @@ -1642,20 +1449,6 @@ You are encouraged to use @code{\repeat} for repetitions. See @subsubsection Breath marks @cindex Breath marks -@c . {Rehearsal marks} -@node Rehearsal marks -@subsubsection Rehearsal marks -@cindex Rehearsal marks -@cindex mark -@cindex @code{\mark} - -@example - \mark @var{unsigned}; -@cindex @code{Mark_engraver} - \mark @var{string}; -@end example - -Prints a mark over or under the staff. @c . {Bar check} @@ -1797,12 +1590,6 @@ can be printed automatically. This is enabled if the property @end quotation - - - - - - @c . {Lyrics} @node Lyrics @section Lyrics @@ -2384,7 +2171,105 @@ scheme = \chords { @end lilypond @end quotation +@node Writing parts +@section Writing parts + +@c . {Transpose} +@menu +* Rehearsal marks:: +* Transpose:: +* Multi measure rests:: +@end menu + +[TODO: + +partcombine + +rehearsal marks + +bar numbering + +tranposing midi property. + +] + +@c . {Rehearsal marks} +@node Rehearsal marks +@subsection Rehearsal marks +@cindex Rehearsal marks +@cindex mark +@cindex @code{\mark} + +@example + \mark @var{unsigned}; +@cindex @code{Mark_engraver} + \mark @var{string}; +@end example + +Prints a mark over or under the staff. + +[TODO: automatic increments] + +@node Transpose +@subsection Transpose +@cindex Transpose +@cindex transposition of pitches +@cindex @code{\transpose} + +A music expression can be transposed with @code{\transpose}. The syntax +is +@example + \transpose @var{pitch} @var{musicexpr} +@end example + +This means that middle C in @var{musicexpr} is transposed to +@var{pitch}. + +@code{\transpose} distinguishes between enharmonic pitches: both +@code{\transpose cis'} or @code{\transpose des'} will transpose up half +a tone. The first version will print sharps and the second version +will print flats. + +@quotation +@lilypond[fragment,verbatim] +\context Staff { + \clef "F"; + { \key e \major; c d e f } + \clef "G"; + \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 +effect music that appears inside a @code{\transpose}. + + +@c . {Multi measure rests} +@node Multi measure rests +@subsection Multi measure rests +@cindex Multi measure rests + +@cindex @code{R} + +Multi measure rests are entered using `@code{R}'. It is specifically +meant for entering parts: the rest can expand to fill a score with +rests, or it can be printed as a single multimeasure rest This expansion +is controlled by the property @code{Score.skipBars}. If this is set to true, +Lily will not expand empty measures, and the appropriate number is added +automatically. + +@lilypond[fragment,verbatim] + \time 3/4; R2.*2 \property Score.skipBars = ##t R2.*17 R2.*4 +@end lilypond +Currently, there is no way to condense multiple rests into a single +multimeasure rest. + +@cindex condensing rests @c . {Page layout} @@ -2802,11 +2687,27 @@ relative within transposed music, you must place an additional @section Engravers @cindex engravers @menu +* Selecting contexts:: * Context definitions:: * Notation Contexts:: @end menu -[rewrite this entirely] +@c . {Music expressions} +@node Selecting contexts +@subsection Selecting contexts + +@cindex @code{\context} +@cindex context selection + +@example + \context @var{contexttype} [= @var{contextname}] @var{musicexpr} +@end example + +Interpret @var{musicexpr} within a context of type @var{contexttype}. +If the context does not exist, it will be created. The new context +can optionally be given a name. + + @c . {Context definitions} @node Context definitions @@ -3144,6 +3045,7 @@ called @emph{performers}. @menu * Top level:: * Identifiers:: +* Music expressions:: * Assignments:: * Lexical details:: * Lexical modes:: @@ -3252,6 +3154,93 @@ not yet user accessible. @end itemize +@node Music expressions +@subsection Music expressions + +@cindex music expressions + +Music in LilyPond is entered as a music expression. Notes, rests, lyric +syllables are music expressions, and you can combine music expressions +to form new ones, for example by enclosing a list of expressions in +@code{\sequential @{ @}} or @code{< >}. In this example, a compound +expression is formed out of the quarter note @code{c} and a quarter note +@code{d}: + +@example +\sequential @{ c4 d4 @} +@end example + +@cindex Sequential music +@cindex @code{\sequential} +@cindex sequential music +@cindex @code{<} +@cindex @code{>} +@cindex Simultaneous music +@cindex @code{\simultaneous} + +The two basic compound music expressions are simultaneous and +sequential music. + +@example + \sequential @code{@{} @var{musicexprlist} @code{@}} + \simultaneous @code{@{} @var{musicexprlist} @code{@}} +@end example +For both, there is a shorthand: +@example + @code{@{} @var{musicexprlist} @code{@}} +@end example +for sequential and +@example + @code{<} @var{musicexprlist} @code{>} +@end example +for simultaneous music. +Other compound music expressions include +@example + \repeat @var{expr} + \transpose @var{pitch} @var{expr} + \apply @var{func} @var{expr} + \context @var{type} = @var{id} @var{expr} + \times @var{fraction} @var{expr} +@end example + +In principle, the way in which you nest sequential and simultaneous to +produce music is not relevant. In the following example, three chords +are expressed in two different ways: + +@lilypond[fragment,verbatim,center] + \notes \context Voice { + + < { a b c' } { c' d' e' } > + } +@end lilypond + +However, in some cases, LilyPond will also try to choose contexts, and +use the structure of the music expression to do so. This can have +undesired effects: for example, LilyPond will create a separate staff +for each note if you start a @code{\score} with a chord: +@lilypond[verbatim,center] + \score { + \notes + \paper { + linewidth = -1.; + } + } +@end lilypond + The solution is to explicitly instantiate the context you desire. +In this case this is typically a Voice context +@lilypond[verbatim,center] + \score { + \notes\context Voice + \paper { + linewidth = -1.; + } + } +@end lilypond +If you use @code{\context Staff} you will get separate stems for each +note head, leading to collisions, so don't use that. + + + @c . {Assignments} @node Assignments @subsection Assignments diff --git a/VERSION b/VERSION index e98ed0f9d0..c43717a28e 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=128 -MY_PATCH_LEVEL=jcn4 +PATCH_LEVEL=129 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/GNUmakefile b/input/GNUmakefile index 20cb71ba46..e49533f076 100644 --- a/input/GNUmakefile +++ b/input/GNUmakefile @@ -2,7 +2,7 @@ depth = .. -SUBDIRS=bugs features test regression tutorial +SUBDIRS=bugs tricks test regression tutorial examples=trip star-spangled-banner paddy scarlatti-test flexamples= diff --git a/input/features/GNUmakefile b/input/features/GNUmakefile deleted file mode 100644 index 558771769c..0000000000 --- a/input/features/GNUmakefile +++ /dev/null @@ -1,6 +0,0 @@ -depth = ../.. - -LOCALSTEPMAKE_TEMPLATES=mutopia -include $(depth)/make/stepmake.make - - diff --git a/input/features/beam-count.ly b/input/features/beam-count.ly deleted file mode 100644 index 89167f101e..0000000000 --- a/input/features/beam-count.ly +++ /dev/null @@ -1,20 +0,0 @@ - -fragment = \notes { - f'32 g a b b a g f - - \property Voice.autoBeamSettings - \set #'(end * * * *) = #(make-moment 1 4) - f32 g a b b a g f - - f32 g a - \property Voice.stemRightBeamCount = #1 b - \property Voice.stemLeftBeamCount = #1 b - a g f -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/beam-dir-function.ly b/input/features/beam-dir-function.ly deleted file mode 100644 index d445468a09..0000000000 --- a/input/features/beam-dir-function.ly +++ /dev/null @@ -1,40 +0,0 @@ -\header{ -texidoc=" -There are several ways to calculate the direction of a beam - -@table @samp -@item majority -number count of up or down notes -@item mean -mean centre distance of all notes -@item median -mean centre distance weighted per note -@end table - -We should see: - - up down down - - up up down -"; -} - -\score { - \notes \relative c'' { - % the default - %\property Voice.Beam \set #'dir-function = #beam-dir-majority - [d8 a] - \property Voice.Beam \set #'dir-function = #beam-dir-mean - [d a] - \property Voice.Beam \set #'dir-function = #beam-dir-median - [d a] - - \property Voice.Beam \set #'dir-function = #beam-dir-majority - \time 3/8; - [d8 a a] - \property Voice.Beam \set #'dir-function = #beam-dir-mean - [d a a] - \property Voice.Beam \set #'dir-function = #beam-dir-median - [d a a] - } -} diff --git a/input/features/beam-neutral-direction.ly b/input/features/beam-neutral-direction.ly deleted file mode 100644 index f8e156810c..0000000000 --- a/input/features/beam-neutral-direction.ly +++ /dev/null @@ -1,13 +0,0 @@ - -fragment = \notes { - [b''8 b] - \property Voice.Beam \set #'default-neutral-direction = #-1 - [b b] -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/beam-position.ly b/input/features/beam-position.ly deleted file mode 100644 index b581904761..0000000000 --- a/input/features/beam-position.ly +++ /dev/null @@ -1,13 +0,0 @@ - -fragment = \notes { - \property Voice.Beam \set #'staff-position = #2 - \property Voice.Beam \set #'height = #-2 - [c'8 c] -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/beam-rest.ly b/input/features/beam-rest.ly deleted file mode 100644 index 736a84708e..0000000000 --- a/input/features/beam-rest.ly +++ /dev/null @@ -1,17 +0,0 @@ -\header{ -texidoc=" -Beams over rests. -"; -} - -\score{ - \context Staff=one \notes\relative c''{ - r4 [r8 g a] - [bes8 r16 f g a] - [bes8 r16 \property Voice.stemLeftBeamCount = #1 f g a] - } - - \paper{ - linewidth =-1; - } -} diff --git a/input/features/beam-slope.ly b/input/features/beam-slope.ly deleted file mode 100644 index 254a5cbc89..0000000000 --- a/input/features/beam-slope.ly +++ /dev/null @@ -1,13 +0,0 @@ - -fragment = \notes { - \property Voice.Beam \set #'direction = #1 - \property Voice.Beam \set #'height-hs = #0 - [a''8 e' d c] -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/crescendo-text.ly b/input/features/crescendo-text.ly deleted file mode 100644 index b9b6edbf8a..0000000000 --- a/input/features/crescendo-text.ly +++ /dev/null @@ -1,15 +0,0 @@ - -fragment = \notes { - \context Voice { - \property Voice.crescendoText = "cresc." - \property Voice.crescendoSpanner = #'dashed-line - a''2\mf\< a a \!a - } -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/embedded-postscript.ly b/input/features/embedded-postscript.ly deleted file mode 100644 index 9667149b14..0000000000 --- a/input/features/embedded-postscript.ly +++ /dev/null @@ -1,10 +0,0 @@ -\score { - \notes \relative c'' { - a-#"\\embeddedps{3 4 moveto 5 3 rlineto stroke}" - -#"\\embeddedps{ [ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke}" - b-#"\\embeddedps{3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke}" - s2 - a'1 - } - \paper { linewidth = 70 * \staffspace; } -} diff --git a/input/features/embedded-tex.ly b/input/features/embedded-tex.ly deleted file mode 100644 index 970e2fce41..0000000000 --- a/input/features/embedded-tex.ly +++ /dev/null @@ -1,11 +0,0 @@ - -fragment = \notes { - a''^"3 $\\times$ \\`a deux" -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/follow-thread.ly b/input/features/follow-thread.ly deleted file mode 100644 index bf370780cc..0000000000 --- a/input/features/follow-thread.ly +++ /dev/null @@ -1,26 +0,0 @@ -\header{ -texidoc=" -Theads can be traced automagically when they switch staffs by setting -property @code{followThread}. -"; -} -% followThread: connect note heads with line when thread switches staff - -fragment = \notes { - \context PianoStaff < - \property PianoStaff.followThread = ##t - \context Staff \context Voice { - c'1 - \translator Staff=two - b2 a - } - \context Staff=two {\clef bass; \skip 1*2;} - > -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/fragment.ly b/input/features/fragment.ly deleted file mode 100644 index 8e37abee63..0000000000 --- a/input/features/fragment.ly +++ /dev/null @@ -1,10 +0,0 @@ -fragment = \notes { - -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/metronome.ly b/input/features/metronome.ly deleted file mode 100644 index 1b5bacfa58..0000000000 --- a/input/features/metronome.ly +++ /dev/null @@ -1,30 +0,0 @@ - -\version "1.3.117"; - -% Test scm markup text and kerning - -% Warning -% -% This is not a feature, it is a hack. If you change anything, -% it will probably break (that's because scm markup text is a -% bit broken and needs fixing). Chances are, it's already -% broken by the time you read this. Don't complain. -% -% FIXME: put in an item, and typeset by an engraver. - -#(define note '(rows (music "noteheads-2" ((kern . -0.1) "flags-stem")))) -#(define eight-note `(rows ,note ((kern . -0.1) (music ((raise . 3.5) "flags-u3"))))) -#(define dotted-eight-note `(rows ,eight-note (music "dots-dot"))) - -\score { - \notes\relative c'' { - a1^#`(rows ,dotted-eight-note " = 64") - } - \paper { - linewidth = -1.; - \translator{ - \ScoreContext - TextScript \override #'font-shape = #'upright - } - } -} diff --git a/input/features/mmrest-collision.ly b/input/features/mmrest-collision.ly deleted file mode 100644 index 255b9e6fab..0000000000 --- a/input/features/mmrest-collision.ly +++ /dev/null @@ -1,24 +0,0 @@ -\score { - \context Staff \notes < - \context Voice=i { - \property Voice.MultiMeasureRest \override #'staff-position = #3 - R1 - } - \context Voice=ii { - \property Voice.MultiMeasureRest \override #'staff-position = #-3 - R1 - } - > - \paper { - \translator { - \StaffContext - \remove Multi_measure_rest_engraver; - \remove Bar_engraver; - } - \translator { - \VoiceContext - \consists Multi_measure_rest_engraver; - \consists Bar_engraver; - } - } -} diff --git a/input/features/move-notehead.ly b/input/features/move-notehead.ly deleted file mode 100644 index 20d69836f9..0000000000 --- a/input/features/move-notehead.ly +++ /dev/null @@ -1,13 +0,0 @@ - -fragment = \notes { - \outputproperty #(make-type-checker 'note-head-interface) - #'extra-offset = #'(2 . 3) - c''2 c -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/move-specific-text.ly b/input/features/move-specific-text.ly deleted file mode 100644 index 08c909a777..0000000000 --- a/input/features/move-specific-text.ly +++ /dev/null @@ -1,12 +0,0 @@ -#(define (make-text-checker text) - (lambda (grob) (equal? text (ly-get-elt-property grob 'text)))) - -\score { - \notes\relative c''' { - \property Voice.Stem \set #'direction = #1 - \outputproperty #(make-text-checker "m.d.") - #'extra-offset = #'(-3.5 . -4.5) - a^2^"m.d." - } - \paper { linewidth = -1.; } -} diff --git a/input/features/no-bar-lines.ly b/input/features/no-bar-lines.ly deleted file mode 100644 index 6624407df6..0000000000 --- a/input/features/no-bar-lines.ly +++ /dev/null @@ -1,15 +0,0 @@ -\score { - \notes \relative c'' { - a b c d - d c b a - } - \paper { - linewidth = -1.; - \translator { - \StaffContext - whichBar = #"" - \remove "Time_signature_engraver"; - } - } -} - diff --git a/input/features/no-staff.ly b/input/features/no-staff.ly deleted file mode 100644 index 05eba6615a..0000000000 --- a/input/features/no-staff.ly +++ /dev/null @@ -1,13 +0,0 @@ -\score { - \notes { c4 c4 c8 c8 } - \paper { - linewidth = -1.; - \translator { - \StaffContext - \remove Staff_symbol_engraver; - \consists Pitch_squash_engraver; - \remove Clef_engraver; - } - } -} - diff --git a/input/features/ophee-slurs.ly b/input/features/ophee-slurs.ly deleted file mode 100644 index d32dd6c789..0000000000 --- a/input/features/ophee-slurs.ly +++ /dev/null @@ -1,18 +0,0 @@ -\header{ -texidoc=" -Slurs can be forced to always attach to note heads. -"; -} - -fragment = \notes { - \property Voice.Slur \set #'direction = #1 - \property Voice.Slur \set #'attachment = #'(head . head) - g''16()g()g()g()d'()d()d()d -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/ottava.ly b/input/features/ottava.ly deleted file mode 100644 index 513946dab5..0000000000 --- a/input/features/ottava.ly +++ /dev/null @@ -1,16 +0,0 @@ - -fragment = \notes { - a'''' b c a - \property Voice.TextSpanner \set #'type = #'dotted-line - \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5) - \property Voice.TextSpanner \set #'edge-text = #'("8va " . "") - \property Staff.centralCPosition = #-13 - a\spanrequest \start "text" b c a \spanrequest \stop "text" -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/part-combine.ly b/input/features/part-combine.ly deleted file mode 100644 index ec4262f3a8..0000000000 --- a/input/features/part-combine.ly +++ /dev/null @@ -1,37 +0,0 @@ -\header{ -texidoc=" -In orchestral scores and hymns, voices are traditionally combined onto -one staff. LilyPond has a part combiner, that combines or separates two -voices according to actual rhythm and pitch. User-defined texts such as -``solo'' and ``@`a2'' are typeset automagically, as appropriate. -"; -} - -\score{ - \context Staff = flauti < - \time 4/4; - \context Voice=one \partcombine Voice - \context Thread=one \notes\relative c'' { - c4 d e f | b,4 d c d | r2 e4 f | c4 d e f | - c4 r e f | c4 r e f | c4 r a r | a a r a | - a2 \property Voice.soloADue = ##f a | - } - \context Thread=two \notes\relative c'' { - g4 b d f | r2 c4 d | a c c d | a4. b8 c4 d - c r e r | r2 s2 | a,4 r a r | a r r a | - a2 \property Voice.soloADue = ##f a | - } - > - \paper{ - linewidth = 80 * \staffspace; - \translator{ - \ThreadContext - \consists Rest_engraver; - } - \translator{ - \VoiceContext - \remove Rest_engraver; - } - } -} - diff --git a/input/features/reverse-music.ly b/input/features/reverse-music.ly deleted file mode 100644 index 0d9fe6a522..0000000000 --- a/input/features/reverse-music.ly +++ /dev/null @@ -1,30 +0,0 @@ -\header { -texidoc=" -Simple customised music apply. -"; -} - -music = \notes { c'4 d'4( e'4 f'4 } - -#(define (reverse-music music) - (let* ((elements (ly-get-mus-property music 'elements)) - (reversed (reverse elements)) - (span-dir (ly-get-mus-property music 'span-direction))) - - (ly-set-mus-property music 'elements reversed) - - (if (dir? span-dir) - (ly-set-mus-property music 'span-direction (- span-dir))) - - (map reverse-music reversed) - - music)) - -\score { - \context Voice { - \music - \apply #reverse-music \music - } - \paper { linewidth = -1.; } -} - diff --git a/input/features/slur-attachment-override.ly b/input/features/slur-attachment-override.ly deleted file mode 100644 index 67e7435a47..0000000000 --- a/input/features/slur-attachment-override.ly +++ /dev/null @@ -1,21 +0,0 @@ -\header{ -texidoc=" -In some cases, you may want to set slur attachments by hand. -"; -} - - -fragment = \notes { - \property Voice.Stem \set #'direction = #1 - \property Voice.Slur \set #'direction = #1 - d'32( d'4 )d8.. - \property Voice.Slur \set #'attachment = #'(stem . stem) - d,32( d'4 )d8.. -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/slur-attachment.ly b/input/features/slur-attachment.ly deleted file mode 100644 index 4182bb38c6..0000000000 --- a/input/features/slur-attachment.ly +++ /dev/null @@ -1,17 +0,0 @@ - -fragment = \notes { - \property Voice.Slur \set #'direction = #1 - \property Voice.Stem \set #'length = #5.5 - g''8(g)g4 - g4(g8)g - \property Voice.Slur \set #'attachment = #'(stem . stem) - g8(g)g4 - g4(g8)g -} - -\paper { linewidth = -1.; } - -\score { - \notes\relative c \fragment - \paper { } -} diff --git a/input/features/slur-ugly.ly b/input/features/slur-ugly.ly deleted file mode 100644 index 7406ba233b..0000000000 --- a/input/features/slur-ugly.ly +++ /dev/null @@ -1,35 +0,0 @@ -\header { -texidoc="You can get ugly slurs, if you want. -"; -} - -baseWalk = \notes \relative c { - d,8( a' d f a d f d a f d )a -} - -\score { - \notes \context PianoStaff < - \time 6/4; - \context Staff=up { s1 * 6/4 } - \context Staff=down < - \clef bass; - \autochange Staff \context Voice \baseWalk - > - > - \paper { - linewidth = -1.; - \translator { - \VoiceContext - Slur \override #'beautiful = #5.0 - Slur \override #'direction = #1 - Stem \override #'direction = #-1 - autoBeamSettings \override #'(end * * * *) - = #(make-moment 1 2) - } - \translator { - \PianoStaffContext - VerticalAlignment \override #'threshold = #'(5 . 5) - } - } -} - diff --git a/input/features/smart-transpose.ly b/input/features/smart-transpose.ly deleted file mode 100644 index 697c54585e..0000000000 --- a/input/features/smart-transpose.ly +++ /dev/null @@ -1,90 +0,0 @@ -\header { -texidoc=" -@example - Here's a copy of my feature request : -@quotation - Your task, if you accept it is to implement a \smarttranspose - command> that would translate such oddities into more natural - notations. Double accidentals should be removed, as well as #E - (-> F), bC (-> B), bF (-> E), #B (-> C). -@end quotation - -You mean like this. (Sorry 'bout the nuked indentation.) -@end example -"; -} - -% Btw, I've leant an el-neato trick for formatting code in email messages, -% using inderect buffers. -% -% M-x make-indirect-buffer RET RET foo RET C-x b foo RET -% Select region and then narrow: C-x n n -% Set mode, eg: M-x sch TAB RET -% - -#(define (unhair-pitch p) - (let* ((o (pitch-octave p)) - (a (pitch-alteration p)) - (n (pitch-notename p))) - - (cond - ((and (> a 0) (or (eq? n 6) (eq? n 2))) - (set! a (- a 1)) (set! n (+ n 1))) - ((and (< a 0) (or (eq? n 0) (eq? n 3))) - (set! a (+ a 1)) (set! n (- n 1)))) - - (cond - ((eq? a 2) (set! a 0) (set! n (+ n 1))) - ((eq? a -2) (set! a 0) (set! n (- n 1)))) - - (if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7)))) - (if (> n 7) (begin (set! o (+ o 1)) (set! n (- n 7)))) - - (make-pitch o n a))) - -#(define (smart-transpose music pitch) - (let* ((es (ly-get-mus-property music 'elements)) - (e (ly-get-mus-property music 'element)) - (p (ly-get-mus-property music 'pitch)) - (body (ly-get-mus-property music 'body)) - (alts (ly-get-mus-property music 'alternatives))) - - (if (pair? es) - (ly-set-mus-property - music 'elements - (map (lambda (x) (smart-transpose x pitch)) es))) - - (if (music? alts) - (ly-set-mus-property - music 'alternatives - (smart-transpose alts pitch))) - - (if (music? body) - (ly-set-mus-property - music 'body - (smart-transpose body pitch))) - - (if (music? e) - (ly-set-mus-property - music 'element - (smart-transpose e pitch))) - - (if (pitch? p) - (begin - (set! p (unhair-pitch (Pitch::transpose p pitch))) - (ly-set-mus-property music 'pitch p))) - - music)) - - -music = \notes \relative c' { c4 d e f g a b c } - -\score { - \notes \context Staff { - \transpose ais' \music - \apply #(lambda (x) (smart-transpose x (make-pitch 0 5 1))) - \music - } - \paper { linewidth = -1.; } -} - diff --git a/input/regression/clefs.ly b/input/regression/clefs.ly index 834595b0ca..5b01e40d69 100644 --- a/input/regression/clefs.ly +++ b/input/regression/clefs.ly @@ -26,12 +26,17 @@ way, so this is fragile as well. \clef "G^8";c'1^"{sup 8?}" c'1 \bar "||"; \clef "bass";c'1^"{bass}" \bar "||"; \clef "subbass";c'1^"{subbass}" \bar "||"; - \property Staff.clefStyle="transparent" - \clef "treble"; c'1^"clefStyle=\"transparent\"" \bar "||"; - \property Staff.clefStyle="fullSizeChanges" - \clef "treble"; c'1^"clefStyle=\"fullSizeChanges\"" \bar "|."; + \property Staff.Clef \override #'transparent = ##t + \clef "treble"; c'1^"transparent=\#t" \bar "||"; + \property Staff.Clef \override #'transparent = ##f + \context Staff \outputproperty #(make-type-checker 'clef-interface) #'full-size-change = ##t + \clef "french"; c'1^"full-size-change = \#t" \bar "|."; } \paper{ + \translator{ + \StaffContext +% Clef \override #'full-size-change = ##t + } } } diff --git a/input/regression/note-line.ly b/input/regression/note-line.ly new file mode 100644 index 0000000000..dc08702697 --- /dev/null +++ b/input/regression/note-line.ly @@ -0,0 +1,29 @@ +\header { +texidoc = "Note head lines (eg glissando) +run between centers of the note heads."; +} + +\include "paper20.ly" +\include "norsk.ly" + +su = \notes{ \translator Staff = up} +sd = \notes{ \translator Staff = down} + +\score { + \context PianoStaff + \notes < + \context Staff = up { + \property PianoStaff.connectArpeggios = ##t + \showStaffSwitch + \clef F; + c4 d \sd h a g8 f16 e32 d \su g2 \glissando a,4 \sd \break a2. \su g4 \glissando f1 + } + \context Staff = down { + \clef F; s1*4 + } + > +\paper { + linewidth = 8.0 \cm; +} +} + diff --git a/input/test/coriolan-margin.ly b/input/test/coriolan-margin.ly index 7cfbd25c48..a85403af93 100644 --- a/input/test/coriolan-margin.ly +++ b/input/test/coriolan-margin.ly @@ -119,7 +119,7 @@ violoncello = \notes \relative c' { } \paper { - \paper_sixteen + \paperSixteen indent=100.0\mm; linewidth=150.0\mm; \translator { diff --git a/input/test/incipit.ly b/input/test/incipit.ly index febbe7127c..b65dcf1eb5 100644 --- a/input/test/incipit.ly +++ b/input/test/incipit.ly @@ -8,20 +8,30 @@ \version "1.3.117"; -incipit = \notes\relative c'{ - +violinincipit = \notes\relative c''{ + \clef "french"; + \time 2/2; + \property Staff.TimeSignature \override #'style = #'old + a4. b8 c4 fis | +% + \property Staff.TimeSignature \override #'style = #'C } -emptyincipit = \notes{ - s1 +bcincipit = \notes\relative c{ + \clef bass; + \property Staff.TimeSignature \override #'style = #'old + b2. cis4 | + \property Staff.TimeSignature \override #'style = #'C } violin = \notes\relative c''{ - \specialkey \keysignature f' fis'' g' gis''; +% Key signatures with different alterations in different octaves +% are broken since 1.3.58! +% \specialkey \keysignature f' fis'' g' gis''; + \key d \major; \time 2/2; - \clef "treble"; + \clef treble; - \key; a4. b8 c4 fis | gis~ gis8 fis16^\trill ()e b8 c \context Staff<{\voiceOne a d}{\voiceTwo es,4}>| } @@ -39,20 +49,19 @@ BC = \notes\relative c{ \score{ < \context Staff = violin {\notes{ - \property Staff.clefStyle = "transparent" - \incipit \bar ".|"; \endincipit + \property Staff.Clef \override #'transparent = ##t + \violinincipit \bar ".|"; + \property Staff.Clef \revert #'transparent + \endincipit \violin }} \context Staff = BC{\notes{ - \property Staff.clefStyle = "transparent" - \emptyincipit \bar ".|"; \endincipit + \property Staff.Clef \override #'transparent = ##t + \bcincipit \bar ".|"; + \property Staff.Clef \revert #'transparent + \endincipit \BC }} > - \paper{ - \translator{\StaffContext - timeSignatureStyle = "C"; - } - } } diff --git a/input/test/mark.ly b/input/test/mark.ly index 0222093bf1..948f230197 100644 --- a/input/test/mark.ly +++ b/input/test/mark.ly @@ -17,8 +17,4 @@ one = \notes \relative c { \score{ \context Staff < \global \one > - \paper { - \translator { \OrchestralPartStaffContext - } - } } diff --git a/input/tricks/GNUmakefile b/input/tricks/GNUmakefile new file mode 100644 index 0000000000..558771769c --- /dev/null +++ b/input/tricks/GNUmakefile @@ -0,0 +1,6 @@ +depth = ../.. + +LOCALSTEPMAKE_TEMPLATES=mutopia +include $(depth)/make/stepmake.make + + diff --git a/input/tricks/beam-count.ly b/input/tricks/beam-count.ly new file mode 100644 index 0000000000..89167f101e --- /dev/null +++ b/input/tricks/beam-count.ly @@ -0,0 +1,20 @@ + +fragment = \notes { + f'32 g a b b a g f + + \property Voice.autoBeamSettings + \set #'(end * * * *) = #(make-moment 1 4) + f32 g a b b a g f + + f32 g a + \property Voice.stemRightBeamCount = #1 b + \property Voice.stemLeftBeamCount = #1 b + a g f +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/beam-dir-function.ly b/input/tricks/beam-dir-function.ly new file mode 100644 index 0000000000..d445468a09 --- /dev/null +++ b/input/tricks/beam-dir-function.ly @@ -0,0 +1,40 @@ +\header{ +texidoc=" +There are several ways to calculate the direction of a beam + +@table @samp +@item majority +number count of up or down notes +@item mean +mean centre distance of all notes +@item median +mean centre distance weighted per note +@end table + +We should see: + + up down down + + up up down +"; +} + +\score { + \notes \relative c'' { + % the default + %\property Voice.Beam \set #'dir-function = #beam-dir-majority + [d8 a] + \property Voice.Beam \set #'dir-function = #beam-dir-mean + [d a] + \property Voice.Beam \set #'dir-function = #beam-dir-median + [d a] + + \property Voice.Beam \set #'dir-function = #beam-dir-majority + \time 3/8; + [d8 a a] + \property Voice.Beam \set #'dir-function = #beam-dir-mean + [d a a] + \property Voice.Beam \set #'dir-function = #beam-dir-median + [d a a] + } +} diff --git a/input/tricks/beam-neutral-direction.ly b/input/tricks/beam-neutral-direction.ly new file mode 100644 index 0000000000..f8e156810c --- /dev/null +++ b/input/tricks/beam-neutral-direction.ly @@ -0,0 +1,13 @@ + +fragment = \notes { + [b''8 b] + \property Voice.Beam \set #'default-neutral-direction = #-1 + [b b] +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/beam-position.ly b/input/tricks/beam-position.ly new file mode 100644 index 0000000000..b581904761 --- /dev/null +++ b/input/tricks/beam-position.ly @@ -0,0 +1,13 @@ + +fragment = \notes { + \property Voice.Beam \set #'staff-position = #2 + \property Voice.Beam \set #'height = #-2 + [c'8 c] +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/beam-rest.ly b/input/tricks/beam-rest.ly new file mode 100644 index 0000000000..736a84708e --- /dev/null +++ b/input/tricks/beam-rest.ly @@ -0,0 +1,17 @@ +\header{ +texidoc=" +Beams over rests. +"; +} + +\score{ + \context Staff=one \notes\relative c''{ + r4 [r8 g a] + [bes8 r16 f g a] + [bes8 r16 \property Voice.stemLeftBeamCount = #1 f g a] + } + + \paper{ + linewidth =-1; + } +} diff --git a/input/tricks/beam-slope.ly b/input/tricks/beam-slope.ly new file mode 100644 index 0000000000..254a5cbc89 --- /dev/null +++ b/input/tricks/beam-slope.ly @@ -0,0 +1,13 @@ + +fragment = \notes { + \property Voice.Beam \set #'direction = #1 + \property Voice.Beam \set #'height-hs = #0 + [a''8 e' d c] +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/crescendo-text.ly b/input/tricks/crescendo-text.ly new file mode 100644 index 0000000000..b9b6edbf8a --- /dev/null +++ b/input/tricks/crescendo-text.ly @@ -0,0 +1,15 @@ + +fragment = \notes { + \context Voice { + \property Voice.crescendoText = "cresc." + \property Voice.crescendoSpanner = #'dashed-line + a''2\mf\< a a \!a + } +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/embedded-postscript.ly b/input/tricks/embedded-postscript.ly new file mode 100644 index 0000000000..9667149b14 --- /dev/null +++ b/input/tricks/embedded-postscript.ly @@ -0,0 +1,10 @@ +\score { + \notes \relative c'' { + a-#"\\embeddedps{3 4 moveto 5 3 rlineto stroke}" + -#"\\embeddedps{ [ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke}" + b-#"\\embeddedps{3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke}" + s2 + a'1 + } + \paper { linewidth = 70 * \staffspace; } +} diff --git a/input/tricks/embedded-tex.ly b/input/tricks/embedded-tex.ly new file mode 100644 index 0000000000..970e2fce41 --- /dev/null +++ b/input/tricks/embedded-tex.ly @@ -0,0 +1,11 @@ + +fragment = \notes { + a''^"3 $\\times$ \\`a deux" +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/follow-thread.ly b/input/tricks/follow-thread.ly new file mode 100644 index 0000000000..bf370780cc --- /dev/null +++ b/input/tricks/follow-thread.ly @@ -0,0 +1,26 @@ +\header{ +texidoc=" +Theads can be traced automagically when they switch staffs by setting +property @code{followThread}. +"; +} +% followThread: connect note heads with line when thread switches staff + +fragment = \notes { + \context PianoStaff < + \property PianoStaff.followThread = ##t + \context Staff \context Voice { + c'1 + \translator Staff=two + b2 a + } + \context Staff=two {\clef bass; \skip 1*2;} + > +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/fragment.ly b/input/tricks/fragment.ly new file mode 100644 index 0000000000..8e37abee63 --- /dev/null +++ b/input/tricks/fragment.ly @@ -0,0 +1,10 @@ +fragment = \notes { + +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/metronome.ly b/input/tricks/metronome.ly new file mode 100644 index 0000000000..1b5bacfa58 --- /dev/null +++ b/input/tricks/metronome.ly @@ -0,0 +1,30 @@ + +\version "1.3.117"; + +% Test scm markup text and kerning + +% Warning +% +% This is not a feature, it is a hack. If you change anything, +% it will probably break (that's because scm markup text is a +% bit broken and needs fixing). Chances are, it's already +% broken by the time you read this. Don't complain. +% +% FIXME: put in an item, and typeset by an engraver. + +#(define note '(rows (music "noteheads-2" ((kern . -0.1) "flags-stem")))) +#(define eight-note `(rows ,note ((kern . -0.1) (music ((raise . 3.5) "flags-u3"))))) +#(define dotted-eight-note `(rows ,eight-note (music "dots-dot"))) + +\score { + \notes\relative c'' { + a1^#`(rows ,dotted-eight-note " = 64") + } + \paper { + linewidth = -1.; + \translator{ + \ScoreContext + TextScript \override #'font-shape = #'upright + } + } +} diff --git a/input/tricks/mmrest-collision.ly b/input/tricks/mmrest-collision.ly new file mode 100644 index 0000000000..255b9e6fab --- /dev/null +++ b/input/tricks/mmrest-collision.ly @@ -0,0 +1,24 @@ +\score { + \context Staff \notes < + \context Voice=i { + \property Voice.MultiMeasureRest \override #'staff-position = #3 + R1 + } + \context Voice=ii { + \property Voice.MultiMeasureRest \override #'staff-position = #-3 + R1 + } + > + \paper { + \translator { + \StaffContext + \remove Multi_measure_rest_engraver; + \remove Bar_engraver; + } + \translator { + \VoiceContext + \consists Multi_measure_rest_engraver; + \consists Bar_engraver; + } + } +} diff --git a/input/tricks/move-notehead.ly b/input/tricks/move-notehead.ly new file mode 100644 index 0000000000..20d69836f9 --- /dev/null +++ b/input/tricks/move-notehead.ly @@ -0,0 +1,13 @@ + +fragment = \notes { + \outputproperty #(make-type-checker 'note-head-interface) + #'extra-offset = #'(2 . 3) + c''2 c +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/move-specific-text.ly b/input/tricks/move-specific-text.ly new file mode 100644 index 0000000000..08c909a777 --- /dev/null +++ b/input/tricks/move-specific-text.ly @@ -0,0 +1,12 @@ +#(define (make-text-checker text) + (lambda (grob) (equal? text (ly-get-elt-property grob 'text)))) + +\score { + \notes\relative c''' { + \property Voice.Stem \set #'direction = #1 + \outputproperty #(make-text-checker "m.d.") + #'extra-offset = #'(-3.5 . -4.5) + a^2^"m.d." + } + \paper { linewidth = -1.; } +} diff --git a/input/tricks/no-bar-lines.ly b/input/tricks/no-bar-lines.ly new file mode 100644 index 0000000000..6624407df6 --- /dev/null +++ b/input/tricks/no-bar-lines.ly @@ -0,0 +1,15 @@ +\score { + \notes \relative c'' { + a b c d + d c b a + } + \paper { + linewidth = -1.; + \translator { + \StaffContext + whichBar = #"" + \remove "Time_signature_engraver"; + } + } +} + diff --git a/input/tricks/no-staff.ly b/input/tricks/no-staff.ly new file mode 100644 index 0000000000..05eba6615a --- /dev/null +++ b/input/tricks/no-staff.ly @@ -0,0 +1,13 @@ +\score { + \notes { c4 c4 c8 c8 } + \paper { + linewidth = -1.; + \translator { + \StaffContext + \remove Staff_symbol_engraver; + \consists Pitch_squash_engraver; + \remove Clef_engraver; + } + } +} + diff --git a/input/tricks/ophee-slurs.ly b/input/tricks/ophee-slurs.ly new file mode 100644 index 0000000000..d32dd6c789 --- /dev/null +++ b/input/tricks/ophee-slurs.ly @@ -0,0 +1,18 @@ +\header{ +texidoc=" +Slurs can be forced to always attach to note heads. +"; +} + +fragment = \notes { + \property Voice.Slur \set #'direction = #1 + \property Voice.Slur \set #'attachment = #'(head . head) + g''16()g()g()g()d'()d()d()d +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/ottava.ly b/input/tricks/ottava.ly new file mode 100644 index 0000000000..513946dab5 --- /dev/null +++ b/input/tricks/ottava.ly @@ -0,0 +1,16 @@ + +fragment = \notes { + a'''' b c a + \property Voice.TextSpanner \set #'type = #'dotted-line + \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5) + \property Voice.TextSpanner \set #'edge-text = #'("8va " . "") + \property Staff.centralCPosition = #-13 + a\spanrequest \start "text" b c a \spanrequest \stop "text" +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/part-combine.ly b/input/tricks/part-combine.ly new file mode 100644 index 0000000000..ec4262f3a8 --- /dev/null +++ b/input/tricks/part-combine.ly @@ -0,0 +1,37 @@ +\header{ +texidoc=" +In orchestral scores and hymns, voices are traditionally combined onto +one staff. LilyPond has a part combiner, that combines or separates two +voices according to actual rhythm and pitch. User-defined texts such as +``solo'' and ``@`a2'' are typeset automagically, as appropriate. +"; +} + +\score{ + \context Staff = flauti < + \time 4/4; + \context Voice=one \partcombine Voice + \context Thread=one \notes\relative c'' { + c4 d e f | b,4 d c d | r2 e4 f | c4 d e f | + c4 r e f | c4 r e f | c4 r a r | a a r a | + a2 \property Voice.soloADue = ##f a | + } + \context Thread=two \notes\relative c'' { + g4 b d f | r2 c4 d | a c c d | a4. b8 c4 d + c r e r | r2 s2 | a,4 r a r | a r r a | + a2 \property Voice.soloADue = ##f a | + } + > + \paper{ + linewidth = 80 * \staffspace; + \translator{ + \ThreadContext + \consists Rest_engraver; + } + \translator{ + \VoiceContext + \remove Rest_engraver; + } + } +} + diff --git a/input/tricks/reverse-music.ly b/input/tricks/reverse-music.ly new file mode 100644 index 0000000000..0d9fe6a522 --- /dev/null +++ b/input/tricks/reverse-music.ly @@ -0,0 +1,30 @@ +\header { +texidoc=" +Simple customised music apply. +"; +} + +music = \notes { c'4 d'4( e'4 f'4 } + +#(define (reverse-music music) + (let* ((elements (ly-get-mus-property music 'elements)) + (reversed (reverse elements)) + (span-dir (ly-get-mus-property music 'span-direction))) + + (ly-set-mus-property music 'elements reversed) + + (if (dir? span-dir) + (ly-set-mus-property music 'span-direction (- span-dir))) + + (map reverse-music reversed) + + music)) + +\score { + \context Voice { + \music + \apply #reverse-music \music + } + \paper { linewidth = -1.; } +} + diff --git a/input/tricks/slur-attachment-override.ly b/input/tricks/slur-attachment-override.ly new file mode 100644 index 0000000000..67e7435a47 --- /dev/null +++ b/input/tricks/slur-attachment-override.ly @@ -0,0 +1,21 @@ +\header{ +texidoc=" +In some cases, you may want to set slur attachments by hand. +"; +} + + +fragment = \notes { + \property Voice.Stem \set #'direction = #1 + \property Voice.Slur \set #'direction = #1 + d'32( d'4 )d8.. + \property Voice.Slur \set #'attachment = #'(stem . stem) + d,32( d'4 )d8.. +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/slur-attachment.ly b/input/tricks/slur-attachment.ly new file mode 100644 index 0000000000..4182bb38c6 --- /dev/null +++ b/input/tricks/slur-attachment.ly @@ -0,0 +1,17 @@ + +fragment = \notes { + \property Voice.Slur \set #'direction = #1 + \property Voice.Stem \set #'length = #5.5 + g''8(g)g4 + g4(g8)g + \property Voice.Slur \set #'attachment = #'(stem . stem) + g8(g)g4 + g4(g8)g +} + +\paper { linewidth = -1.; } + +\score { + \notes\relative c \fragment + \paper { } +} diff --git a/input/tricks/slur-ugly.ly b/input/tricks/slur-ugly.ly new file mode 100644 index 0000000000..7406ba233b --- /dev/null +++ b/input/tricks/slur-ugly.ly @@ -0,0 +1,35 @@ +\header { +texidoc="You can get ugly slurs, if you want. +"; +} + +baseWalk = \notes \relative c { + d,8( a' d f a d f d a f d )a +} + +\score { + \notes \context PianoStaff < + \time 6/4; + \context Staff=up { s1 * 6/4 } + \context Staff=down < + \clef bass; + \autochange Staff \context Voice \baseWalk + > + > + \paper { + linewidth = -1.; + \translator { + \VoiceContext + Slur \override #'beautiful = #5.0 + Slur \override #'direction = #1 + Stem \override #'direction = #-1 + autoBeamSettings \override #'(end * * * *) + = #(make-moment 1 2) + } + \translator { + \PianoStaffContext + VerticalAlignment \override #'threshold = #'(5 . 5) + } + } +} + diff --git a/input/tricks/smart-transpose.ly b/input/tricks/smart-transpose.ly new file mode 100644 index 0000000000..697c54585e --- /dev/null +++ b/input/tricks/smart-transpose.ly @@ -0,0 +1,90 @@ +\header { +texidoc=" +@example + Here's a copy of my feature request : +@quotation + Your task, if you accept it is to implement a \smarttranspose + command> that would translate such oddities into more natural + notations. Double accidentals should be removed, as well as #E + (-> F), bC (-> B), bF (-> E), #B (-> C). +@end quotation + +You mean like this. (Sorry 'bout the nuked indentation.) +@end example +"; +} + +% Btw, I've leant an el-neato trick for formatting code in email messages, +% using inderect buffers. +% +% M-x make-indirect-buffer RET RET foo RET C-x b foo RET +% Select region and then narrow: C-x n n +% Set mode, eg: M-x sch TAB RET +% + +#(define (unhair-pitch p) + (let* ((o (pitch-octave p)) + (a (pitch-alteration p)) + (n (pitch-notename p))) + + (cond + ((and (> a 0) (or (eq? n 6) (eq? n 2))) + (set! a (- a 1)) (set! n (+ n 1))) + ((and (< a 0) (or (eq? n 0) (eq? n 3))) + (set! a (+ a 1)) (set! n (- n 1)))) + + (cond + ((eq? a 2) (set! a 0) (set! n (+ n 1))) + ((eq? a -2) (set! a 0) (set! n (- n 1)))) + + (if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7)))) + (if (> n 7) (begin (set! o (+ o 1)) (set! n (- n 7)))) + + (make-pitch o n a))) + +#(define (smart-transpose music pitch) + (let* ((es (ly-get-mus-property music 'elements)) + (e (ly-get-mus-property music 'element)) + (p (ly-get-mus-property music 'pitch)) + (body (ly-get-mus-property music 'body)) + (alts (ly-get-mus-property music 'alternatives))) + + (if (pair? es) + (ly-set-mus-property + music 'elements + (map (lambda (x) (smart-transpose x pitch)) es))) + + (if (music? alts) + (ly-set-mus-property + music 'alternatives + (smart-transpose alts pitch))) + + (if (music? body) + (ly-set-mus-property + music 'body + (smart-transpose body pitch))) + + (if (music? e) + (ly-set-mus-property + music 'element + (smart-transpose e pitch))) + + (if (pitch? p) + (begin + (set! p (unhair-pitch (Pitch::transpose p pitch))) + (ly-set-mus-property music 'pitch p))) + + music)) + + +music = \notes \relative c' { c4 d e f g a b c } + +\score { + \notes \context Staff { + \transpose ais' \music + \apply #(lambda (x) (smart-transpose x (make-pitch 0 5 1))) + \music + } + \paper { linewidth = -1.; } +} + diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 158a43edd3..ef3576f881 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -315,7 +315,6 @@ Dynamic_engraver::typeset_all () if (script_p_) { - Side_position::add_staff_support (script_p_); typeset_grob (script_p_); script_p_ = 0; } diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc index 38fa223dc0..051d91d16b 100644 --- a/lily/line-spanner.cc +++ b/lily/line-spanner.cc @@ -14,6 +14,8 @@ #include "paper-column.hh" #include "staff-symbol-referencer.hh" +#include + SCM Line_spanner::line_atom (Grob* me, Real dx, Real dy) { @@ -148,10 +150,13 @@ Line_spanner::brew_molecule (SCM smob) } Real gap = gh_scm2double (me->get_grob_property ("gap")); - + Real dist; /*distance between points */ + + Offset ofxy (gap, 0); /*offset from start point to start of line*/ Offset dxy ; Offset my_off; Offset his_off; + if (bound[LEFT]->break_status_dir () || bound[RIGHT]->break_status_dir ()) /* across line break */ @@ -178,11 +183,15 @@ Line_spanner::brew_molecule (SCM smob) } else { - dxy[X_AXIS] = bound[RIGHT]->extent (common[X_AXIS], X_AXIS)[LEFT] - - bound[LEFT]->extent (common[X_AXIS], X_AXIS)[RIGHT]; + Real off = gap + ((bound[LEFT]->extent (bound[LEFT], X_AXIS).length ()*3)/4); // distance from center to start of line + dxy[X_AXIS] = bound[RIGHT]->extent (common[X_AXIS], X_AXIS).center () + - bound[LEFT]->extent (common[X_AXIS], X_AXIS).center (); dxy[Y_AXIS] = bound[RIGHT]->extent (common[Y_AXIS], Y_AXIS).center () - bound[LEFT]->extent (common[Y_AXIS], Y_AXIS).center (); - dxy[X_AXIS] -= 2 * gap; + + dist = sqrt(dxy[X_AXIS]*dxy[X_AXIS]+dxy[Y_AXIS]*dxy[Y_AXIS]); + ofxy = dxy*(off/dist); + dxy -= 2*ofxy; my_off = Offset (me->relative_coordinate (common[X_AXIS], X_AXIS), me->relative_coordinate (common[Y_AXIS], Y_AXIS)); @@ -202,10 +211,10 @@ Line_spanner::brew_molecule (SCM smob) Box b (Interval (0, dxy[X_AXIS]), Interval (0, dxy[Y_AXIS])); line = Molecule (b, list); - line.translate_axis (bound[LEFT]->extent (bound[LEFT], X_AXIS).length (), X_AXIS); + line.translate_axis (bound[LEFT]->extent (bound[LEFT], X_AXIS).length ()/2, X_AXIS); - Offset g (gap, 0); - line.translate (g - my_off + his_off); + //Offset g (gap, 0); + line.translate (ofxy - my_off + his_off); return line.smobbed_copy (); } diff --git a/lily/thread-devnull-engraver.cc b/lily/thread-devnull-engraver.cc index 8a99b90bdb..83c1f2a36f 100644 --- a/lily/thread-devnull-engraver.cc +++ b/lily/thread-devnull-engraver.cc @@ -38,5 +38,5 @@ Thread_devnull_engraver::acknowledge_grob (Grob_info i) && (to_boolean (get_property ("unison")) || to_boolean (get_property ("unisilence"))) && to_boolean (get_property ("soloADue")))) - i.elem_l_->suicide (); + i.elem_l_->suicide (); } diff --git a/lily/voice-devnull-engraver.cc b/lily/voice-devnull-engraver.cc index 47d40f5838..b3414f531d 100644 --- a/lily/voice-devnull-engraver.cc +++ b/lily/voice-devnull-engraver.cc @@ -42,8 +42,8 @@ Voice_devnull_engraver::try_music (Music *m) return; #endif - if (s == ly_symbol2scm ("allways") - || (s == SCM_EOL + if (gh_equal_p (s, ly_symbol2scm ("allways")) + || (s == SCM_EOL && daddy_trans_l_->id_str_.left_str (3) == "two" && (to_boolean (get_property ("unison")) || to_boolean (get_property ("unisilence"))))) @@ -52,7 +52,8 @@ Voice_devnull_engraver::try_music (Music *m) { if (Span_req *s = dynamic_cast (m)) { - if (s->get_mus_property ("span-type") == ly_symbol2scm (*p)) + if (scm_equal_p (s->get_mus_property ("span-type"), + ly_str02scm ( *p)) == SCM_BOOL_T) { return true; } @@ -90,12 +91,11 @@ Voice_devnull_engraver::acknowledge_grob (Grob_info i) && daddy_trans_l_->id_str_.left_str (3) == "two" && (to_boolean (get_property ("unison")) || to_boolean (get_property ("unisilence"))))) - - for (char const **p = junk_interfaces; *p; p++) - if (i.elem_l_->has_interface (ly_symbol2scm (*p))) - { - i.elem_l_->suicide (); - return; - } + for (char const **p = junk_interfaces; *p; p++) + if (i.elem_l_->has_interface (ly_symbol2scm (*p))) + { + i.elem_l_->suicide (); + return; + } } diff --git a/ly/property.ly b/ly/property.ly index 028933e231..d73cf04da2 100644 --- a/ly/property.ly +++ b/ly/property.ly @@ -75,7 +75,8 @@ specialkey = { % End the incipit and print a ``normal line start''. endincipit = \notes{ \partial 16; s16 % Hack to handle e.g. \bar ".|"; \endincipit - \property Staff.clefStyle = #"fullSizeChanges" + \context Staff \outputproperty #(make-type-checker 'clef-interface) #'full-size-change = ##t + \context Staff \outputproperty #(make-type-checker 'clef-interface) #'non-default = ##t \bar ""; } diff --git a/make/ly-rules.make b/make/ly-rules.make index be65503ea0..9b997bf350 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -5,21 +5,21 @@ $(outdir)/%.latex: %.doc rm -f $@ - LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I $(pwd) -I $(input-dir)/features/ -I $(input-dir)/regression/ -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ $< + LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I $(pwd) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ $< chmod -w $@ # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir. # it is not, for --scrdir builds $(outdir)/%.texi: %.tely rm -f $@ - LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I $(pwd) -I $(input-dir)/features/ -I $(input-dir)/regression/ -I $(input-dir)/test/ --dependencies --format=texi $< + LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I $(pwd) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ --dependencies --format=texi $< chmod -w $@ # nexi: no-lily texi # for plain info doco: don't run lily $(outdir)/%.nexi: %.tely rm -f $@ - LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) --no-lily -I $(pwd) -I $(input-dir)/features/ -I $(input-dir)/regression/ -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $< + LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) --no-lily -I $(pwd) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $< mv $(@D)/$(*F).texi $@ chmod -w $@ diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 77eb380812..e553ba61ee 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.128 -Entered-date: 05FEB01 +Version: 1.3.129 +Entered-date: 09FEB01 Description: Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.3.128.tar.gz + 1000k lilypond-1.3.129.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.128.tar.gz + 1000k lilypond-1.3.129.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index 3f5d684297..0f599fd7ae 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,11 +1,11 @@ %define info yes Name: lilypond -Version: 1.3.128 +Version: 1.3.129 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.128.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.129.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # Icon: lilypond-icon.gif diff --git a/mf/feta-klef.mf b/mf/feta-klef.mf index 44eee6ca8d..c1e3235257 100644 --- a/mf/feta-klef.mf +++ b/mf/feta-klef.mf @@ -1054,8 +1054,8 @@ def draw_percussion_clef(expr reduction) = save reduced_il; reduced_il# = staff_space# * reduction; define_pixels(reduced_il); - set_char_box(0,.6reduced_il#,reduced_il#,reduced_il#); - pickup pencircle scaled 1.5 stafflinethickness; + set_char_box(.5reduced_il#,1.25reduced_il#,reduced_il#,reduced_il#); + pickup pencircle scaled 3.33 stafflinethickness; draw (b,h) -- (b,-d); draw (w,h) -- (w,-d); enddef; diff --git a/mutopia/Coriolan/c-midi.ly b/mutopia/Coriolan/c-midi.ly deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/mutopia/Coriolan/coriolan-part-combine-paper.ly b/mutopia/Coriolan/coriolan-part-combine-paper.ly deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 79e68d3641..df810a0048 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -178,8 +178,7 @@ )) (DynamicLineSpanner . ( - (axes . (1)) - (direction . -1) + (axes . ( 1)) (padding . 0.6) (minimum-space . 1.2) (meta . ,(grob-description "DynamicLineSpanner" dynamic-interface axis-group-interface side-position-interface))