]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.153
authorfred <fred>
Wed, 27 Mar 2002 01:18:16 +0000 (01:18 +0000)
committerfred <fred>
Wed, 27 Mar 2002 01:18:16 +0000 (01:18 +0000)
20 files changed:
Documentation/header.html.in
Documentation/index.texi
Documentation/regression-test.tely
Documentation/topdocs/INSTALL.texi
Documentation/topdocs/index.tely
Documentation/user/glossary.tely
Documentation/user/tutorial.itely
input/regression/dot-flag-collision.ly [new file with mode: 0644]
input/regression/tuplet-beam.ly [new file with mode: 0644]
input/regression/tuplet-staffline-collision.ly [new file with mode: 0644]
input/tutorial/miniatures.ly
lily/collision.cc
lily/stem.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
mf/feta-generic.mf
mf/graylj.mf [new file with mode: 0644]
ps/music-drawing-routines.ps
scm/clef.scm
scm/interface-description.scm

index 9804cff65e7a0f76e87c40eb557f47fad00e5d4f..312b1e99f648869b4cb33eabd963092bcbf81f37 100644 (file)
@@ -68,6 +68,7 @@ which substitutes some @AT_VARIABLES@ as well.
        <b>Mailing Lists</b>
       </td></tr>
       <tr><td><font size=-1>
+       <a href="@TOP@Documentation/out-www/index.html#mailing-lists">About the lists</a><br>
        <a href="http://mail.gnu.org/mailman/listinfo/gnu-music-discuss/">Discussion</a><br>
         <a href="http://mail.gnu.org/mailman/listinfo/help-gnu-music">Help</a><br>
         <a href="http://mail.gnu.org/mailman/listinfo/bug-gnu-music/">Bugs</a><br>
index ca143450ff358a46ccff1d02b670f524c998667f..4cb0c30fcbb7fe591edeea422726f3c233005687 100644 (file)
@@ -153,26 +153,40 @@ Frequently Asked Questions} first.
 
 
 @itemize @bullet
