+1.3.142.hwn2
+============
+
+* Glossary bugfixes for lilypond code.
+
+* Bugfix: don't crash if dy or y not set.
+
+* Doco updates: moved contents of tricks chapter to input/tricks,
+inserted lilypond-book tutorial, added polyphony section.
+
+* Score.skipTypesetting skips over already or not yet corrected music, thus
+speeding up running times and score debugging. (Includes bugfix relative to
+patch submitted to list.)
+
1.3.142.jcn1
============
* Bugfix: patch in $(outdir)
+
1.3.142
=======
-1.3.141.jcn3
-============
-
* some mup2ly progress.
* Bugfix: ly2dvi: don't include empty set fo latexheaders, don't use
@section Website
The website is the most convenient form to use for reading the
-documentation on-line documentation. It is made by entering @example
+documentation on-line documentation. It is made by entering
- make htmldoc
+@example
+
+ make web-doc
@end example
-This does require a functioning LilyPond. The binary doesn't have to
-be installed.
+This does require a functioning LilyPond. The executable doesn't have
+to be installed, though.
If you want to auto-generate Lily's website, you'll need some additional
conversion tools.
@
@lilypond[13pt,eps]
-\context GrandStaff <
- \notes\relative c'' {
+ \notes \context PianoStaff <
+ \context Staff = SA \relative c'' {
\time 4/4;
\clef treble;
r8 g16 c e g, c e r8 g,16 c e g, c e |
r8 a,16 d f a, d f r8 a,16 d f a, d f \bar "||"; }
- \notes\relative c' {
+ \context Staff = SB \relative c' {
\clef bass;
< \context Voice = va {
\stemUp
for connecting piano staves, angular brackets for connecting parts in an
orchestral or choral score.
-@
-
-@lilypond[13pt,eps]
-\context GrandStaff <
- \property GrandStaff.minVerticalAlign = 12
- \notes\relative c'' { \clef treble; g4 e c2 }
- \notes\relative c { \clef bass; c1 \bar "|."; } >
+@lilypond[13pt,eps]
+\notes\context GrandStaff <
+ \relative c''\context Staff = SA { \clef treble; g4 e c2 }
+ \relative c \context Staff = SB { \clef bass; c1 \bar "|."; } >
@end lilypond
-@
-
@lilypond[13pt,eps]
-%\context StaffGroup <
-\context ChoirStaff <
- \property StaffGroup.minVerticalAlign = 12
- \notes\relative c'' { \clef treble; g4 e c2 }
- \notes\relative c { \clef bass; c1 \bar "|."; } >
+\context StaffGroup <
+% \property StaffGroup.minVerticalAlign = 12
+ \notes\relative c'' \context Staff = SA { \clef treble; g4 e c2 }
+ \notes\relative c \context Staff = SB { \clef bass; c1 \bar "|."; } >
@end lilypond
@item brass
@lilypond[13pt,eps]
\property Score.barNonAuto = ##t
-\property Staff.clefStyle = #"fullSizeChanges"
-\property Staff.textStyle = #"large"
-\property Lyrics.textStyle = #"large"
+\property Score.Clef \override #'full-size-change = ##t
+\property Score.LyricText \set #'font-style = #'large
\addlyrics
-\notes\relative c' {
- \clef soprano; c1 s s
- \clef mezzosoprano; c s s
- \clef alto; c s s
- \clef tenor; c s s
- \clef baritone; c s
+\context Staff \notes\relative c' {
+ \clef soprano; c1
+ \clef mezzosoprano; c
+ \clef alto; c
+ \clef tenor; c
+ \clef baritone; c
}
\context Lyrics \lyrics {
Soprano Mezzosoprano Alto Tenor Baritone
@lilypond[13pt,eps]
\property Score.TimeSignature \override #'style = #'C2/2
-\context GrandStaff <
- \notes\relative c' {
+\notes\context PianoStaff <
+ \context Staff = SA \relative c' {
\key bes \major;
\time 4/4;
\clef treble;
}
>
}
- \notes\relative c' {
+ \context Staff = SB \relative c' {
\clef bass;
\key bes \major;
< \context Voice = lha {
@
@lilypond[13pt,eps]
-\key g \major; \time 4/4;
-\notes\relative c'' { d4 \> c b a | \! g1 \bar "|."; }
+\context Staff \notes\relative c'' {\key g \major; \time 4/4;
+ d4 \> c b a | \! g1 \bar "|."; }
@end lilypond
@item descending interval
\addlyrics
\notes\relative c' {
c1 d
- \property Voice.textScriptPadding = #-10
+ \property Voice.TextScript \set #'padding = #-10
e^"~~ S" f g a
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
b^"~~ S" c }
\context Lyrics \lyrics { Ionian }
@end lilypond
\addlyrics
\notes\relative c' {
d1
- \property Voice.textScriptPadding = #-10
+ \property Voice.TextScript \set #'padding = #-10
e^"~~ S"
f g a
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
b^"~~ S" c d }
\context Lyrics \lyrics { Dorian }
@end lilypond
\property Voice.TextScript \set #'font-style = #'large
\addlyrics
\notes\relative c' {
- \property Voice.textScriptPadding = #-10
+ \property Voice.TextScript \set #'padding = #-10
e1^"~~ S"
f g a
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
b^"~~ S" c d e }
\context Lyrics \lyrics { Phrygian }
@end lilypond
\addlyrics
\notes\relative c' {
f1 g a
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
b^"~~ S" c d
- \property Voice.textScriptPadding = #0
+ \property Voice.TextScript \set #'padding = #0
e^"~~ S" f }
\context Lyrics \lyrics { Lydian }
@end lilypond
\addlyrics
\notes\relative c'' {
g1 a
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
b^"~~ S" c d
- \property Voice.textScriptPadding = #0
+ \property Voice.TextScript \set #'padding = #0
e^"~~ S" f g }
\context Lyrics \lyrics { Mixolydian }
@end lilypond
\addlyrics
\notes\relative c'' {
a1
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
b^"~~ S" c d
- \property Voice.textScriptPadding = #0
+ \property Voice.TextScript \set #'padding = #0
e^"~~ S" f g a }
\context Lyrics \lyrics { Aeolian }
@end lilypond
\addlyrics
\notes\relative c' {
c1 d
- \property Voice.textScriptPadding = #-10
+ \property Voice.TextScript \set #'padding = #-10
e^"~~ S" f g a
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
b^"~~ S" c }
\context Lyrics \lyrics { Major }
@end lilypond
\addlyrics
\notes\relative c'' {
a1
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
b^"~~ S" c d
- \property Voice.textScriptPadding = #0
+ \property Voice.TextScript \set #'padding = #0
e^"~~ S" f g a }
\context Lyrics \lyrics { "ancient minor" }
@end lilypond
\addlyrics
\notes\relative c'' {
a1
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
b^"~~ S" c d
- \property Voice.textScriptPadding = #0
+ \property Voice.TextScript \set #'padding = #0
e^"~~ S"
- \property Voice.textScriptPadding = #1
+ \property Voice.TextScript \set #'padding = #1
f!^"~~ A"
gis^"~~ S"
a }
\addlyrics
\notes\relative c'' {
a1
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
b^"~~ S" c d e fis
- \property Voice.textScriptPadding = #0
+ \property Voice.TextScript \set #'padding = #0
gis^"~~ S" a g!
- \property Voice.textScriptPadding = #-1
+ \property Voice.TextScript \set #'padding = #-1
f!^"~~ S" e d
- \property Voice.textScriptPadding = #-4
+ \property Voice.TextScript \set #'padding = #-4
c^"~~ S" b a
}
\context Lyrics \lyrics { "Melodic minor" }
@lilypond[13pt,eps]
\property Score.barNonAuto = ##t
-\property Staff.clefStyle = #"fullSizeChanges"
+\property Staff.Clef \override #'full-size-change = ##t
\property Lyrics.LyricText \set #'font-style = #'large
\addlyrics
\notes\relative c {
% \clef "F3";
\clef varbaritone;
- f1 s
-% \clef "F4";
+ f1
\clef bass;
- f1 s
-% \clef "F5";
+ f1
\clef subbass;
- f1 s
+ f1
\clef "F^8";
- f'1 s s
+ f1
\clef "F_8";
- f,,1 s s
+ f1
}
\context Lyrics \lyrics {
baritone
@lilypond[13pt,eps]
\property Score.barNonAuto = ##t
-\property Staff.clefStyle = #"fullSizeChanges"
+\property Staff.Clef \set #'full-size-change = ##t
\property Lyrics.LyricText \set #'font-style = #'large
\addlyrics
\notes\relative c'' {
\clef french;
- g1 s s s s
+ g1
\clef treble;
- g s s s
+ g
\clef "G^8";
- g' s s s
+ g
\clef "G_8";
- g,, s s
+ g
}
\context Lyrics \lyrics {
"french violin clef"
@
@lilypond[13pt,eps]
-\context GrandStaff <
- \notes\relative c'' {
+\notes\context PianoStaff <
+ \context Staff = SA \relative c'' {
\time 4/4;
\clef treble;
\partial 4; < c4 g e > | < c a f > < b g d > < c2 g e > }
\property Lyrics.LyricText \set #'font-style = #'large
\addlyrics
- \notes\relative c {
+ \context Staff = SB \relative c {
\clef bass;
\partial 4; c4 | f, g c2
\bar "|."; }
@lilypond[13pt,eps]
\property Score.barNonAuto = ##t
-\property Lyrics.LyricText \set #'font-style = #'large
-\property Voice.TextScript \set #'font-style = #'large
+\property Score.LyricText \set #'font-style = #'large
+\property Score.TextScript \set #'font-style = #'large
\addlyrics
-\notes\relative c'' {
+\context Staff \notes\relative c'' {
< g1 g > s
< g^"minor" as > s
< g^"major" a! > s
@lilypond[13pt,eps]
\property Score.barNonAuto = ##t
-\property Lyrics.LyricText \set #'font-style = #'large
-\property Voice.TextScript \set #'font-style = #'large
+\property Score.LyricText \set #'font-style = #'large
+\property Score.TextScript \set #'font-style = #'large
\addlyrics
-\notes\relative c'' {
+\context Staff \notes\relative c'' {
< g1^"perfect" c > s
< g^"augm" cis > s
< g^"perfect" d' > s
@lilypond[13pt,eps]
\property Score.barNonAuto = ##t
-\property Lyrics.LyricText \set #'font-style = #'large
-\property Voice.TextScript \set #'font-style = #'large
+\property Score.LyricText \set #'font-style = #'large
+\property Score.TextScript \set #'font-style = #'large
\addlyrics
-\notes\relative c'' {
+\context Staff \notes\relative c'' {
< gis1^"dimin" f'! > s
< g!^"minor" f'! > s
< g^"major" fis' > s
@lilypond[13pt,eps]
\property Score.barNonAuto = ##t
-\property Voice.TextScript \set #'font-style = #'large
-\notes\relative c'' {
+\property Score.TextScript \set #'font-style = #'large
+\context Staff \notes\relative c'' {
< g1_"second" a > s < g'_"seventh" a, > s \bar "||";
< g,_"third" b > s < g'_"sixth" b, > s \bar "||";
< g,_"fourth" c > s < g'_"fifth" c, > s \bar "||";
@lilypond[13pt,eps]
\property Score.barNonAuto = ##t
\notes\relative c'' {
- \property Voice.noteHeadStyle = #'mensural
+ \property Voice.NoteHead \set #'style = #'mensural
g\longa
}
@end lilypond
@lilypond[13pt,eps]
\property Score.barNonAuto = ##t
-\property Staff.clefStyle = #"fullSizeChanges"
+\property Staff.Clef \set #'full-size-change = ##t
\notes\relative c' {
\clef bass; c1 s
\clef alto; c s
\property Voice.TextScript \set #'font-style = #'large
\property Score.barNonAuto = ##t
\notes\relative c'' {
- \property Voice.noteHeadStyle = #'mensural
+ \property Voice.NoteHead \override #'style = #'mensural
g\longa_"longa" g\breve_"breve"
- \property Voice.noteHeadStyle = ##f
+ \property Voice.NoteHead \revert #'style
g1_"1/1" g2_"1/2" g4_"1/4" s16 g8_"1/8" s16
g16_"1/16" s16 g32_"1/32" s16 g64_"1/64" s32 }
@end lilypond
\emptyText
\property Score.barNonAuto = ##t
\property Lyrics.LyricText \set #'font-style = #'large
-\property Lyrics.minVerticalAlign = 8
+%\property Lyrics.minVerticalAlign = 8
\addlyrics
\notes\relative c' {
c1 d e f g a b c }
@node lilypond-book
@chapter lilypond-book
-[ The tutorial part is at the moment commented out and moved to
-the end of this document ]
-
[TODO: THIS MANUAL IS NOT FINISHED YET. FIXME.]
@command{lilypond-book} is a script that helps integrating lilypond with
overwritten.
If you use @code{--outdir}, you should also @code{cd} to that directory
-before running LaTeX or makeinfo.
-
-@strong{[UGH: IS THIS THE BEST WAY TO DO IT? MAYBE ADD A COMMENT LINE TO THE
-GENERATED FILE, SO LILYPOND-BOOK CAN TEST IF THE FILE IT IS TO OVERWRITE
-IS GENERATED.]}
+before running LaTeX or makeinfo. This may seem a little kludgy, but
+both Latex and makeinfo expect picture files (the music) to be in the
+current working directory. Moreover, if you do this, LaTeX will not
+clutter you normal working directory with output files.
@strong{About the input}
@email{tca@@gnu.org, Tom Cato Amundsen}
-
-
-@ignore
-
-So what does this look like? Well, here is an example:
-@lilypond[veryverbatim, intertext="produces this music:"]
-\score{
- \notes\relative c'{
- \time 5/8;
- [e16( g b c a g][e a b d] | )e2 d,8 |
- [e16( g b c a g][e a b d] | )b2 [a16( f] |
- [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] |
- [f( a b d b a][f a b d] | )e2
- }
-}
-@end lilypond
-If you are lucky, the above example show a nice feature of LilyPond
-and La@TeX{}. Since LilyPond can output the music as @TeX{} graphics,
-La@TeX{} can insert pagebreaks between the lines of music.
-
-Notice that there is no @code{\paper} statement in the example
-above. Lilypond-book will insert some code for you that defines the
-linewidth and the font to use. If you don't want to change the default,
-there is no need to put an empty @code{\paper@{@}} inside the @code{\score}.
-In the example above, something like
-this might be inserted before your code:
-@example
-\include "paper16.ly"
-\paper@{ \paper_sixteen
- linewidth = 390.\pt;
- castingalgorithm = \Gourlay;
-@}
-@end example
-The actual values for linewidth will differ depending on papersize and
-number of columns. Also, if you use a different fontsize for the
-music, another file than @code{paper16.ly} will be included.
-
-If you want to make the music not so wide, you can insert a
-@code{\paper} statement that set the linewidth:
-
-@lilypond[veryverbatim, intertext="produces this music:"]
-\score{
- \notes\relative c'{
- \time 5/8;
- [e16( g b c a g][e a b d] | )e2 d,8 |
- [e16( g b c a g][e a b d] | )b2 [a16( f] |
- [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] |
- [f( a b d b a][f a b d] | )e2
- }
- \paper{linewidth = 10.\cm;}
-}
-@end lilypond
-
-Very often, if you mix music and text, the music is often only a
-few notes or at most a few bars. This music should be as short as
-possible and not stretched to be aligned to the right margin.
-
-If you only write voice-contents in the lilypond block, @command{lilypond-book}
-will set the @code{linewidth} variable to -1, so Lilypond
-will make the music as short as possible but without breaking the
-line. Here is a well know harmonic progression:
-@lilypond[veryverbatim, intertext="produce a well known harmonic progression:"]
- \context Voice { <c' e g> <b d g> <c2 e g> }
-@end lilypond
-
-If you want to place music examples in the text,
-@lilypond[eps]
-\context Voice { <c' e g> <b d g> <c2 e g>}
-@end lilypond
-, you can use the @code{eps} option. This will create the music as
-eps graphics and include it into the document with the
-@code{\includegraphics} command.
-
-The code used look like this:
-@example
-@@lilypond[eps]
- \context Voice { <c' e g> <b d g> <c2 e g> }
-@@end lilypond
-@end example
-
-You can also use the @code{eps} option if the block is a complete
-lilypond source. This 5 cm long empty line,
-@lilypond[eps]
-\score{
- \notes{s}
- \paper{ linewidth = 5.\cm;}
-}
-@end lilypond
-was created with this code:
-@example
-@@lilypond[eps]
-\score@{
- \notes@{s@}
- \paper@{ linewidth = 5.\cm;@}
-@}
-@@end lilypond
-@end example
-
-To avoid that La@TeX{} places the music on a line of its one, there should
-be no empty lines between the normal text and the lilypond
-environment.
-
-You can also use @code{lilypondfile} (on a separate line, FIXME), to
-include another file.
-
-@section Fontsize options You can use all lilypond fontsizes in
-@command{lilypond-book}. The default 16pt fontsize is probably to big to be
-included in the middle of the text, 11pt or 13pt is probably better.
-
-The code can look like this:
-@example
-@@lilypond[13pt, eps]
-<c' e g>
-@@end lilypond
-@end example
-
-The following options set the fontsize:
-@itemize
-@item @code{11pt}
-@lilypond[11pt, eps]
- \relative c'{
- r16 [c d e][f d e c] [g'8 c][b-\prall c] |
- [d16 g, a b][c a b g][d'8 g f-\prall g]
- }
-@end lilypond
-@item @code{13pt}
-@lilypond[13pt, eps]
- \relative c'{
- r16 [c d e][f d e c] [g'8 c][b-\prall c] |
- [d16 g, a b][c a b g][d'8 g f-\prall g]
- }
-@end lilypond
-@item @code{16pt}
-@lilypond[16pt, eps]
- \relative c'{
- r16 [c d e][f d e c] [g'8 c][b-\prall c] |
- [d16 g, a b][c a b g][d'8 g f-\prall g]
- }
-@end lilypond
-@item @code{20pt}
-@lilypond[20pt, eps]
- \relative c'{
- r16 [c d e][f d e c] [g'8 c][b-\prall c] |
- [d16 g, a b][c a b g][d'8 g f-\prall g]
- }
-@end lilypond
-@item @code{26pt}
-@lilypond[26pt, eps]
- \relative c'{
- r16 [c d e][f d e c] [g'8 c][b-\prall c] |
- [d16 g, a b][c a b g][d'8 g f-\prall g]
- }
-@end lilypond
-@end itemize
-
-
-@section More options
-@itemize
-@item The @code{singleline} option set @code{linewidth} to -1.0.
-@item The @code{multiline} option set @code{linewidth} to a value letting
-the music be aligned to the right margin. The music can span several
-lines.
-@end itemize
-
-@section Just in case...
-The options @code{fragment} and @code{nonfragment} will override
-@command{lilypond-book} when it scans the lilypond code to see if it is voice
-contents or complete code. This might be useful if @command{lilypond-book} choose
-wrong.
-
-Since there is no finder's fee which doubles every year, there is no
-need to wait for the price money to grow. So send a bug report today
-if you need this one of these options.
-
-@section Examples
-
-This was all options to @code{\begin}. The rest of the lilypond
-document will show some ways you can use lilypond in
-La@TeX{} documents. It will also act as a simple test-suite for
-lilypond-book. You can place @code{eps} lilypond in and marginspars just
-as any other included eps graphics.
-
-@lilypond
-\score{
- \notes\relative c'{
- \time 12/8;
- r4-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
- [f16-.( )f-. dis8-- gis16-.( )gis-.] cis4.-\fermata |
-
- r4.-\fermata [cis,16 cis g'8 f16 f b8][g16 g f8 b16 b] dis4.-\fermata
- }
- \paper{linewidth = 7.\cm;}
-}
-@end lilypond
-
-
-To the right you can see some bars from the trumpet fanfara from the
-beginning of the fantastic street opera ``Houdini the Great'', by the
-Danish composer Andy Pape. The music is put inside a
-@code{floatingfigure} environment, and the music will be aligned by
-the right marging if you set floatingfigure width and lilypond linewidth
-to the same value. The code looks like this:
-
-@lilypond[verbatim]
-\score{
- \notes\relative c'{
- \time 12/8;
- r4.-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
- [f16-.( )f-. dis8-- gis16-.( )gis-.] cis8.-\fermata |
-
- r4.-\fermata [cis,16 cis g'8 f16 f b8]
- [g16 g f8 b16 b] dis4.-\fermata
- }
- \paper{linewidth = 7.\cm;}
-}
-@end lilypond
-
-If you have a lot of small music examples like this in the middle of
-your text, you might get a nicer look by using ``double'' line
-spacing. Put the @code{\linespread@{1.6@}} command into the preamble of
-your document. Then the line spacing will not be increased between the
-lines where you have music printed with the smallest font size.
-
-Lilypond-book does know about @code{\onecolumn} and @code{\twocolumn}.
-So the music will be adjusted to the new linewith:
-
-Verbatim environments will also ignore the page margins. That is
-a feature of La@TeX{}. (But you usually put things inside a verbatim
-environment when you don't want La@TeX{} to do any linebreaking)
-
-@end ignore
* Tutorial:: A tutorial introduction to LilyPond.
* Reference Manual:: Reference Manual.
* Mutopia project:: Mutopia project.
-* Tricks:: Features, tips and tricks.
* Invoking LilyPond:: Operation.
* Bug reports:: Where to report bugs.
* ly2dvi:: Generating nice output with titles.
@mbinclude tutorial.itely
@mbinclude refman.itely
@mbinclude mutopia.itely
-@mbinclude tricks.itely
@mbinclude internals.itely
@mbinclude invoking.itexi
@mbinclude bugs.itexi
-
@node Mutopia project
@chapter Mutopia project
@cindex mutopia project
@cindex sheet music archive
+[TODO:
+
+* different name. Ports sucks
+
+* drop for 1.4
+
+* mutopia is rather offtopic in the lilypond manual
-The Mutopia project needs your help. Mutopia is a collection of
-public domain sheet music. All the music on Mutopia is completely
-free to download, print out, perform and distribute. Mutopia is
-similar in spirit to Project Gutenburg - but consists of a growing
-collection of free music. You can help the project by entering music
-(either by hand, or by converting from scans or MIDI) and submitting
-it. Point your browser to the @uref{http://www.mutopiaproject.org}.
+]
+Mutopia is a collection of public domain sheet music. All the music
+on Mutopia is completely free to download, print out, perform and
+distribute. Mutopia is similar in spirit to Project Gutenburg. You can
+help the project by entering music (either by hand, or by converting
+from scans or MIDI) and submitting it. Point your browser to the
+@uref{http://www.mutopiaproject.org}.
+
@menu
* Mutopia ports collection::
@end menu
@cindex mutopia ports collection
-We're working on a ports collection for LilyPond. The aim is to make
-all music in Mutopia very easily accessible for LilyPond users
-to study, edit and print.
-
-A somewhat functional experimental tree will be available in version
-1.3.141. It should then be very easy to
+The ports collection to makes all music in Mutopia very easily
+accessible for LilyPond users to study, edit and print. The
+ports-system performs the following functions:
@enumerate 1
- download anything from Mutopia
- compile for printing or for Mutopia submission
- publish and package for Mutopia
+@item download anything from Mutopia
+@item compile for printing or for Mutopia submission
+@item publish and package for Mutopia
@end enumerate
Type @samp{make help} in @file{ports} directory to see possible
targets.
+@ignore
[TODO]
Now that we have the @samp{make sync} target, maybe we should
@end example
Disadvantage: no clue of available titles.
+@end ignore
+
* Page layout::
* Sound::
* Music entry::
+* Skipping corrected music::
* Interpretation context::
* Syntactic details::
* Lexical details::
@c . {Polyphony}
@node Polyphony
@section Polyphony
-@cindex Polyphony
+@cindex polyphony
-[TODO: collisions, rest-collisinos, voiceX identifiers, how to
-which contexts to instantiate. some small examples? ]
+Polyphonic parts, i.e. parts with more than one voice on a staff can be
+typeset with LilyPond. To use this, instantiate a separate Voice
+context for each part, and assign a stem direction to each part.
+@lilypond[fragment,verbatim]
+\context Staff
+< \context Voice = VA { \stemUp b'4 a' g' f' e' }
+ \context Voice = VB { \stemDown g'4 g' g' g' g' } >
+@end lilypond
+
+When there are more than two voices on a staff, you must also indicate
+which voice should moved horizontally in case of a collision. This can
+be done with the identifiers @code{\shiftOff}, @code{\shiftOn},
+@code{\shiftOnn}, etc. (which sets grob property @code{horizontal-shift}
+in @code{NoteColumn}).
+
+@lilypond[fragment, verbatim]
+ \context Staff \notes\relative c''<
+ \context Voice=one {
+ \shiftOff \stemUp e4
+ }
+ \context Voice=two {
+ \shiftOn \stemUp cis
+ }
+ \context Voice=three {
+ \shiftOnn \stemUp ais
+ }
+ \context Voice=four {
+ \shiftOnnn \stemUp fis-2
+ }
+ >
+@end lilypond
+The most convenient way is to use the identifiers @code{\voiceOne}
+through @code{\voiceFour}, which also set slur and tie directions in the
+correct manner.
+
+@lilypond[singleline, verbatim]
+\relative c''
+\context Staff < \context Voice = VA { \voiceOne cis2 b }
+ \context Voice = VB { \voiceThree b4 ais ~ ais4 gis4 }
+ \context Voice = VC { \voiceTwo fis4~ fis4 f ~ f } >
+@end lilypond
+
+
+LilyPond also vertically shifts rests that are opposite of a stem.
+
+@lilypond[singleline,verbatim]
+\context Staff <
+\context Voice { \stemUp c''4 }
+\context Voice =VB { r4 }
+>
+@end lilypond
+
+Note head collisions (horizontal shifting of note heads) are handled by
+the @code{NoteCollision} grob. @code{RestCollision} handles vertical
+shifting of rests.
+
+@cindex @code{NoteCollision}
+@cindex @code{RestCollision}
-@table @code
-@cindex @code{\shiftOff}
- @item @code{\shiftOff}
- Disable horizontal shifting of note heads that collide.
-
-@cindex @code{\shiftOn}
- @item @code{\shiftOn}
- Enable note heads that collide with other note heads to be
- shifted horiztonally. Also @code{\shiftOnn} and @code{\shiftOnnn}
-set different shift values.
-
-@cindex @code{\stemBoth}
- @item @code{\stemBoth}
- Allow stems and beams to point either upwards or
- downwards, decided automatically by LilyPond.
-
-@cindex @code{\stemDown}
- @item @code{\stemDown}
- Force stems and beams to point down.
-
-@cindex @code{\stemUp}
- @item @code{\stemUp}
- Force stems and beams to point up.
-@end table
-@cindex @code{\slurBoth}
-@cindex @code{\slurDown}
-@cindex @code{\slurUp}
-Similarly, for slurs use
-@code{\slurBoth},
-@code{\slurDown},
-@code{\slurUp}.
-
-@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}
-@cindex @code{\voiceFour}
-@cindex @code{\oneVoice}
-@cindex @code{\shiftOn}
-@cindex @code{\shiftOff}
-
-If two voices sharing one staff have the same stem directions, their
-note heads may collide. You can shift the note heads of one voice by
-setting @code{\shiftOn}. This can be undone by setting
-@code{\shiftOff}.
-
-For simple polyphonic music, shorthands are available that combine
-directions and shift settings: @code{\voiceOne}, @code{\voiceTwo},
-@code{\voiceThree}, @code{\voiceFour} and @code{\oneVoice}.
+@refbugs
+
+Resolving collisions is a very intricate subject, and LilyPond only
+handles a few situations. When it can not cope, you are advised to use
+@code{force-hshift} of the NoteColumn grob and @code{staff-position} of
+the Rest grob to override typesetting decisions.
+[TODO: doc merge-differently-dotted]
@node Beaming
@section Beaming
@end lilypond
This requires that you add the @code{Instrument_name_engraver} to the
-staff context.
+staff context. You can also use markup texts:
+
+
+@lilypond[verbatim,singleline]
+#(define text-flat
+ '((font-relative-size . -2 ) (music "accidentals--1")))
+
+\score { \notes {
+ \property Staff.instrument = #`((kern . 0.5) (lines
+ "2 Clarinetti" (rows " (B" ,text-flat ")")))
+ c'' 4 }
+ \paper {
+ \translator { \StaffContext
+ \consists "Instrument_name_engraver"; } } }
+@end lilypond
@node Transpose
you can change the resulting grobs.
@lilypond[verbatim, fragment]
-c'4 \property Voice.Stem \override #'meta = #'((interfaces . ())) c'4
+c'4 \property Voice.Stem = #'((meta . ((interfaces . ())))) c'4
@end lilypond
-The @code{\property} statement effectively empties the definition of the
-Stem object. One of the effects is that property specifying how it
+The @code{\property} assignment effectively empties the definition of
+the Stem object. One of the effects is that property specifying how it
should be printed is erased, with the effect of rendering it invisible.
+The above assignment is available as a standard identifier, lest you
+find this useful:
+@example
+ \property Voice.Stem = \turnOff
+@end example
@cindex \override
@cindex \revert
exact length of the string, which may lead to collisions. Also, @TeX{}
commands won't work with direct postscript output.
+@cindex metronome mark
+
+One practical application of complicated markup is to fake a metronome
+marking:
+
+@lilypond[verbatim]
+#(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 (font-relative-size . -1)) ,dotted-eight-note " = 64")
+ }
+ \paper {
+ linewidth = -1.;
+ \translator{
+ \ScoreContext
+ TextScript \override #'font-shape = #'upright
+ }
+ }
+}
+@end lilypond
+
+
+
@c . {Page layout}
@node Page layout
@section Page layout
A bar check is entered using the bar symbol, @code{|}
-
-
@c . {Point and click}
@node Point and click
@subsection Point and click
harmless, and can be ignored.
+@node Skipping corrected music
+@section Skipping corrected music
+
+The property @code{Score.skipTypesetting} can be used to switch on and
+off typesetting completely during the interpretation phase. When
+typesetting is switched off, the music is processed much more quickly.
+You can use this to skip over the parts of a score that you have already
+checked for errors.
+
+@lilypond[fragment,singleline,verbatim]
+\relative c'' { c8 d
+\property Score.skipTypesetting = ##t
+ e f g a g c, f e d
+\property Score.skipTypesetting = ##f
+c d b bes a g c2 }
+@end lilypond
+
+
@node Interpretation context
@section Interpretation context
This example replaces the text string of a script. It also shows a dump
of the music it processes, which is useful if you want to know more
about how music is stored.
-@lilypond[verbatim]
+
+@lilypond[verbatim,singleline]
#(define (testfunc x)
(if (equal? (ly-get-mus-property x 'text) "foo")
(ly-set-mus-property x 'text "bar"))
}
@end lilypond
-For more information on what is possible, see the @ref{Tricks} and the
-automatically generated documentation.
+For more information on what is possible, see the automatically
+generated documentation.
Directly accessing internal representations is dangerous: the
implementation is subject to changes, so you should avoid this feature
if possible.
-
-
+
+A final example is a function that reverses a piece of music in time:
+
+@lilypond[verbatim,singleline]
+#(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))
+
+music = \notes { c'4 d'4( e'4 f'4 }
+
+\score { \context Voice {
+ \music
+ \apply #reverse-music \music
+ }
+}
+@end lilypond
+
@c . {Span requests}
@menu
+++ /dev/null
-@c -*-texinfo-*-
-@c Note:
-@c
-@c A menu is needed before every deeper *section nesting of @nodes
-@c Run M-x texinfo-all-menus-update
-@c to automagically fill in these menus
-@c before saving changes
-
-@ignore
-
-TODO
- * cue notes
- * different staff sizes
- * font selection
-
- * move some stuff to refman
- * merge some stuff with refman entries
-
- * add @ref{}s to lilypond-internals:
- @rgrob{Name} to grob
- @reng{Name} to engraver
-
- there's a very simple, very general noXXX mechanism; try
-
-noop \property Staff.VoltaBrace = #'()
-yes: \property Staff.VoltaBracket = #'((meta . ((interfaces . ()))))
-
-
- visibility?
- brew_molecule?
-@end ignore
-
-
-@node Tricks
-@chapter Tricks
-
-@menu
-* Manual beam settings:: Manual beam settings
-* Engraver hacking:: Engraver hacking
-* Markup text:: Markup text
-* Apply hacking:: Apply hacking
-* Embedded TeX:: Embedded TeX
-* Embedded PostScript:: Embedded PostScript
-@end menu
-
-
-@node Manual beam settings
-@section Manual beam settings
-@cindex beams
-@cindex beam settings
-@cindex manual beams
-
-
-@c auto knees
-
-
-@cindex @code{no-stem-extend}
-
-Conventionally, stems and beams extend to the middle staff line. This
-extension can be controlled through @code{Voice.Stem}'s grob-property
-@code{no-stem-extend}:
-
-@quotation
-@lilypond[fragment,relative,verbatim]
- \grace a'8 a4
- \property Voice.Stem \set #'no-stem-extend = ##t
- \grace g8 g4 [g8 g]
-@end lilypond
-@end quotation
-
-The direction of a perfectly centred beams can be
-controlled through @code{Voice.Beam}'s grob-property
-@code{default-neutral-direction}
-
-@quotation
-@lilypond[fragment,relative,verbatim]
- [b''8 b]
- \property Voice.Beam \set #'default-neutral-direction = #-1
- [b b]
-@end lilypond
-@end quotation
-
-There are several ways to calculate the direction of a beam.
-@table @code
-@item majority
-number count of up or down notes
-@item mean
-mean center distance of all notes
-@item median
-mean centre distance weighted per note
-@end table
-
-You can spot the differences of these settings from these simple
-examples:
-
-@quotation
-@lilypond[fragment,relative,verbatim]
- [d''8 a]
- \property Voice.Beam \set #'dir-function = #beam-dir-mean
- [d a]
- \property Voice.Beam \set #'dir-function = #beam-dir-median
- [d a]
-@end lilypond
-@end quotation
-
-@quotation
-@lilypond[fragment,relative,verbatim]
- \time 3/8;
- [d''8 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]
-@end lilypond
-@end quotation
-
-These beam direction functions are defined in @file{scm/beam.scm}. If
-your favourite algorithm isn't one of these, you can hook up your own.
-
-
-
-@node Engraver hacking
-@section Engraver hacking
-
-No time signature, no barlines...
-@lilypond[verbatim]
-\score {
- \notes \relative c'' {
- a b c d
- d c b a
- }
- \paper {
- linewidth = -1.;
- \translator {
- \StaffContext
- whichBar = #""
- \remove "Time_signature_engraver";
- }
- }
-}
-@end lilypond
-
-No staff, no clef, squash pitches
-@lilypond[verbatim]
-\score {
- \notes { c4 c4 c8 c8 }
- \paper {
- linewidth = -1.;
- \translator {
- \StaffContext
- \remove Staff_symbol_engraver;
- \consists Pitch_squash_engraver;
- \remove Clef_engraver;
- }
- }
-}
-@end lilypond
-
-
-
-@node Markup text
-@section Markup text
-
-
-@ignore
-
-
-#(define text-flat '((font-relative-size . -2 ) (music "accidentals--1")))
-
- \property VoiceCombineStaff.instrument = #`((kern . 0.5) (lines
- "2 Clarinetti" (rows " (B" ,text-flat ")")))
-
- % Ugh, markup burps
- \property StaffCombineStaff.instrument = #'((kern . 0.5)
- (lines "Violoncello" (rows " e") (rows "Contrabasso")))
-
-
-@end ignore
-
-
-
-Metrome hack...
-
-[todo: hack this into C++, use \tempo]
-
-@lilypond[verbatim]
-#(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 (font-relative-size . -1)) ,dotted-eight-note " = 64")
- }
- \paper {
- linewidth = -1.;
- \translator{
- \ScoreContext
- TextScript \override #'font-shape = #'upright
- }
- }
-}
-@end lilypond
-
-
-@c equalizer
-
-
-@node Apply hacking
-@section Apply hacking
-
-[Add Parenthesed note head example?]
-
-[Add Smart transpose example?]
-
-
-@lilypond[verbatim]
-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.; }
-}
-@end lilypond
-
-@node Embedded TeX
-@section Embedded TeX
-@lilypond[fragment,relative,verbatim]
- a''^"3 $\\times$ \\`a deux"
-@end lilypond
-
-@node Embedded PostScript
-@section Embedded PostScript
-
-Arbitrary lines and curves not supported...
-
-[TODO:] Make a direct postscript command?
-
-@lilypond[verbatim]
-\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; }
-}
-@end lilypond
* A piano excerpt:: Piano music
* An orchestral score::
* Part extraction::
+* Latex and texinfo integration::
* end of tutorial:: The end
* Pre-cooked makefile::
@end menu
skipBars = ##t
@end example
+@node Latex and texinfo integration
+@section Latex and texinfo integration
+
+So what does this look like? Well, here is an example:
+@lilypond[veryverbatim, intertext="produces this music:"]
+\score{
+ \notes\relative c'{
+ \time 5/8;
+ [e16( g b c a g][e a b d] | )e2 d,8 |
+ [e16( g b c a g][e a b d] | )b2 [a16( f] |
+ [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] |
+ [f( a b d b a][f a b d] | )e2
+ }
+}
+@end lilypond
+If you are lucky, the above example show a nice feature of LilyPond
+and La@TeX{}. Since LilyPond can output the music as @TeX{} graphics,
+La@TeX{} can insert pagebreaks between the lines of music.
+
+Notice that there is no @code{\paper} statement in the example
+above. Lilypond-book will insert some code for you that defines the
+linewidth and the font to use. If you don't want to change the default,
+there is no need to put an empty @code{\paper@{@}} inside the @code{\score}.
+In the example above, something like
+this might be inserted before your code:
+@example
+\include "paper16.ly"
+\paper@{ \paper_sixteen
+ linewidth = 390.\pt;
+ castingalgorithm = \Gourlay;
+@}
+@end example
+The actual values for linewidth will differ depending on papersize and
+number of columns. Also, if you use a different fontsize for the
+music, another file than @code{paper16.ly} will be included.
+
+If you want to make the music not so wide, you can insert a
+@code{\paper} statement that set the linewidth:
+
+@lilypond[veryverbatim, intertext="produces this music:"]
+\score{
+ \notes\relative c'{
+ \time 5/8;
+ [e16( g b c a g][e a b d] | )e2 d,8 |
+ [e16( g b c a g][e a b d] | )b2 [a16( f] |
+ [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] |
+ [f( a b d b a][f a b d] | )e2
+ }
+ \paper{linewidth = 10.\cm;}
+}
+@end lilypond
+
+Very often, if you mix music and text, the music is often only a
+few notes or at most a few bars. This music should be as short as
+possible and not stretched to be aligned to the right margin.
+
+If you only write voice-contents in the lilypond block, @command{lilypond-book}
+will set the @code{linewidth} variable to -1, so Lilypond
+will make the music as short as possible but without breaking the
+line. Here is a well know harmonic progression:
+@lilypond[veryverbatim, intertext="produce a well known harmonic progression:"]
+ \context Voice { <c' e g> <b d g> <c2 e g> }
+@end lilypond
+
+If you want to place music examples in the text,
+@lilypond[eps]
+ \context Voice { <c' e g> <b d g> <c2 e g> }
+@end lilypond
+, you can use the @code{eps} option. This will create the music as
+eps graphics and include it into the document with the
+@code{\includegraphics} command.
+
+The code used look like this:
+@example
+@@lilypond[eps]
+ \context Voice @{ <c' e g> <b d g> <c2 e g> @}
+@@end lilypond
+@end example
+
+You can also use the @code{eps} option if the block is a complete
+lilypond source. This 5 cm long empty line,
+@lilypond[eps]
+\score{
+ \notes{s}
+ \paper{ linewidth = 5.\cm;}
+}
+@end lilypond
+was created with this code:
+@example
+@@lilypond[eps]
+\score@{
+ \notes@{s@}
+ \paper@{ linewidth = 5.\cm;@}
+@}
+@@end lilypond
+@end example
+
+To avoid that La@TeX{} places the music on a line of its one, there should
+be no empty lines between the normal text and the lilypond
+environment.
+
+You can also use @code{lilypondfile} (on a separate line, FIXME), to
+include another file.
+
+@subsection Fontsize options
+
+You can use all lilypond fontsizes in @command{lilypond-book}. The
+default 16pt fontsize is probably to big to be included in the middle of
+the text, 11pt or 13pt is probably better.
+
+The code can look like this:
+@example
+@@lilypond[13pt, eps]
+<c' e g>
+@@end lilypond
+@end example
+
+The following options set the fontsize:
+@itemize
+@item @code{11pt}
+@lilypond[11pt, eps]
+ \relative c'{
+ r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+ [d16 g, a b][c a b g][d'8 g f-\prall g]
+ }
+@end lilypond
+@item @code{13pt}
+@lilypond[13pt, eps]
+ \relative c'{
+ r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+ [d16 g, a b][c a b g][d'8 g f-\prall g]
+ }
+@end lilypond
+@item @code{16pt}
+@lilypond[16pt, eps]
+ \relative c'{
+ r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+ [d16 g, a b][c a b g][d'8 g f-\prall g]
+ }
+@end lilypond
+@item @code{20pt}
+@lilypond[20pt, eps]
+ \relative c'{
+ r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+ [d16 g, a b][c a b g][d'8 g f-\prall g]
+ }
+@end lilypond
+@item @code{26pt}
+@lilypond[26pt, eps]
+ \relative c'{
+ r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+ }
+@end lilypond
+@end itemize
+
+
+@subsection More options
+
+@itemize
+@item The @code{singleline} option set @code{linewidth} to -1.0.
+@item The @code{multiline} option set @code{linewidth} to a value letting
+the music be aligned to the right margin. The music can span several
+lines.
+@end itemize
+
+@subsection Just in case...
+The options @code{fragment} and @code{nofragment} will override
+@command{lilypond-book} when it scans the lilypond code to see if it is voice
+contents or complete code. This might be useful if @command{lilypond-book} choose
+wrong.
+
+Since there is no finder's fee which doubles every year, there is no
+need to wait for the price money to grow. So send a bug report today
+if you need this one of these options.
+
+@subsection Examples
+
+This was all options to @code{\begin}. The rest of the lilypond
+document will show some ways you can use lilypond in
+La@TeX{} documents. It will also act as a simple test-suite for
+lilypond-book. You can place @code{eps} lilypond in and marginspars just
+as any other included eps graphics.
+
+@lilypond
+\score{
+ \notes\relative c'{
+ \time 12/8;
+ r4-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
+ [f16-.( )f-. dis8-- gis16-.( )gis-.] cis4.-\fermata |
+
+ r4.-\fermata [cis,16 cis g'8 f16 f b8][g16 g f8 b16 b] dis4.-\fermata
+ }
+ \paper{linewidth = 7.\cm;}
+}
+@end lilypond
+
+
+To the right you can see some bars from the trumpet fanfara from the
+beginning of the fantastic street opera ``Houdini the Great'', by the
+Danish composer Andy Pape. The music is put inside a
+@code{floatingfigure} environment, and the music will be aligned by
+the right marging if you set floatingfigure width and lilypond linewidth
+to the same value. The code looks like this:
+
+@lilypond[verbatim]
+\score{
+ \notes\relative c'{
+ \time 12/8;
+ r4.-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
+ [f16-.( )f-. dis8-- gis16-.( )gis-.] cis8.-\fermata |
+
+ r4.-\fermata [cis,16 cis g'8 f16 f b8]
+ [g16 g f8 b16 b] dis4.-\fermata
+ }
+ \paper{linewidth = 7.\cm;}
+}
+@end lilypond
+
+If you have a lot of small music examples like this in the middle of
+your text, you might get a nicer look by using ``double'' line
+spacing. Put the @code{\linespread@{1.6@}} command into the preamble of
+your document. Then the line spacing will not be increased between the
+lines where you have music printed with the smallest font size.
+
+Lilypond-book does know about @code{\onecolumn} and @code{\twocolumn}.
+So the music will be adjusted to the new linewith:
+
+Verbatim environments will also ignore the page margins. That is
+a feature of La@TeX{}. (But you usually put things inside a verbatim
+environment when you don't want La@TeX{} to do any linebreaking)
+
+
@node end of tutorial
@section The end
The website is the most convenient form to use for reading the
documentation on-line documentation. It is made by entering
- make htmldoc
- This does require a functioning LilyPond. The binary doesn't have to
-be installed.
+
+ make web-doc
+ This does require a functioning LilyPond. The executable doesn't
+have to be installed, though.
If you want to auto-generate Lily's website, you'll need some
additional conversion tools.
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=142
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=143
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
\paper{
- %my standard paper block
-
-
-% 0=\font "feta19"
-% -1=\font "feta16"
-% \stylesheet #(make-style-sheet 'paper19)
-
indent=0.;
linewidth=188.\mm;
\translator{
\PianoStaffContext
- %VerticalAlignment \set #'forced-distance = #8.4
VerticalAlignment \override #'forced-distance = #8.4
}
\translator{\StaffContext
--- /dev/null
+\header {
+texidoc = "
+
+There are several ways to calculate the direction of a beam.
+@table @code
+@item majority
+number count of up or down notes
+@item mean
+mean center distance of all notes
+@item median
+mean centre distance weighted per note
+@end table
+
+You can spot the differences of these settings from these simple
+examples:
+
+These beam direction functions are defined in @file{scm/beam.scm}. If
+your favourite algorithm isn't one of these, you can hook up your own.
+";
+}
+
+\paper { linewidth = -1.;}
+\score { \notes \relative c {
+ [d''8 a]
+ \property Voice.Beam \set #'dir-function = #beam-dir-mean
+ [d a]
+ \property Voice.Beam \set #'dir-function = #beam-dir-median
+ [d a]
+}}
+\score { \notes \relative c {
+ \time 3/8;
+ [d''8 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]
+}}
+
--- /dev/null
+\header { texidoc = "
+The direction of a perfectly centred beams can be
+controlled through @code{Voice.Beam}'s grob-property
+@code{default-neutral-direction}
+";}
+
+\paper { linewidth = -1.;}
+\score {\notes \relative c {
+ [b''8 b]
+ \property Voice.Beam \set #'default-neutral-direction = #-1
+ [b b]
+}}
--- /dev/null
+\header { texidoc = "
+Conventionally, stems and beams extend to the middle staff line. This
+extension can be controlled through @code{Voice.Stem}'s grob-property
+@code{no-stem-extend}:
+";}
+
+\paper { linewidth = -1.;}
+\score {\notes \relative c {
+ \grace a'8 a4
+ \property Voice.Stem \set #'no-stem-extend = ##t
+ \grace g8 g4 [g8 g]
+}}
+\header {
+ texidoc = "By inserting the @TeX{} command \embeddedps, you can
+insert postscript directly into the output.
+
+TODO: make molecule-callback to do this.
+ ";
+}
\score {
\notes \relative c'' {
Spanner*
Auto_beam_engraver::create_beam_p ()
{
+ if (to_boolean (get_property ("skipTypesetting")))
+ {
+ return 0;
+ }
+
Spanner* beam_p = new Spanner (get_property ("Beam"));
for (int i = 0; i < stem_l_arr_p_->size (); i++)
{
stem_l_arr_p_ = 0;
delete grouping_p_;
grouping_p_ = 0;
+
shortest_mom_ = Moment (1, 8);
}
junk_beam ();
}
else
+
{
finished_beam_p_ = create_beam_p ();
if (finished_beam_p_)
delete stem_l_arr_p_;
stem_l_arr_p_ = 0;
grouping_p_ = 0;
- shortest_mom_ = Moment (1, 8);
}
+
+ shortest_mom_ = Moment (1, 8);
}
void
FIXME: clean me up.
*/
Molecule
-Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev)
+Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev,
+ Real dy, Real dydx
+ )
{
// ugh -> use commonx
if ((next && ! (next->relative_coordinate (0, X_AXIS) > here->relative_coordinate (0, X_AXIS))) ||
Real dx = visible_stem_count (me) ?
last_visible_stem (me)->relative_coordinate (0, X_AXIS) - first_visible_stem (me)->relative_coordinate (0, X_AXIS)
: 0.0;
- Real dy = gh_scm2double (me->get_grob_property ("dy"));
- Real dydx = dy && dx ? dy/dx : 0;
Molecule leftbeams;
Molecule rightbeams;
dx = stems.top ()->relative_coordinate (0, X_AXIS) - x0;
}
+
+
+ /*
+ TODO: the naming of the grob properties sucks.
+ */
+ SCM dy_s = me->get_grob_property ("dy");
+ SCM y_s = me->get_grob_property ("y");
+
- Real dy = gh_scm2double (me->get_grob_property ("dy"));
+ Real dy = gh_number_p (dy_s) ? gh_scm2double (dy_s) : 0.0;
Real dydx = dy && dx ? dy/dx : 0;
- Real y = gh_scm2double (me->get_grob_property ("y"));
+ Real y = gh_number_p (y_s) ? gh_scm2double (y_s) : 0.0;
for (int j=0; j <stems.size (); j++)
Item * prev = (j > 0)? stems[j-1] : 0;
Item * next = (j < stems.size ()-1) ? stems[j+1] :0;
- Molecule sb = stem_beams (me, i, next, prev);
+ Molecule sb = stem_beams (me, i, next, prev, dy, dydx);
Real x = i->relative_coordinate (0, X_AXIS)-x0;
sb.translate (Offset (x, x * dydx + y));
mol.add_molecule (sb);
Grace_engraver_group::one_time_step ()
{
calling_self_b_ = true;
- process_music ();
- announces ();
- pre_move_processing ();
+
+ if (!to_boolean (get_property (ly_symbol2scm ("skipTypesetting"))))
+ {
+ process_music ();
+ announces ();
+ }
+ stop_translation_timestep ();
check_removal ();
calling_self_b_ = false;
}
calling_self_b_ = true;
// process_music ();
announces ();
- pre_move_processing ();
+ stop_translation_timestep ();
check_removal ();
calling_self_b_ = false;
}
DECLARE_SCHEME_CALLBACK (user_override, (SCM));
DECLARE_SCHEME_CALLBACK (do_quantise_y, (SCM));
- static Molecule stem_beams (Grob*,Item *here, Item *next, Item *prev);
+ static Molecule stem_beams (Grob*,Item *here, Item *next, Item *prev, Real, Real);
private:
static Direction get_default_dir (Grob*);
Translator_group * daddy_trans_l_ ;
- void pre_move_processing ();
void announces ();
- void post_move_processing ();
+
void removal_processing ();
/**
ask daddy for a feature
virtual void stop_translation_timestep ();
virtual void start_translation_timestep ();
virtual void finalize ();
- virtual void create_grobs ();
private:
Span_req * new_req_l_;
new_req_l_ =0;
}
-}
-
-void
-Multi_measure_rest_engraver::create_grobs ()
-{
-
if (busy_span_req_l_ && !mmrest_p_)
{
mmrest_p_ = new Spanner (get_property ("MultiMeasureRest"));
start_measure_i_
= gh_scm2int (get_property ("currentBarNumber"));
}
+
+
}
void
{
typeset_grob (mmrest_p_);
/*
- we must keep mmrest_p_ around to set measure-count.
+ we must keep mmrest_p_ around to set measure-count, so
+ no mmrest_p_ = 0 here.
*/
}
Moment note_end_mom_;
public:
VIRTUAL_COPY_CONS (Translator);
-
+
protected:
virtual void start_translation_timestep ();
virtual bool try_music (Music *req_l) ;
virtual void stop_translation_timestep ();
};
-
bool
Note_heads_engraver::try_music (Music *m)
{
void
Note_heads_engraver::start_translation_timestep ()
{
+
/* TODO:make this settable?
*/
if (note_end_mom_ > now_mom ())
else
e->forbid_breaks (); // guh. Use properties!
}
+
+
}
/*
TODO: fixme, fucks up if called twice on the same set of rests.
+
+ TODO: look at horizontal-shift to determine ordering between rests
+ for more than two voices.
+
*/
SCM
Rest_collision::do_shift (Grob *me, SCM elts)
Global_translator::prepare (w);
make_columns (w);
- post_move_processing ();
+ start_translation_timestep ();
}
void
void
Score_engraver::one_time_step ()
{
- process_music ();
- announces ();
- pre_move_processing ();
+ if (!to_boolean (get_property (ly_symbol2scm("skipTypesetting"))))
+ {
+ process_music ();
+ announces ();
+ }
+
+
+ stop_translation_timestep ();
check_removal ();
}
Global_translator::prepare (m);
audio_column_l_ = new Audio_column (m);
play_element (audio_column_l_);
- post_move_processing ();
+ start_translation_timestep ();
}
// fixme: put this back.
// process_music ();
announces ();
- pre_move_processing ();
+ stop_translation_timestep ();
check_removal ();
}
}
now_heads_.clear ();
+ /*
+ we don't warn for no ties, since this happens naturally when you
+ use skipTypesetting. */
+
+#if 0
if (req_l_ && !tie_p_arr_.size ())
{
/* How to shut up this warning, when no notes appeared because
they were suicided by Thread_devnull_engraver? */
req_l_->origin ()->warning (_ ("No ties were created!"));
}
+#endif
for (int i=0; i< tie_p_arr_.size (); i++)
{
void
Translator_group::stop_translation_timestep ()
{
- each (&Translator::pre_move_processing);
+ each (&Translator::stop_translation_timestep);
}
void
Translator_group::start_translation_timestep ()
{
- each (&Translator::post_move_processing);
+ each (&Translator::start_translation_timestep);
}
void
-void
-Translator::post_move_processing ()
-{
- start_translation_timestep ();
-}
void
Translator::removal_processing ()
}
-void
-Translator::pre_move_processing ()
-{
- stop_translation_timestep ();
-}
-
-
-
Music_output_def *
Translator::output_def_l () const
{
Begin3
Title: LilyPond
-Version: 1.3.142
-Entered-date: 25MAR01
+Version: 1.3.143
+Entered-date: 26MAR01
Description: @BLURB@
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.142.tar.gz
+ 1000k lilypond-1.3.143.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.142.tar.gz
+ 1000k lilypond-1.3.143.tar.gz
Copying-policy: GPL
End
%define info yes
Name: lilypond
-Version: 1.3.142
+Version: 1.3.143
Release: 1
License: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.142.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.143.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# Icon: lilypond-icon.gif
(grob-property-description 'dependencies list? "list of score-grob pointers that indicate who to compute first for certain global passes.")
(grob-property-description 'details list? "alist of parameters for detailed grob behavior.")
(grob-property-description 'dir-forced boolean? "set if direction has been forced; read by Beam.")
-(grob-property-description 'dir-function procedure? "function of type (count total)->direction. Default value: beam-dir-majority, also available: beam-dir-mean, beam-dir-median.")
+(grob-property-description 'dir-function procedure? "function of type (count total)->direction. Default value: beam-dir-majority, also available: beam-dir-mean, beam-dir-median.
+
+The ways to calculate the direction of a beam work as follows:
+@table @code
+@item majority
+number count of up or down notes
+@item mean
+mean center distance of all notes
+@item median
+mean centre distance weighted per note
+@end table
+
+")
(grob-property-description 'dir-list list? "list of stem directions, needed for optical spacing correction.")
(grob-property-description 'direction dir? "up or down, left or right?.")
(grob-property-description 'direction-source ly-grob? "in case side-relative-direction is set, which grob to get the direction from .")
@end example
")
+(translator-property-description 'skipTypesetting boolean?
+ "When true, all no typesetting is done at
+this moment, causing the interpretation phase to go a lot faster. This can
+help with debugging large scores.")
+
(translator-property-description 'slurBeginAttachment symbol?
"translates to the car of grob-property 'attachment of NoteColumn. See
@ref{Slur}.")
program_version = '@TOPLEVEL_VERSION@'
if program_version == '@' + 'TOPLEVEL_VERSION' + '@':
- program_version = '1.3.113'
+ program_version = '1.4pre'
include_path = [os.getcwd()]
po-replace do po-update and replace catalogs with msgmerged versions\n\
po-update update translation Portable Object database\n\
web update website in out-www\n\
+ web-doc generate documentation website\n\
web-clean clean out-www\n\
\n\
Some of these top level targets (diff, dist, release) can be issued\n\