+@item @uref{http://mail.gnu.org/mailman/listinfo/gnu-music-discuss,gnu-music-discuss@@gnu.org}
+This list is for discussions concerning LilyPond.
+
+Searchable archives are available from
+@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org}.
+
 @item @uref{http://mail.gnu.org/mailman/listinfo/info-gnu-music,info-gnu-music@@gnu.org}
 is a low-volume list for information on the GNU Music project.
     This list is moderated; ask 
     @email{drl@@gnu.org, David R. Linn} or
     @email{hanwen@@cs.uu.nl, Han-Wen} to send announcements for this list.
+
+Searchable archives are available from
+@uref{http://www.mail-archive.com/info-gnu-music@@gnu.org}.
+
 @item @uref{http://mail.gnu.org/mailman/listinfo/help-gnu-music,help-gnu-music@@gnu.org}
     For help with using LilyPond.
+
+Searchable archives are available from
+@uref{http://www.mail-archive.com/help-gnu-music@@gnu.org}.
+
 @item @uref{http://mail.gnu.org/mailman/listinfo/bug-gnu-music,bug-gnu-music@@gnu.org}
 If you have bugreports, you should send them to this list.  
 
 
-
         Please include in your bugreport the version of LilyPond that
 you experience the problem with, a description of your system and sample
 input to reproduce the problem. Do not send output files over the list,
 they tend to be very big and don't help with describing the problem.
 
 
-@item @uref{http://mail.gnu.org/mailman/listinfo/gnu-music-discuss,gnu-music-discuss@@gnu.org}
-    For discussions concerning LilyPond.
+Searchable archives are available from
+@uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org}.
+
 @end itemize
 
 These pages were entirely created from a @strong{development snapshot}
index 6965c068a9fee4fb4bbf4113313db5a76db01b97..d95171e7ff1d35e7793b8caae6d27428a0bee3d1 100644 (file)
@@ -131,9 +131,12 @@ and documenting bugfixes.
 
 @lilypondfile[printfilename]{tie-accidental.ly}
 
-
 @lilypondfile[printfilename]{tup.ly}
 
+@lilypondfile[printfilename]{tuplet-beam.ly}
+
+@lilypondfile[printfilename]{tuplet-staffline-collision.ly}
+
 
 
 @section Property details
index 55b9632acc602facf62d7a1097a0946294fd28cd..18d1639a029decfaf8953710b44df64c4ffe330d 100644 (file)
@@ -310,16 +310,17 @@ automatically loaded, so you need not modify your @code{~/.emacs} file.
 @subsection Red Hat Linux
 
 Red Hat 7.0 i386 RPMS are available from
-@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/}.
+@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/binaries/}.
 
 You can also compile them yourself.  A spec file is in
 @file{make/out/redhat.spec}. This file is distributed along with the
 sources.  You can make the rpm by issuing
 @example 
 
-       rpm -tb lilypond-x.y.z.tar.gz
+        tar xfz lilypond-x.y.z.tar.gz
+       rpm -bb lilypond-x.y.z/make/out/redhat.spec
        rpm -i /usr/src/redhat/RPMS/i386/lilypond-x.y.z
+
 @end example 
 
 For running on a Red Hat system you need these packages: guile, tetex,
@@ -330,11 +331,30 @@ to the those needed for running: glibc-devel, gcc-c++, libstdc++-devel,
 guile-devel, flex, bison, texinfo, tetex-devel, groff,
 libgr-progs.
 
+
+@b{Warning}
+
+There appears to be a problem with the Xdvi shipped with RedHat
+7.1. Symptoms: Xdvi responds very sluggishly or hangs while viewing
+lilypond output. The cause for this problem is unknown; you are advised
+to recompile Xdvi from source.
+
+@subsection LinuxPPC
+
+
+Some LinuxPPC RPMS should available from
+@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/binaries/}.
+
+A LinuxPPC RPM can be made using the @file{redhat.spec} file.
+
 @subsection SuSE
 
-You can also compile them yourself.  A spec file is in
-@file{make/out/suse.spec}. This file is distributed along with the
-sources.
+Some SUSE RPMS should available from
+@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/binaries/}.
+
+You can also compile a RPM for SUSE yourself.  A spec file is in
+@file{make/out/suse.spec}, see the instructions for building the RedHat
+RPM.
 
 You must have the following packages: guile tcsh tetex te_latex te_kpath
 te_mpost libpng python gpp libgpp gettext autoconf netpbm libnetpb
@@ -342,13 +362,17 @@ gs_serv gs_lib gs_fonts guile
 
 @subsection Slackware
 
+No precompiled packages for Slackware are available.
+
 Problems have been reported with Slackware 7.0; apparently, it ships
 with a faulty compiler. Do not compile LilyPond with -O2 on this
 platform.
 
 @subsection Mandrake
 
-[TODO]
+Some binaries are available at rpmfind.net. Refer to 
+@uref{ftp://ftp.rpmfind.net/linux/Mandrake-devel/cooker/contrib/RPMS/}.
+
 
 @subsection Debian GNU/Linux
 
index 5326e41bd6e46a97a4aaa5e12fb7962f3355d8a0..24aa57ecdcf889a68f319d30b219dddf449937f1 100644 (file)
@@ -13,7 +13,7 @@ i\input texinfo @c -*-texinfo-*-
 
 @unnumberedsec What is LilyPond? What can it do for you?
 
-LilyPond prints music notation.  It produces beautiful sheet music from
+LilyPond prints beautiful sheet music.  It produces music notation from
 a description file. It excels at typesetting classical music, but you
 can also print pop-songs.
 
index ad9f9f4759feb0dc9d6a12b896454d595b1522fa..2513a46a09c97c7d3ffa9a9297e64c9c3f4e177b 100644 (file)
@@ -673,10 +673,10 @@ also to some extent in newer jazz music.
 
 @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' { 
   c1 d
   \property Voice.TextScript \set #'padding = #-10
   e^"~~ S" f g a 
@@ -1094,8 +1094,9 @@ ES: corchete,
 I: coda (uncinata), bandiera, F: crochet, D: Fahne, F@"ahnchen, NL: vlaggetje,
 DK: fane, S: flagga, N: .
 
-Ornament at the end of the stem of a note used for notes with values less than
-a quarter note. The number of flags determines the @w{@ar{}@strong{note value}}.
+Ornament at the end of the stem of a note used for notes with values
+less than a quarter note. The number of flags determines the
+@w{@ar{}@strong{note value}}.
 
 
 @lilypond[13pt,eps]
index 11686f96c3078bb7e1b6cdc6f329d8918d73e46d..9fc31ed86e2552294ece539627156a46519227c5 100644 (file)
@@ -118,12 +118,10 @@ test.ps}
 @node First steps
 @section First steps
 
-Let's try to explain this example:
-
-The basics of any piece of music are notes.Notes are entered 
-with letters @code{a} to @code{g} followed by a
+The basics of any piece of music are notes.  Notes are entered 
+with letters @code{a} to @code{g}, followed by a
 number that represents the duration: a @code{2} is a half note, a
-@code{4} is a quarter note. A period is used for augmentation dots, so
+@code{4} is a quarter note. A period adds a dot to the note, so
 entering @code{2.} gives a dotted half note. 
 @example
      c2 e4 g2.
@@ -154,7 +152,7 @@ and the clef with @code{\clef} as follows:
 @lilypond[fragment]
         \time 3/4
         \clef bass
-        s2._" "
+        s2_" "
 @end lilypond
 
 The commands together with the notes are combined to form a snippet of
@@ -170,8 +168,9 @@ music. They are combined by enclosing them with @code{\notes @{ @}}.
 
 This snippet is ready to be printed. This is done by combining the music
 with a printing command. The printing command is the so-called
-@code{\paper} block.  The music and paper block are combined by
-enclosing them in @code{\score}.
+@code{\paper} block.  You will see later that the \paper block is
+necessary to customize all kinds of printing specifics.  The music and
+paper block are combined by enclosing them in @code{\score}.
 
 @lilypond[verbatim]
 \score {
@@ -251,8 +250,6 @@ There is one interesting point to note in this example: accidentals
 don't have to be marked explicitly. You just enter the pitch, and
 LilyPond determines wether or not to print an accidental.
 
-Managing larger pieces. 
-
 If you look at the last piece, it is already apparent that entering
 octaves using quotes is not very convenient. A score written in high
 register will be encoded using lots quotes. This makes the input file
@@ -262,22 +259,24 @@ This problem is solved by relative octave mode. In this mode, the quotes
 are used to mark large jumps in the melody. Without any quotes or
 commas, the interval between a note and its predecessor is assumed to be
 a fourth or less. Quotes and commas add octaves in up and down
-direction.  Relative octaves are introduced by @code{\relative} followed
-by a starting pitch
+direction.
 @lilypond[fragment,verbatim]
 \relative c'' { c4 d4 b4 e4 a,4 f'4 g,4 a'4 }
 @end lilypond
+You can enter a piece in relative mode, by putting @code{\relative} in
+front. You also have to enter a starting pitch, in this case @code{c''}.
+
 
 Slurs (not to be confused with ties) are entered with parentheses. You
 mark the starting note and ending note with a @code{(} and a
 @code{)} respectively.
 
-@lilypond[fragment,relative 2, verbatim]
+@lilypond[fragment,relative 1, verbatim]
 c8( cis d ) e 
 @end lilypond
 
 If you need two slurs at the same time (one for articulation, one for
-phrasing), you can also make phrasing slurs with @code{\(} and
+phrasing), you can also make a phrasing slur with @code{\(} and
 @code{\)}.
 
 @c lousy example
@@ -301,9 +300,9 @@ snippets of music, and combining those snippets in @code{<} and
   \context Staff = staffB { \clef bass c }
 >
 @end lilypond
-Here, @code{staffA} and @code{staffB} are names that you give to the
-staff. For now, it doesn't matter what names you give, as long as they
-are different.
+Here, @code{staffA} and @code{staffB} are names that you give them to
+the staff. For now, it doesn't matter what names you give them, as long
+as they are different.
 
 We can typeset a melody with two staffs now:
 
@@ -329,24 +328,78 @@ Notice that the time signature is specified in one melody staff only
 (the top staff), but is printed on both. LilyPond knows that the time
 signature should be the same for all staffs.
 
-[TODO add some more here
+Dynamic signs are made by adding the markings after the note
+@lilypond[verbatim,relative 1]
+c-\ff c-\mf
+@end lilypond
+
+Crescendi are started with the commands @code{\<}  and @code{\>}. The
+command @code{\!} finishes a crescendo on the following.
+@lilypond[verbatim,relative 1]
+c2  \< \! c2-\ff \> c2  \! c2
+@end lilypond
+
+Chords can be made by surrounding notes with @code{<} and @code{>}:
+@lilypond[relative 0, fragment,verbatim]
+  r4  <c e g> <c f a> 
+@end lilypond
+
+@c te diepzinnig?
+
+In general, @code{ < @var{stuff} > } is used when @var{stuff} all
+happens at the same time, like in chords, or (like in the two-staff
+example above) in a bunch of stacked staffs.
+
+Of course, you can combine beams and ties with chords:
+@lilypond[relative 0, fragment,verbatim]
+ r4  [<c8 e g>   <c8 f a>] ~ <c8 f a>
+@end lilypond
+
+When you want to combine chords with slurs and dynamics, an annoying
+technical detail crops up: you have type these commands next to the
+notes, which means that they have to be inside the @code{< >}:
+
+@lilypond[relative 0, fragment,verbatim]
+ r4     <c8 e g \> ( > <c e g> <c e g>  < ) \! c8 f a>
+@end lilypond
+
+A nasty technical detail also crops up when you start a score with a
+chord:
+@lilypond[verbatim,singleline]
+\score { \notes <c'1 e'1> }
+@end lilypond
+The program can not guess that you want the notes on only one staff. To
+force the chord on a staff, add @code{\context Staff} like this:
+@lilypond[verbatim,singleline]
+\score { \notes \context Staff <c'1 e'1> }
+@end lilypond
 
 
-* \header
 
-* dynamics , articulation
 
-* <chords>
+@ignore
+[TODO add some more here
+
+* lyrics, chords (?)
+
+* \header
 
 * identifiers?
 
 ]
+@end ignore
 
-This is the end of the simple tutorial. What follows is also a manual in
-tutorial-style, but it is much more in-depth, and alas more
-intimidating.  You should read it if you want to know about the more
-advanced features of lilypond, such as producing orchestral scores and
-parts, fine tuning output, writing polyphonic music, etc.
+This is the end of the simple tutorial. You know the basic ingredients
+of a music file, so this is the right moment to try your at hand at
+doing it yourself: try to type some simple examples, and experiment a
+little.
+
+When you're comfortable with the basics, then you might want to read the
+rest of this chapter. It also a manual in tutorial-style, but it is much
+more in-depth. It will also be very intimidating if you're not familiar
+with the basics.  It deals with some of the more advanced features of
+lilypond. Topics include lyrics, chords, orchestral scores and parts,
+fine tuning output, polyphonic music, and integrating text and music.
 
 
 
@@ -363,7 +416,6 @@ The examples discussed are included in the distribution, in the
 subdirectory @file{input/tutorial/}@footnote{When we refer to filenames,
 they are relative to the top directory of the source package. }
 
-
 To demonstrate what LilyPond input looks like, we start off with a
 full-fledged, yet simple example. It is a convoluted version
 of the famous minuet in J. S. Bach's @emph{Klavierb@"uchlein}. The file
@@ -409,9 +461,10 @@ We will analyse the input, line by line.
         % all text after a percent sign is a comment
         % and is ignored by Lilypond
 @end example 
-The percent sign, @code{%}, introduces a line comment.  You can also
-comment out a block of several lines, by enclosing them in
-@code{%@{} and @code{%@}}.
+Percent signs introduce comments: everything after a percent sign is
+ignored. You can use this to write down mental notes to yourself.  You
+can also make longer comments by enclosing text in @code{%@{} and
+@code{%@}}.
 @cindex comment
 @cindex block comment
 @cindex line comment
@@ -424,11 +477,10 @@ comment out a block of several lines, by enclosing them in
 @cindex @code{\include}
 @cindex point, printer's
 @cindex staff size setting 
-By default, LilyPond will typeset the music in a size such that each 
-staff is 20 point@footnote{A point is the standard measure of length for
-printing; one point is 1/72.27 inch.} high.  We want smaller
-output (16 point staff height), so we must import the settings for that
-size, which is done here.
+By default, LilyPond will typeset the music in a size such that each
+staff is 20 point (0.7 cm, or 0.27 inch) high.  We want smaller output
+(16 point staff height), so we must import the settings for that size,
+which is done here.
 @separate
 @example 
 
@@ -603,8 +655,8 @@ you want beamed.
  
 @end example
 @cindex augmentation dot
-@cindex dot
-A period adds an augmentation dot to the note.
+@cindex dotted note
+A period adds a dot to the note.
 @separate
 @example 
 
@@ -1138,7 +1190,10 @@ For example,  the following file (@file{miniatures.ly})
 
 @example
 \version "1.3.124"
-\header @{ title = "Two miniatures"  @}
+\header @{
+  title = "Two miniatures"
+  tagline = "small is beautiful"
+@}
 
 #(set! point-and-click line-column-location)
 
@@ -1188,39 +1243,11 @@ Opus 2.
 @end lilypond
 
 This file is produced by ly2dvi in a few stages, with the help of text
-formatting tools. LilyPond produces two output files, @file{miniatures.tex}
-and @file{miniatures-1.tex}.  They both look like this:
-
-@example
-        ...
-  \placebox@{-5  \outputscale @}%
-  @{  8.7229  \outputscale @}%
-  @{\magfontWXGEomMMBo\char90 @}%
-  
-  \placebox@{-4  \outputscale @}%
-  @{ 81.0647  \outputscale @}%
-        ...
-@end example
-
-@file{ly2dvi} looks at what output LilyPond produces, and generates a
-file called @file{ly2dvi.out.tex}. This file contains formatting
-instructions for the title and page layout.  A fragment might look like
-
-@example
-
-        \def\lilypondopus@{Opus 1.@}
-        \def\lilypondpiece@{Up@}
-        \def\mustmakelilypondtitle@{@}
-        \input miniatures.tex
-        \def\lilypondtitle@{Two miniatures@}
-
-@end example
-
-@file{ly2dvi} runs it through LaTeX. LaTeX is a text-formatting system
-built on top of @TeX{}. It's very popular in the academic world. If LaTeX
-is successful, this will produce a @file{.dvi} file, containing both the
-titling and the actual music.  @code{ly2dvi} completes its task by
-deleting the two temporary files, leaving only @file{miniatures.dvi}.
+formatting tools. LilyPond produces two output files,
+@file{miniatures.tex} and @file{miniatures-1.tex}.  Both files contain
+only graphical music notation. @file{ly2dvi} looks at what output
+LilyPond produces, and adds page layout and titling to those files.  The
+result is a DVI file called @file{miniatures.dvi}.
 
 Next, now we'll look at the example line by line to explain new things.
 
@@ -1240,10 +1267,19 @@ version.
 
 @separate
 @example
-  \header @{ title = "Two miniatures"  @}
+  \header @{
+    title = "Two miniatures"  @}
 @end example
 This sets the titling information for the entire file.
-
+@separate
+@example
+    tagline = "small is beautiful" 
+@end example
+A signature line is printed at the bottom of the last page.
+ This signature is produced from the @code{tagline} field of
+@code{\header}.  Many people find the default "Lily was here,
+@var{version number}" too droll. If that is the case,  assign
+something else to @code{tagline}, as shown above.
 @separate
 @example
         #(set! point-and-click line-column-location)
@@ -1257,7 +1293,7 @@ Editing input files can be quite complicated if you're working with
 large files: if you're digitizing existing music, you have to
 synchronize the .ly file, the sheet music on your lap and the sheet
 music on the screen.  The point-and-click mechanism makes it easy to
-find the origin of an error in the .ly file: when you view the file with
+find the origin of an error in the LY file: when you view the file with
 Xdvi and click on a note, your editor will jump to the spot where that
 note was entered.  For more information, see @ref{Point and click}.
 
@@ -1300,8 +1336,8 @@ get @code{c} @code{c,} @code{c,,} etc.  Going up, you get @code{c''}
 
 When you're copying music from existing sheet music, relative octaves
 are probably the easiest to use: it's less typing work and errors are
-easily spotted. However, if you write LilyPond input, either by hand
-(ie. composing) or by computer, absolute octaves are probably less work.
+easily spotted. However, if you write LilyPond input directly, either by
+hand (i.e. composing) or by computer, absolute octaves are easier to use.
 
 
 @separate
@@ -2306,8 +2342,8 @@ The @code{printfilename} option adds the file name to the output.
 That's all folks.  From here, you can either try fiddling with input
 files, or you can read the reference manual.  You can find more example
 files in @file{input} and @file{input/test}.  You can also look at some
-real music.  Have a look at the @uref{Mutopia project,
-http://www.mutopiaproject.org}.
+real music.  The website @uref{http://www.mutopiaproject.org} has many
+examples of real music typeset by LilyPond.
 
 
 
diff --git a/input/regression/dot-flag-collision.ly b/input/regression/dot-flag-collision.ly
new file mode 100644 (file)
index 0000000..ec6d6c8
--- /dev/null
@@ -0,0 +1,9 @@
+
+\header {
+texidoc = "Stems are extended if flags and dots collide."
+}
+       
+\score{
+  \notes\relative c'{ f8. g f16. g f32. g}
+}
+
diff --git a/input/regression/tuplet-beam.ly b/input/regression/tuplet-beam.ly
new file mode 100644 (file)
index 0000000..51b0889
--- /dev/null
@@ -0,0 +1,13 @@
+\header {
+
+texidoc = "In combination with a beam, the bracket of the tuplet
+bracket is removed. This only happens if there is one beam, as long as
+the bracket."
+
+}
+
+\score { \notes \context Voice\relative c'' {
+\times 2/3 { r [c8 c8] }
+\times 2/3 { [c8 c c] }
+\times 2/3 { [c16 c16] [c8 c8] }
+}}
diff --git a/input/regression/tuplet-staffline-collision.ly b/input/regression/tuplet-staffline-collision.ly
new file mode 100644 (file)
index 0000000..18399df
--- /dev/null
@@ -0,0 +1,13 @@
+\header {
+
+texidoc = "Horizontal tuplet brackets are shifted vertically
+to avoid staff line collisions."
+
+}
+
+\score { \notes \context Voice\relative c'' {
+\times 2/3 { b'4 b b }
+\times 2/3 { f4 f f }
+\times 2/3 { g4 g g }
+\times 2/3 { a4 a a }
+}}
index 79392324519f9a6fa5df5b54a945722c1a94d509..e1e46fe0944aed49f3374624a74dc3edf322fb6d 100644 (file)
@@ -1,5 +1,8 @@
 \version "1.3.138"
-\header { title = "Two miniatures" }
+\header {
+  title = "Two miniatures"
+  tagline = "Small is beatiful"
+}
 
 #(set! point-and-click line-column-location)
 
index 5c0ae795180a2282a5e0150e3b1567b43854e175..792caf0d3ea6a9e2f323a9e4af24454c14c9f706 100644 (file)
@@ -39,6 +39,14 @@ Collision::force_shift_callback (SCM element_smob, SCM axis)
 
 /*
   TODO: make callback of this.
+
+  TODO:
+
+  note-width is hardcoded, making it difficult to handle all note
+  heads sanely. We should really look at the widths of the colliding
+  columns, and have a separate setting for "align stems".
+
+  
  */
 void
 Collision::do_shifts (Grob* me)
@@ -47,7 +55,8 @@ Collision::do_shifts (Grob* me)
   SCM hand (forced_shift (me));
   
   Link_array<Grob> done;
-  
+
+
   Real wid
     = gh_scm2double (me->get_grob_property ("note-width"));
   
index 09c15b567969faf314cdc2b9474668ae94849610..3dbc09ac45b1668901b8b7e7b4f6f61c0cdfcd8a 100644 (file)
@@ -291,8 +291,33 @@ Stem::get_default_stem_end_position (Grob*me)
       && (get_direction (me) != get_default_dir (me)))
     length_f -= shorten_f;
 
+  Interval hp = head_positions (me);  
+  Real st = hp[dir] + dir * length_f;
+  
+  /*
+    Make a little room if we have a flag and there is a dot.
+
+    TODO:
+
+    maybe  we should consider moving the dot to the right?
+  */
+
+  if (!beam_l (me)
+      && flag_i (me))
+    {
+      Grob * closest_to_flag = extremal_heads (me)[dir];
+      Grob * dots = closest_to_flag
+       ? Rhythmic_head::dots_l (closest_to_flag ) : 0;
 
-   Real st = head_positions (me)[dir] + dir * length_f;
+      if (dots)
+       {
+         Real dp = Staff_symbol_referencer::position_f  (dots);
+         Real flagy =  flag (me).extent (Y_AXIS)[-dir] * 2; // should divide by staffspace
+         
+         if (dir * (st + flagy -  dp) < 0) 
+           st += (fabs (st + flagy -  dp) + 1.0) *dir;
+       }
+    }
   
    bool no_extend_b = to_boolean (me->get_grob_property ("no-stem-extend"));
    if (!grace_b && !no_extend_b && dir * st < 0) // junkme?
@@ -485,7 +510,6 @@ Stem::brew_molecule (SCM smob)
       y_attach = head_height.linear_combination (y_attach);
       stem_y[Direction (-d)] += d * 2*y_attach;
     }
-
   
   if (!invisible_b (me))
     {
index f3ec69bc998bde30e4af057026a3b5505eda1df9..a21a2a4959e49e99644ef5956be601910685bdf5 100644 (file)
@@ -6,6 +6,7 @@
   (c)  1997--2001 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
+#include <math.h>
 
 #include "beam.hh"
 #include "box.hh"
@@ -22,6 +23,7 @@
 #include "group-interface.hh"
 #include "directional-element-interface.hh"
 #include "spanner.hh"
+#include "staff-symbol-referencer.hh"
 
 /*
   TODO:
@@ -45,9 +47,26 @@ Tuplet_bracket::brew_molecule (SCM smob)
 {
   Grob *me= unsmob_grob (smob);
   Molecule  mol;
+  Link_array<Grob> column_arr=
+    Pointer_group_interface__extract_elements (me, (Grob*)0, "columns");
+
+
+  if (!column_arr.size ())
+    return mol.smobbed_copy ();
+
+
+  Grob *b1 = Note_column::stem_l (column_arr[0]); 
+  Grob *b2 = Note_column::stem_l (column_arr.top());    
+
+  b1 = b1 ? Stem::beam_l (b1) : 0;
+  b2 = b2 ? Stem::beam_l (b2) : 0;
+
+  
+  Spanner*sp = dynamic_cast<Spanner*> (me);  
 
   // Default behaviour: number always, bracket when no beam!
-  bool par_beam = to_boolean (me->get_grob_property ("parallel-beam"));
+  bool par_beam = b1 && (b1 == b2) && !sp->broken_b() ;
+  
   bool bracket_visibility = !par_beam;
   bool number_visibility = true;
 
@@ -67,52 +86,46 @@ Tuplet_bracket::brew_molecule (SCM smob)
   else if (bracket == ly_symbol2scm ("if-no-beam"))
     number_visibility = !par_beam;
   
-  if (gh_pair_p (me->get_grob_property ("columns")))
-    {
-      Link_array<Grob> column_arr=
-       Pointer_group_interface__extract_elements (me, (Grob*)0, "columns");
        
-      Real ncw = column_arr.top ()->extent (column_arr.top (), X_AXIS).length ();
-      Real w = dynamic_cast<Spanner*> (me)->spanner_length () + ncw;
-
-      Real staff_space = 1.0;
-      Direction dir = Directional_element_interface::get (me);
-      Real dy = gh_scm2double (me->get_grob_property ("delta-y"));
-      SCM number = me->get_grob_property ("text");
-      if (gh_string_p (number) && number_visibility)
-       {
-         SCM properties = Font_interface::font_alist_chain (me);
-         Molecule num = Text_item::text2molecule (me, number, properties);
-         num.align_to (X_AXIS, CENTER);
-         num.translate_axis (w/2, X_AXIS);
-         num.align_to (Y_AXIS, CENTER);
-         num.translate_axis (dir * staff_space, Y_AXIS);
+  Real ncw = column_arr.top ()->extent (column_arr.top (), X_AXIS).length ();
+  Real w = sp->spanner_length () + ncw;
+
+  Direction dir = Directional_element_interface::get (me);
+  Real dy = gh_scm2double (me->get_grob_property ("delta-y"));
+  SCM number = me->get_grob_property ("text");
+  if (gh_string_p (number) && number_visibility)
+    {
+      SCM properties = Font_interface::font_alist_chain (me);
+      Molecule num = Text_item::text2molecule (me, number, properties);
+      num.align_to (X_AXIS, CENTER);
+      num.translate_axis (w/2, X_AXIS);
+      num.align_to (Y_AXIS, CENTER);
        
-         num.translate_axis (dy/2, Y_AXIS);
+      num.translate_axis (dy/2, Y_AXIS);
 
-         mol.add_molecule (num);
-       }
+      mol.add_molecule (num);
+    }
       
-      if (bracket_visibility)      
-       {
-         Real  lt =  me->paper_l ()->get_var ("stafflinethickness");
+  if (bracket_visibility)      
+    {
+      Real  lt =  me->paper_l ()->get_var ("stafflinethickness");
          
-         SCM thick = me->get_grob_property ("thick");
-         SCM gap = me->get_grob_property ("number-gap");
+      SCM thick = me->get_grob_property ("thick");
+      SCM gap = me->get_grob_property ("number-gap");
          
-         SCM at =gh_list (ly_symbol2scm ("tuplet"),
-                         gh_double2scm (1.0),
-                         gap,
-                         gh_double2scm (w),
-                         gh_double2scm (dy),
-                         gh_double2scm (gh_scm2double (thick)* lt),
-                         gh_int2scm (dir),
-                         SCM_UNDEFINED);
-
-         Box b;
-         mol.add_molecule (Molecule (b, at));
-       }
+      SCM at =gh_list (ly_symbol2scm ("tuplet"),
+                      gh_double2scm (1.0),
+                      gap,
+                      gh_double2scm (w),
+                      gh_double2scm (dy),
+                      gh_double2scm (gh_scm2double (thick)* lt),
+                      gh_int2scm (dir),
+                      SCM_UNDEFINED);
+
+      Box b;
+      mol.add_molecule (Molecule (b, at));
     }
+
   return mol.smobbed_copy ();
 }
 
@@ -175,6 +188,29 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy)
       if (notey * d > (*offset + tuplety) * d)
        *offset = notey - tuplety; 
     }
+
+  // padding
+  *offset +=  1.0 *d;
+
+  
+  /*
+    horizontal brackets should not collide with staff lines.
+
+    
+   */
+  if (*dy == 0)
+    {
+      // quantize, then do collision check.
+      Real ss= Staff_symbol_referencer::staff_space (me);
+      *offset *= 2 / ss;
+      
+      *offset = rint (*offset);
+      if (Staff_symbol_referencer::on_staffline (me, (int) rint (*offset)))
+       *offset += d;
+
+      *offset *= 0.5 * ss;
+    }
+  
 }
 
 /*
@@ -201,8 +237,6 @@ Tuplet_bracket::after_line_breaking (SCM smob)
   Grob * me = unsmob_grob (smob);
   Link_array<Note_column> column_arr=
     Pointer_group_interface__extract_elements (me, (Note_column*)0, "columns");
-  Spanner *sp = dynamic_cast<Spanner*> (me);
-
 
   if (!column_arr.size ())
     {
@@ -224,17 +258,6 @@ Tuplet_bracket::after_line_breaking (SCM smob)
   me->set_grob_property ("delta-y", gh_double2scm (dy));
 
   me->translate_axis (offset, Y_AXIS);
-  
-  if (scm_ilength (me->get_grob_property ("beams")) == 1)
-    {
-      SCM bs = me->get_grob_property ("beams");
-      Grob *b = unsmob_grob (gh_car (bs));
-      Spanner * beam_l = dynamic_cast<Spanner *> (b);
-      if (!sp->broken_b () 
-         && sp->get_bound (LEFT)->column_l () == beam_l->get_bound (LEFT)->column_l ()
-         && sp->get_bound (RIGHT)->column_l () == beam_l->get_bound (RIGHT)->column_l ())
-       me->set_grob_property ("parallel-beam", SCM_BOOL_T);
-    }
   return SCM_UNSPECIFIED;
 }
 
@@ -265,13 +288,6 @@ Tuplet_bracket::get_default_dir (Grob*me)
   return d;
 }
 
-void
-Tuplet_bracket::add_beam (Grob*me, Grob *b)
-{
-  me->add_dependency (b);
-  Pointer_group_interface::add_element (me, "beams",b);
-}
-
 void
 Tuplet_bracket::add_column (Grob*me, Item*n)
 {
index 0e7d238247e9a529c9ea35a334c7542ef9a36286..992ce316728a3c852fddfcfcd5e8a343e99fe56d 100644 (file)
@@ -108,22 +108,6 @@ Tuplet_engraver::acknowledge_grob (Grob_info i)
        if (started_span_p_arr_[j]) 
          Tuplet_bracket::add_column (started_span_p_arr_[j], dynamic_cast<Item*> (i.elem_l_));
     }
-  else if (Beam::has_interface (i.elem_l_))
-    {
-      /*
-       TODO:
-       
-       ugh, superfluous. Should look at
-
-       tuplet -> note-column -> stem -> beam
-
-       to find the beam(s) of a tuplet
-       */
-      
-      for (int j = 0; j < started_span_p_arr_.size (); j++)
-       if (started_span_p_arr_[j]) 
-         Tuplet_bracket::add_beam (started_span_p_arr_[j],i.elem_l_);
-    }
 }
 
 void
index 7be674ce323fbe4c46e906dc6e432ff77b123199..d60d56c977edabcb1122f406f8b4f86e8367e391 100644 (file)
@@ -37,14 +37,14 @@ if test = 0:
        input feta-accordion;
        input feta-custodes;    
 else:
-%      input feta-bolletjes;   
-%      input feta-banier;
+       input feta-bolletjes;   
+       input feta-banier;
 %      input feta-eindelijk;
 %      input feta-klef;
 %      input feta-toevallig;
 %      input feta-schrift;
 %      input feta-haak;
-       input feta-timesig;
+       %input feta-timesig;
 %      input feta-pendaal;
 %      input feta-accordion;
 fi
diff --git a/mf/graylj.mf b/mf/graylj.mf
new file mode 100644 (file)
index 0000000..45b2347
--- /dev/null
@@ -0,0 +1,9 @@
+% Gray font for LJ with proofsheet resolution 150 pixels per inch.
+% Each pixel is represented by a 4x4 square, with 4/16 of the dots on.
+
+
+font_identifier "GRAYLJ";
+
+boolean lightweight;
+
+input grayf
index 154fa206c0effa5275f6ca9deab6324ea1cc1d61..2ed8afd58351e8f2b2acb63d05c263fc69d1ebfd 100644 (file)
        tuplet_dy tuplet_dx div tuplet_gapx mul /tuplet_gapy exch def 
 
 
-       0 0 moveto 
-       0 tuplet_h dir mul lineto  
+       0 tuplet_h neg dir mul moveto 
+       0 0 lineto  
        tuplet_dx tuplet_gapx sub 2 div  
-               tuplet_dy tuplet_gapy sub 2 div tuplet_h dir mul add lineto 
+               tuplet_dy tuplet_gapy sub 2 div  lineto 
        tuplet_dx tuplet_gapx add 2 div  
-               tuplet_dy tuplet_gapy add 2 div tuplet_h dir mul add moveto 
-       tuplet_dx tuplet_dy tuplet_h dir mul add lineto 
+               tuplet_dy tuplet_gapy add 2 div  moveto 
        tuplet_dx tuplet_dy lineto 
+       tuplet_dx tuplet_dy tuplet_h dir neg mul add lineto 
        stroke 
 } bind def 
 
-/difficult_draw_ez_ball % ch letter_col ball_col font
+/draw_ez_ball % ch letter_col ball_col font
 {
        % font
        findfont 0.7 scalefont setfont 
 } bind def
 
 % Simple, but does it work everywhere?
+% Han-Wen reports that one printer (brand?) at cs.uu.nl chokes on this,
+% reverted for now -- jcn
+%
 % The filled circles are drawn by setting the linewidth
-% to 2*radius and drawing a point.  Is that (defined to be)
-% a nice filled circle?
-/draw_ez_ball % ch letter_col ball_col font
+% to 2*radius and drawing a point.
+/simple_draw_ez_ball % ch letter_col ball_col font
 {
        % font
        findfont 0.85 scalefont setfont
index 8c82d0f14672e63ab0385fefb03e1bf9420ac3ee..f9625ff1d56dc970c96738b87da695b1414f2f4f 100644 (file)
@@ -88,8 +88,8 @@
     (if (equal? "8" (substring cl (- l 1) l))
        (begin
        (if (equal? "^" (substring cl (- l 2) (- l 1)))
-           (set! oct 7)
-           (set! oct -7))
+           (set! oct -7)
+           (set! oct 7))
        
        (set! cl (substring cl 0 (- l 2)))))
 
index ceb0bb95a382dc90803d2925ae9c76ac0c06fcc0..10f9462a33349ef00764666dc01f5a9263246b59 100644 (file)
@@ -245,13 +245,11 @@ object."
  'tuplet-bracket-interface
  "A bracket with a number in the middle, used for tuplets." 
  '(
-   beams 
    columns 
    number-gap 
    delta-y 
    tuplet-bracket-visibility 
    tuplet-number-visibility 
-   parallel-beam 
    thick 
    ))