]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.9
authorfred <fred>
Tue, 26 Mar 2002 21:44:41 +0000 (21:44 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:44:41 +0000 (21:44 +0000)
32 files changed:
Documentation/footer.html.in [new file with mode: 0644]
Documentation/tex/refman.yo
Documentation/topdocs/index.yo
TODO
aclocal.m4
init/engraver.ly
init/table16.ly
init/table20.ly
input/test/repeat.ly [new file with mode: 0644]
input/test/star.ly
input/test/vertical-text.ly
lily/include/lily-proto.hh
lily/include/lyric-engraver.hh
lily/include/music-list-iterator.hh [new file with mode: 0644]
lily/include/repeated-music-iterator.hh
lily/include/sequential-music-iterator.hh
lily/include/simultaneous-music-iterator.hh [new file with mode: 0644]
lily/lookup.cc
lily/lyric-engraver.cc
lily/music-iterator.cc
lily/music-list-iterator.cc [new file with mode: 0644]
lily/parser.yy
lily/repeat-engraver.cc
lily/repeated-music-iterator.cc
lily/simultaneous-music-iterator.cc [new file with mode: 0644]
lily/text-def.cc
lily/text-item.cc
mf/feta-beugel.mf
stepmake/aclocal.m4
stepmake/bin/add-html-footer.py
stepmake/bin/packagepython.py
tex/fetdefs.tex

diff --git a/Documentation/footer.html.in b/Documentation/footer.html.in
new file mode 100644 (file)
index 0000000..4f0a023
--- /dev/null
@@ -0,0 +1,27 @@
+<!if this file ./Documentation/footer.html.in is present, it is included>
+<!automatically by add-html-footer, and replaces the simple standard footer>
+<!substitutions: package.Name, package.Name, ENV:WEBMASTER, ENV:WEBMASTER>
+<hr>
+Return to <a href=%s>%s's home page</a>.
+<p>
+Please send GNU LilyPond questions and comments to 
+
+<a href="mailto:gnu-music-discuss@gnu.org">
+<em>gnu-music-discuss@gnu.org</em></a>.
+<p>
+
+Please send comments on these web pages to 
+
+<a href="mailto:%s"><em>%s</em></a>,
+send other FSF &amp; GNU inquiries and questions to 
+
+<a href="mailto:gnu@gnu.org"><amp>gnu@gnu.org</em></a>.<p>
+<p>
+<!Copyright (C) 1998 Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA  02111,  USA>
+<!hmm, is this ok?>
+Copyright (c) 1997, 1998 Han-Wen Nienhuys and Jan Nieuwenhuizen.
+<p>
+Verbatim copying and distribution of this entire article is 
+permitted in any medium, provided this notice is preserved.<p>
+
index 7a2e4ec17a0f575602658950b3197a47b4a7f0c1..574362f31b5d26dfe1ece8a18515315b78af3aa6 100644 (file)
@@ -15,6 +15,12 @@ TODO:
    the explanation of how lyrics mode parses words seems ridiculous.  
      Is there a simple way to explain this, or is the behavior
      too complicated for a reasonable explanation?
+   \relative and \tranpose and \times make it necessary to specify
+       an explicit \type staff, or bizarre things happen. 
+   catalan.ly
+   accordion symbols
+   extender*  (see extender.ly)
+   \repeat & \alternative  -> probably should have an example
 )
 
 
@@ -40,7 +46,7 @@ latexlayoutcmds(
 
 whentexinfo(notableofcontents())
 
-article(Mudela 1.0.7 / LilyPond 1.0.15 Reference Manual)
+article(Mudela 1.0.7 / LilyPond 1.1.8 Reference Manual)
       (Adrian Mariano, Han-Wen Nienhuys and Jan Nieuwenhuizen)
       (nop()PIPETHROUGH(date "+%B %d, %Y")()()nop())
 
@@ -113,6 +119,11 @@ file(init.)var(ext) and process this file.  The file
 file(init.)var(ext) must contain the code(\maininput) keyword or LilyPond
 will not read the user specified file.
 
+When LilyPond processes file(filename.ly) it will produce file(filename.tex) as
+output.  If file(filename.ly) contains a second code(\paper) keyword, then
+LilyPond will produce file(filename-1.tex) as well.  Subsequent code(\paper)
+keywords will produces sequentially numbered file names.  Several files can be
+specified; they will each be processed independently.
 
 sect(Syntax)
 
@@ -213,16 +224,16 @@ will only be able to refer to identifiers whose names begin with a
 letter and are entirely alphanumeric.  It is also impossible to refer
 to an identifier whose name is the same as the name of a keyword.  The
 following words are keywords:
-verb(absdynamic   header         musicalpitch   remove         times
-accepts      in             name           score          translator
-bar          include        notenames      script         transpose 
-cadenza      key            notes          shape          type      
-clef         keysignature   paper          skip                  version   
-cm           lyrics         partial        spandynamic 
-consists     maininput      penalty        symboltables
-duration     mark           property       table       
-font         midi           pt             tempo       
-grouping     mm             relative       time)
+verb(absdynamic    grouping       mm              relative     symboltables
+accepts       header         musicalpitch    remove       table
+alternative   in             name            repeat       tempo
+bar           include        notenames       scm          time
+cadenza       key            notes           scmfile      times
+clef          keysignature   paper           score        translator
+cm            lyrics         partial         script       transpose
+consists      maininput      penalty         shape        type
+duration      mark           property        skip         version
+font          midi           pt              spandynamic)
 
 The right hand side of an identifier assignment is parsed completely
 when the assignment is made.  It therefore must have any context
@@ -332,6 +343,11 @@ Leise DOEXPAND(Fl\)DOEXPAND("u\)ss{}teren meine Sapfe       % 4 words
 _ _ _ _         % 4 words, each one a space
 ))
 
+It is possible to create words that break the rules by prefixing them with the
+dollar sign code($).  Regardless of the context, a word beginning with code($)
+extends until the next white space character.  Such words can contain numbers
+(even in Note mode), or other forbidden characters.  The dollar sign can be
+used to create and access identifiers that could not otherwise be used.  
 
 COMMENT(
 These modes are of a lexical nature. Normal and Note mode largely
@@ -454,6 +470,10 @@ code([) and code(]).
 mudela(fragment,verbatim,center)(
 [a'8 a'] [a'16 a' a' a']
 )
+If you want to put beams over chords, you will find that the obvious
+construction does not work.  You must do the following:
+mudela(fragment,verbatim,center)(<[a'8 c''> b' <c'' e''> <a' c'']>)
+The bracket characters must appear immediately adjacent to a note. 
 
 In order to create triplets, you must use a length multiplier after
 the brackets.  An open bracket code([) followed by a fraction
@@ -529,13 +549,13 @@ mudela()(
           c''-\open  c''-\flageolet  c''-\reverseturn 
           c''-\trill
           c''-\prall c''-\mordent c''-\prallprall  c''-\prallmordent
-          c''-\upprall c''-\downprall }
+          c''-\upprall c''-\downprall c''-\thumb}
   \type Lyrics \lyrics{  
         accent      marcato      staccatissimo fermata stopped
            staccato tenuto upbow downbow lheel rheel ltoe rtoe  turn
            open  flageolet reverseturn 
              trill  prall
-           mordent prallprall prallmordent uprall  downprall }>
+           mordent prallprall prallmordent uprall  downprall thumb}>
   \paper{linewidth  = 5.875\in;
          indent = 0.0;
         }
@@ -576,6 +596,13 @@ code(\rc).  A decrescendo mark is started with code(\decr) and
 terminated with code(\rced).  There are also shorthands for these
 marks.  A crescendo can be started with code(\<) and a decrescendo can
 be started with code(\>).  Either one can be terminated with code(\!).
+Note that code(\!) must go before the last note of the dynamic mark whereas
+code(\rc) and code(\rced) go after the last note.  Because these marks are
+bound to notes, if you want to get several marks during one note, you must use
+spacer notes. 
+mudela(fragment,verbatim,center)(
+c'' \< \! c''   d'' \decr e'' \rced 
+< f''1 {s4 \< \! s4 \> \! s2 } >)
 
 Tremolo marks can be printed by a note by adding code(:)[var(length)]
 after the note.  The length must be at least 8.  A var(length) value
@@ -868,6 +895,9 @@ dit(code(\accepts) var(string)code(;)) This keyword can appear only within a
 code(\translator) block.  It specifies what contexts are allowed with the
 context that is being defined.  See Section ref(translators).  
 
+dit(code(\alternative) code({) var(music1) var(music2) ... code(}))
+Specifies alternative endings.  Must come after a code(\repeat) keyword.  
+
 dit(code(\bar) var(bartype)code(;)) Prints a special bar symbol, or at
 measure boundaries, replaces the regular bar symbol with a special
 symbol.  The argument var(bartype) is a string which specifies the
@@ -906,6 +936,7 @@ mudela(center)(
 mudela(center)(
 \score{
   \notes{\cadenza 1; \clef alto;    c'4_"\kern -10mm alto"
+           \clef scarlatti;    c'4_"\kern -4mm scarlatti"
            \clef mezzosoprano; c'4^"\kern -10mm mezzosoprano"
            \clef soprano;  c'4_"\kern -10mm soprano"
            \clef treble;  c'4^"\kern -6mm treble"
@@ -943,8 +974,9 @@ Specifies information about the music.  A header should appear at the
 top of the file describing the file's contents.  If a file has
 multiple code(\score) blocks, then a header should appear in
 each score block describing its contents.  Tools like code(ly2dvi) can
-use this information for generating titles.   Some possible key values
-are: title, opus, description, composer, enteredby, and copyright.
+use this information for generating titles.   Key values that are used
+by ly2dvi are: title, subtitle, composer, opus, poet, instrument,
+metre, arranger, and piece.  
 
 dit(code(\in)) Specify a dimension in inches.  
 
@@ -1041,6 +1073,16 @@ dit(code(\remove) var(string)code(;)) Can appear only in a
 code(\translator) block.  Specifies that a performer or engraver named
 var(string) should be removed.  See Section ref(translators).  
 
+dit(code(\repeat) var(count) code({) var(music) code(}))
+Repeats the specified
+music var(count) times.  Alternative endings can be specified by adding a
+code(\alternative) keyword after the code(\repeat).  
+
+dit(code(\scm) var(scheme)code(;)) Embeds specified Scheme code.  
+
+dit(code(\scmfile) var(filename)code(;)) Reads Scheme code from the specified
+file.  
+
 dit(code(\score) var(statementlist)) Create a Score context.  This
 is the top level notation context.  
 COMMENT(this still needs work)
@@ -1256,6 +1298,10 @@ direction, set to code(\up) to force slurs up, set to code(\down) to
 force slurs down.  The shorthands code(\slurup), code(\slurdown), and
 code(\slurboth) are available.
 
+dit(code(tieYDirection)) Set to code(\free) for free choice of tie
+direction, set to code(\up) to force ties up, set to code(\down) to
+force ties down.  
+
 dit(code(slurdash)) Set to 0 for normal slurs, 1 for dotted slurs, and
 a larger value for dashed slurs.  Identifiers code(\slurnormal) and
 code(\slurdotted) are predefined to set the first two settings.
@@ -1786,9 +1832,6 @@ dit(code(Local_key_engraver))
 dit(code(Lyric_engraver)) Engraves lyrics.  Normally in code(LyricVoice).
 dit(code(Multi_measure_rest_engraver)) Engraves multi-measure rests that are
 produced with code(R).  Normally in code(Voice).
-dit(code(Note_heads_engraver)) Engraves note heads.  Normally in code(Voice).
-Removing this gives a fatal error.  
-COMMENT(Perhaps should be Note_head_engraver)
 dit(code(Piano_bar_engraver))
 dit(code(Pitch_squash_engraver)) Treat all pitches as middle C.  Used in
 code(RhythmicStaff).  Note that the notes move, but the locations of
@@ -1799,6 +1842,8 @@ dit(code(Plet_swallow_engraver)) Swallows tuplet requests without any output.
 In code(LyricVoice).  
 COMMENT( Should this be named Plet_req_swallow_translator? )
 dit(code(Priority_horizontal_align_engraver))
+dit(code(Repeat_engraver)) Handles repeats? In code(Staff) and 
+   code(RhythmicStaff).
 dit(code(Rest_collision_engraver)) Handles collisions of rests. In code(Staff).
 dit(code(Rest_engraver)) Engraves rests.  Normally in code(Voice).
 dit(code(Rhythmic_column_engraver))
@@ -1824,6 +1869,7 @@ code(Staff) and code(RhythmicStaff).
 dit(code(Timing_engraver)) Responsible for synchronizing timing information
 from staffs.  Normally in code(Score).  In order to create polyrhythmic music,
 this engraver should be removed from code(Score) and placed in code(Staff).
+dit(code(Tuplet_engraver)) Engraves tuplet brackets?  In code(Staff).
 dit(code(Vertical_align_engraver)) 
 )
 
index bf386aa4b421c78924185bf95a5f6665c83c58cb..11eb7166ed83119ec26c682ab240e5861ac09965 100644 (file)
@@ -4,7 +4,7 @@ DEFINEMACRO(pic)(1)(url(ARG1)(DOEXPAND(docdir)/pictures/DOEXPAND(outdir)/ARG1.pn
 ))
 
 DEFINEMACRO(beginbold)(0)(whenhtml(htmlcommand(<font size=4><strong>)))
-DEFINEMACRO(endbold)(0)(whenhtml(htmlcommand(</strong><font size=3>)))
+DEFINEMACRO(endbold)(0)(whenhtml(htmlcommand(</strong></font>)))
 redef(htmlnewfile)(0)()
 setchapterstring()
 
diff --git a/TODO b/TODO
index 52d614df1ad9e2b4ebf5a1ef24d207f50f247d32..587a96c2e50ff7776512a6a5ad536c71f4272d24 100644 (file)
--- a/TODO
+++ b/TODO
@@ -6,11 +6,22 @@ done, or is an idea that I want to think about
 Most of the items are marked in the code as well, with full explanation. 
 grep for TODO and ugh/ugr/urg
 
-
 BUGS:
-
        * gallina barlines.
 
+       * fix height of / collisions with lyrics (chords), 
+          see input/test/vertical-text.ly
+
+       * repeat/volta:
+         - one volta spanner per score
+         - repeat bars span staffs
+         - placement alternative number
+         - dimensions of volta bracket
+
+       * who is trying to print too (small/big) piano braces all the time?
+           warning: piano brace too small (16.000pt)
+
+
        * latex bla.tex broken (titles / \lilyfooter stuff?)
 
        * msgfmt -o check?
@@ -34,19 +45,17 @@ BUGS:
        * space after bars?
 
        * [/3 c8 c16 c c c]/1
-  
+
        * fix singleStaffBracket
-  
+
        * repeat bars: need distance after ":|" and before "|:"
 
        * The time signature warnings still remain, will be fixed later.
 
-       Summary of minor spelling irregularities:
+ii     Summary of minor spelling irregularities:
        -  capitalization/use of underscores in property names
 
-       * fix Score.skipBars
-
-       * repeat bars: need distance after ":|" and before "|:"
+       * fix SkipBars  -> skipBars
 
        * \shape 1st dim skipped? 
 
@@ -67,6 +76,9 @@ BUGS:
        portato= \script { "portato" 0 -1 0 1 0 }
 
 STUFF
+       * uniformise recent feta contributions.
+
+       * check out legal/(c) matters for scores.
 
        * move option processing out of gh_enter
 
@@ -95,8 +107,6 @@ STUFF
 
        * revise documentation
 
-       * abbrev -> tremolo
-
        * junking \skip req in lyrics
 
        * Language:
@@ -227,6 +237,7 @@ ydirection and hshift preset
        * rename
          - plet -> tuplet
          - measure -> bar
+         - abbrev -> tremolo
          - abbreviation-beam -> (measured/unmeasured) tremolo
          - partial -> anacrouse
 
@@ -418,7 +429,7 @@ PROJECTS
        * add to MIDI output:
        - tempo change
        - ornaments (and trills?)
-       - repeat
+       - repeat/volta
        - slurs
        - accents
        - dynamics
@@ -531,8 +542,6 @@ INPUTLANGUAGE
 
        * relative mode for pitch entering
 
-       * bracket: volta 1,2
-
        * configure pitch_byte
 
        * rest name configurable
@@ -597,8 +606,6 @@ SMALLISH PROJECTS
 
        * revise calcideal
 
-       * volta
-
 IDEAS
 
        * Output data structures of Mudela in XML/SGML.
index 46b9e1839eecc088acb67b1fe009ca9d39cd9dc0..50748a506a352e63f39f83ebfb3dccd1922190f4 100644 (file)
@@ -170,7 +170,7 @@ AC_DEFUN(AC_STEPMAKE_GUILE, [
       AC_CHECK_LIB(guile, scm_boot_guile)\
     )
     if test "$ac_cv_lib_guile_scm_shell" != yes -a \
-      "$ac_cv_lib_scm_boot_guile" != yes ; then
+      "$ac_cv_lib_guile_scm_boot_guile" != yes ; then
            AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
     fi
 ])
index 81f5312937732f34714964b6bbbfa4aa82175121..078a6211ac5bce3685b987ad36df7457ed20675d 100644 (file)
@@ -15,16 +15,16 @@ StaffContext=\translator {
 %}
 %      \type "Hara_kiri_line_group_engraver";
 
+       \consists "Repeat_engraver";
        \consists "Bar_engraver";
        \consists "Clef_engraver";
        \consists "Key_engraver";
        \consists "Local_key_engraver";
        \consists "Time_signature_engraver";
-       \consists "Repeat_engraver";
        \consists "Staff_symbol_engraver";
        \consists "Collision_engraver";
        \consists "Rest_collision_engraver";
-       \consists "Tuplet_engraver";
+
 %{
        Uncomment to get bar numbers on single staff systems:
        
@@ -77,8 +77,9 @@ RhythmicStaffContext=\translator{
        \consists "Pitch_squash_engraver";
        \consists "Separating_line_group_engraver";     
        \name RhythmicStaff;
-       \consists "Bar_engraver";
+
        \consists "Repeat_engraver";
+       \consists "Bar_engraver";
        \consists "Time_signature_engraver";
        \consists "Staff_symbol_engraver";
        \accepts "Voice";
@@ -101,6 +102,7 @@ VoiceContext = \translator {
        \consists "Font_size_engraver";
        \consists "Slur_engraver";
        \consists "Ties_engraver";
+       \consists "Tuplet_engraver";    
        \consists "Note_heads_engraver" ;       
        \consists "Skip_req_swallow_translator";
 };
@@ -206,9 +208,9 @@ HaraKiriStaffContext = \translator {
        barColumnPriority = "0";
        marginBreakPriority = "-4";
 
+       \consists "Repeat_engraver";
        \consists "Bar_engraver";
        \consists "Clef_engraver";
-       \consists "Repeat_engraver";
        \consists "Key_engraver";
        \consists "Time_signature_engraver";
        \consists "Local_key_engraver";
@@ -243,6 +245,7 @@ OrchestralScoreContext= \translator {
        defaultClef = treble;
 
        \consists "Timing_engraver";
+
        \consists "Bar_column_engraver";
        \consists "Bar_number_engraver";
        \consists "Mark_engraver";
index d0c76c1c8baaed53576d87be526cf180f7b25ac6..a7c974e8f2d5fa210651d582fcb57fd4dba323bc 100644 (file)
@@ -44,7 +44,7 @@ table_sixteen=
 
      "bars" = \table {
        "empty" "emptybar"      0
-       ""      ""      0                       0.0\pt  0.0\pt  0.0\pt  16.0\pt
+       ""      "emptybar"      0                       0.0\pt  0.0\pt  0.0\pt  16.0\pt
        "|"     "maatstreep"    1       0.0\pt  0.64\pt 0.0\pt  16.0\pt
        "||"    "doublebar"     1               0.0\pt  4.0\pt  0.0\pt  16.0\pt
        "|."    "finishbar"     1               -4.0\pt 0.0\pt  0.0\pt  16.0\pt
@@ -56,14 +56,9 @@ table_sixteen=
 
      }
 
-     "meters" = \table {
-       "C"     "fourfourmeter" 0               0.0\pt  10.0\pt -5.0\pt 5.0\pt
-       "C2"    "allabreve"     0               0.0\pt  10.0\pt -5.0\pt 5.0\pt
-     }
-
      % dims ignored for this table
      "param" = \table {
-       "brace" "pianobrace"    1       0.0\pt  0.0\pt  32.0\pt 80.0\pt
+       "brace" "pianobrace"    1       0.0\pt  0.0\pt  32.0\pt 112.0\pt
        "bracket"       "staffbracket"  1       0.0\pt  4.0\pt  16.0\pt 128.0\pt
        "extender"      "extender"      1       0.0\pt  0.0\pt  1.0\pt  160.0\pt
        "time_signature"        "generalmeter"  2       0.0\pt  10.0\pt -8.0\pt 8.0\pt
@@ -73,9 +68,5 @@ table_sixteen=
      }
 
 
-     "beamslopes" = \table {
-       "slope"         "beamslope"     2  2.0\pt 64.0\pt 0.0\pt 0.0\pt
-       "horizontal"    "rulesym"       2       
-     }
 }
 
index f9f46746a717d0643cce055e8c6117493521e0a6..ab27995a36ab44bca8810a0d2dca188a0e582eba 100644 (file)
@@ -49,7 +49,7 @@ table_twenty =
 
     "bars" = \table {
        "empty" "emptybar"      0
-       ""      ""      0               0.0\pt  0.0\pt  0.0\pt  16.0\pt
+       ""      "emptybar"      0               0.0\pt  0.0\pt  0.0\pt  16.0\pt
        "|"     "maatstreep"    1       0.0\pt  0.64\pt         0.0\pt  20.0\pt
        "||"    "doublebar"     1               0.0\pt  5.0\pt  0.0\pt  20.0\pt
        "|."    "finishbar"     1               -5.0\pt 0.0\pt  0.0\pt  20.0\pt
@@ -60,26 +60,16 @@ table_twenty =
        ":|:"   "repeatbarstartrepeat"  0       0.0\pt 20.0\pt  0.0\pt  20.0\pt
     }
 
-    "meters" = \table {
-       "C"     "fourfourmeter" 0               0.0\pt  10.0\pt -5.0\pt 5.0\pt
-       "C2"    "allabreve"     0               0.0\pt  10.0\pt -5.0\pt 5.0\pt
-    }
-
     % dims ignored for this table
     "param" = \table {
        "bracket"       "staffbracket"  1       0.0\pt  0.0\pt  20.0\pt 160.0\pt
        "extender"      "extender"      1       0.0\pt  0.0\pt  1.0\pt  160.0\pt
        "rule" "rulesym"        2
-       "brace"    "pianobrace" 1       0.0\pt  0.0\pt  40.0\pt 100.0\pt         
+       "brace"    "pianobrace" 1       0.0\pt  0.0\pt  40.0\pt 140.0\pt         
         "time_signature"       "generalmeter"  2       0.0\pt  10.0\pt -5.0\pt 5.0\pt
         "stem" "stem"  2
         "fill" "hbox{}"        0
      }
-
-     "beamslopes" = \table {
-       "slope"         "beamslope"     2  2.0\pt 64.0\pt 0.0\pt 0.0\pt 
-       "horizontal"    "rulesym"       2       
-     }
      
 }
 
diff --git a/input/test/repeat.ly b/input/test/repeat.ly
new file mode 100644 (file)
index 0000000..f4dbf0f
--- /dev/null
@@ -0,0 +1,18 @@
+\score{
+       <
+                 \type Staff \notes\relative c''{ 
+                         c c c c 
+                         \repeat 2 { { d d d d } }
+                         \alternative { { a a a a } { a a a a } }
+                 }
+                 \type Lyrics \lyrics {
+                         De eer- ste < { maat } { moet } >
+                         \repeat 2 { { } } 
+                         \alternative < 
+                                 { en dan twee keer } 
+                                 { een koe- plet _ } 
+                         > 
+                         en dan nog dit er ach- ter aan
+                 }
+       >
+}
index 9ec0ea4a972c56c92d6824018e4ab660e3bdd4ed..f498e0bf4df34a8e2c4499cb46bd5c06b05b15f1 100644 (file)
@@ -56,19 +56,15 @@ $staff2_voice_2 = \notes {
   [g8.  g16] fis4.~a,8 [d8 e8] fis2 [b8 b8] a4. a8 a,4 d2 s4 
 }
 
-$text1 = \lyrics{
-  Oh4 __ say. can you see,2 by8. the16 dawn's4 ear- ly light2 What8
+$text = \lyrics{
+  Oh4 __ \repeat 2 { { } } 
+  \alternative < 
+  { say. can you see,2 by8. the16 dawn's4 ear- ly light2 What8
   so8 proud-4. ly8 we4 hailed,2 At8. the16 twi-4 light's last gleam-
-  ing. Whose8. broad16 
-}
-
-$text2 = \lyrics{
-  _4 stripes and bright stars,2 through8 the8 per-4 il- ous fight,2
-  O'er8 the8 ram-4. parts8 we4 watched,2 were8. so16 gal-4 lant- ly
-  _ _ _ 
-}
-
-$text3 = \lyrics{
+  ing. Whose8. broad16 }
+  { stripes4 and bright stars,2 through8. the16 per-4 il- ous fight,2
+  O'er8 the8 ram-4. parts8 we4 watched,2 were8. so16 gal-4 lant- ly }
+  >
   stream-4 ing. And8. the16 rock-4 ets' red glare,2 the8 bombs8
   burst-4 ing in air,2 gave4 proof4. through8 the4 night2 that8.
   our16 flag4 was still there,2 Oh4 say, does that star- span-
@@ -81,9 +77,7 @@ global = \notes {
        \key D;
        \partial 4;
        \skip 4;
-       \bar "|:";
        \skip 2.*8;
-       \bar ":|";
        \skip 2.*16;
        \skip 2.;
        \bar "|.";
@@ -99,10 +93,7 @@ global = \notes {
                        \notes \transpose c'' {\voicetwo \$staff1_voice_2 } 
                >
                \type Lyrics = one \lyrics <
-% urg, too much distance between two texts; fixme first
-%                      \$text1
-%                      { \$text2 \$text3 }
-                       { \$text1 \$text3 }
+                       \$text
                >
                \type Staff=staffB < 
                        \global
index 4d1d3d59e11ab8bee82e785ad896c08514a0ee90..340815621c3bc3621ccbafdb9da77378f28a6626 100644 (file)
@@ -1,8 +1,14 @@
 \score{
        <
-               \type Staff = o \notes\relative c,,, { \stemdown [c8 c c c] }
-               \type Lyrics \lyrics{ BLA bla }
-               \type Staff = t \notes\relative c''''' { \stemup [c8 c c c] }
+               \type Staff = o \notes\relative c,,, { 
+                       \stemdown [c8 c c c] c4 c4 \break [c8 c c c] c4 c4
+               }
+               \type Lyrics \lyrics{ 
+                       BLA bla _2 < { BLA bla } { BLA bla } > _2 
+               }
+               \type Staff = t \notes\relative c''''' { 
+                       \stemup [c8 c c c] c4 c [c8 c c c] c4 c
+               } 
        >
        \paper{
                castingalgorithm = \Wordwrap;
index 6c75f333d2c8030f22482da61f791beae51495b8..20a49da261ce2ca8fa1c3915439a49e4cb4edf02 100644 (file)
@@ -78,10 +78,6 @@ struct General_script_def;
 struct Graphical_element;
 
 struct Graphical_axis_group;
-struct Mark_req;
-struct Music_output;
-struct Musical_pitch;
-struct Music_output_def;
 struct Global_translator;
 struct Hara_kiri_line_group_engraver;
 struct Hara_kiri_vertical_group_spanner;
@@ -114,7 +110,7 @@ struct Local_key_engraver;
 struct Lookup;
 struct Lyric_item;
 struct Lyric_req;
-struct My_lily_lexer;
+struct Mark_req;
 struct Measure_grouping_req;
 struct Melodic_req;
 struct Midi_def;
@@ -137,14 +133,19 @@ struct Molecule;
 struct Multi_measure_rest;
 struct Multi_measure_rest_req;
 struct Multi_measure_rest_engraver;
-struct Musical_script_req;
-struct Music_list;
+struct Music;
 struct Musical_req;
 struct Musical_span_req;
-struct Music;
+struct Musical_script_req;
+struct Music_list;
+struct Music_list_iterator;
+struct Music_output;
+struct Music_output_def;
+struct Musical_pitch;
 struct Music_sequence;
-struct Music_wrapper_iterator;
 struct Music_wrapper;
+struct Music_wrapper_iterator;
+struct My_lily_lexer;
 struct My_lily_parser;
 struct Note_column;
 struct Note_column_engraver;
index 47a2b58bb199fb6fbedd5a32815f17c541d03e21..15b5f510e04b345e904921edd027366371a51dcf 100644 (file)
 
 #include "lily-proto.hh"
 
-class Lyric_engraver : public Engraver {
-  Lyric_req* lreq_l_;
-  Text_item *lyric_item_p_;
+class Lyric_engraver : public Engraver 
+{
 protected:
   virtual void do_pre_move_processing();
   virtual bool do_try_music (Music*);
   virtual void do_process_requests();
   virtual void do_post_move_processing();
+
 public:
-  VIRTUAL_COPY_CONS(Translator);
-    
   Lyric_engraver();
+  VIRTUAL_COPY_CONS(Translator);
+
+private:
+  Link_array<Lyric_req> lyric_req_l_arr_;
+  Link_array<Text_item> text_p_arr_;
 };
+
 #endif // LYRIC_ENGRAVER_HH
diff --git a/lily/include/music-list-iterator.hh b/lily/include/music-list-iterator.hh
new file mode 100644 (file)
index 0000000..6cc15b5
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+  music-list-iterator.hh -- declare Music_list_iterator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+
+#ifndef MUSIC_LIST_ITERATOR_HH
+#define MUSIC_LIST_ITERATOR_HH
+
+#include "music-iterator.hh"
+#include "pcursor.hh"
+#include "plist.hh"
+
+class Music_list_iterator : public Music_iterator
+{
+public:
+  Music_list_iterator ();
+  virtual ~Music_list_iterator ();
+
+  virtual void construct_children ();
+  virtual Moment next_moment () const;
+  virtual bool ok () const;
+
+protected:
+  Music_list* music_list_l () const;
+
+  virtual void do_print () const;
+  virtual void do_process_and_next (Moment);
+};
+
+#endif // MUSIC_LIST_ITERATOR_HH
index 081faa7c7126dd06f1eeb8cb5a5fdce0d2785fbc..5495440493b635c7783ff10dbfc2d3b0c2c09e73 100644 (file)
 #ifndef REPEATED_MUSIC_ITERATOR_HH
 #define REPEATED_MUSIC_ITERATOR_HH
 
-#include "music-wrapper-iterator.hh"
-#include "sequential-music-iterator.hh"
+#include "music-list-iterator.hh"
 
-class Repeated_music_iterator : public Music_iterator
+class Repeated_music_iterator : public Music_list_iterator
 {
 public:
   Repeated_music_iterator ();
-  ~Repeated_music_iterator ();
+  virtual ~Repeated_music_iterator ();
 
   virtual void construct_children ();
   virtual Moment next_moment () const;
@@ -25,12 +24,13 @@ public:
 
 protected:
   virtual Repeated_music* repeated_music_l () const;
+
   virtual void do_print () const;
   virtual void do_process_and_next (Moment);
 
 private:
   Music_iterator* repeat_iter_p_;
-  Sequential_music_iterator* alternative_iter_p_;
+  Music_list_iterator* alternative_iter_p_;
 };
 
 #endif /* REPEATED_MUSIC_ITERATOR_HH */
index bcbf81769cffd5583d16d22fe5d5caa967edb76b..8cf39854c840dec1b9f929545a1b2016325d60ae 100644 (file)
@@ -1,33 +1,32 @@
 /*
-  Sequential_music-iter.hh -- declare Sequential_music_iterator
+  Sequential_music-iterator.hh -- declare Sequential_music_iterator
 
   source file of the GNU LilyPond music typesetter
 
   (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#ifndef SEQUENTIAL_MUSIC_ITER_HH
-#define SEQUENTIAL_MUSIC_ITER_HH
+#ifndef SEQUENTIAL_MUSIC_ITERATOR_HH
+#define SEQUENTIAL_MUSIC_ITERATOR_HH
 
-#include "music-iterator.hh"
-#include "pcursor.hh"
+#include "music-list-iterator.hh"
 
 /** Sequential_music iteration: walk each element in turn, and
   construct an iterator for every element.
   
  */
-class Sequential_music_iterator :  public Music_iterator
+class Sequential_music_iterator :  public Music_list_iterator
 {
 public:
   Sequential_music_iterator ();
-  ~Sequential_music_iterator ();
+  virtual ~Sequential_music_iterator ();
 
   virtual void construct_children ();
   virtual Moment next_moment () const;
   virtual bool ok () const;
 
 protected:
-  Sequential_music * sequential_music_l() const;
+  Sequential_music* sequential_music_l () const;
 
   virtual void do_print() const;
   virtual void do_process_and_next (Moment);
@@ -45,4 +44,4 @@ private:
   void set_Sequential_music_translator();
 };
 
-#endif // SEQUENTIAL_MUSIC_ITER_HH
+#endif // SEQUENTIAL_MUSIC_ITERATOR_HH
diff --git a/lily/include/simultaneous-music-iterator.hh b/lily/include/simultaneous-music-iterator.hh
new file mode 100644 (file)
index 0000000..e2c1eb4
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+  simultaneous-music-iterator.hh -- declare Simultaneous_music_iterator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef SIMULTANEOUS_MUSIC_ITERATOR_HH
+#define SIMULTANEOUS_MUSIC_ITERATOR_HH
+
+#include "music-list-iterator.hh"
+
+class Simultaneous_music_iterator : public Music_list_iterator
+{
+public:
+  Simultaneous_music_iterator ();
+  virtual ~Simultaneous_music_iterator ();
+
+  virtual void construct_children ();
+  virtual Moment next_moment () const;
+  virtual bool ok () const;
+
+protected:
+  Simultaneous_music* simultaneous_music_l () const;
+
+  virtual void do_print () const;
+  virtual void do_process_and_next (Moment);
+
+private:
+  Pointer_list<Music_iterator*> children_p_list_;
+};
+
+#endif // SIMULTANEOUS_MUSIC_ITERATOR_HH
index 1c3d1c71456b90b44868e28ac9c54891419f4e2e..12265840d6093e3026ccb33dadf0fe1dbf4d7051 100644 (file)
 #include "main.hh"
 #include "lily-guile.hh"
 
+SCM
+array_to_list (SCM *a , int l)
+{
+  SCM list = SCM_EOL;
+  for (int i= l; i--;  )
+    {
+      list =  gh_cons (a[i], list);
+    }
+  return list;
+}
+
 
 Lookup::Lookup ()
 {
@@ -97,9 +108,11 @@ Lookup::afm_find (String s, bool warn) const
   a.dim_ = m.B_;
   a.dim_[X_AXIS] *= 1 / 1000.0;
   a.dim_[Y_AXIS] *= 1 / 1000.0;
-  Array<Real> arr;
-  arr.push (m.code ());
-  a.lambda_ =  (lambda_scm ("char", arr));
+
+  
+  a.lambda_ = gh_list (ly_symbol ("char"),
+                      gh_int2scm (m.code ()),
+                      SCM_UNDEFINED);
   a.str_ = "afm_find: " + s;
   a.font_ = font_;
   return a;
@@ -117,11 +130,15 @@ Lookup::ball (int j) const
 Atom
 Lookup::bar (String str, Real h) const
 {
-  Array<Real> arr;
-  arr.push (h);
+
   Atom a = (*symtables_p_) ("bars")->lookup (str);
-  a.lambda_ =  (lambda_scm (a.str_, arr));
-  a.str_ = "bar";
+  
+  
+  a.lambda_ = gh_list (ly_symbol (a.str_.ch_C()),
+                      gh_double2scm (h),
+                      SCM_UNDEFINED);
+
+
   a.dim_.y () = Interval (-h/2, h/2);
   a.font_ = font_;
   return a;
@@ -134,14 +151,13 @@ Lookup::beam (Real slope, Real width, Real thick) const
   Real min_y = (0 <? height) - thick/2;
   Real max_y = (0 >? height) + thick/2;
 
-  Array<Real> arr;
-  arr.push (width);
-  arr.push (slope);
-  arr.push (thick);
-
   Atom a;
-  a.lambda_ =  (lambda_scm ("beam", arr));
-  a.str_ = "beam";
+  a.lambda_ =   gh_list (ly_symbol ("beam"),
+          gh_double2scm (width),
+          gh_double2scm (slope),
+          gh_double2scm (thick),
+          SCM_UNDEFINED);
+
   a.dim_[X_AXIS] = Interval (0, width);
   a.dim_[Y_AXIS] = Interval (min_y, max_y);
   return a;
@@ -156,7 +172,8 @@ Lookup::clef (String st) const
 SCM
 offset2scm (Offset o)
 {
-  return gh_list (gh_double2scm (o[X_AXIS]), gh_double2scm(o[Y_AXIS]), SCM_UNDEFINED);
+  return gh_list (gh_double2scm (o[X_AXIS]), gh_double2scm(o[Y_AXIS]),
+                 SCM_UNDEFINED);
 }
 
 Atom
@@ -179,13 +196,12 @@ Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
       sc[i] =  offset2scm (controls[i]);
     }
 
-  // (lambda (o) (dashed-slur o thick dash '(stuff))
   a.lambda_ = 
-    gh_append2 (ly_lambda_o (),
-    gh_list (gh_append2 (ly_func_o ("dashed-slur"),
-    gh_cons (gh_double2scm (thick), 
-    gh_cons (gh_double2scm (dash),
-    gh_list (ly_quote_scm (gh_list (sc[1], sc[2], sc[3], sc[0], SCM_UNDEFINED)), SCM_UNDEFINED)))), SCM_UNDEFINED));
+    gh_list (ly_symbol ("dashed-slur"),
+            gh_double2scm (thick), 
+            gh_double2scm (dash),
+            ly_quote_scm (array_to_list (sc, 4)),
+            SCM_UNDEFINED);
 
   a.str_ = "dashed_slur";
   return a;
@@ -207,9 +223,9 @@ Atom
 Lookup::extender (Real width) const
 {
   Atom a = (*symtables_p_) ("param")->lookup ("extender");
-  Array<Real> arr;
-  arr.push (width);
-  a.lambda_ = (lambda_scm (a.str_, arr));
+  a.lambda_ = gh_list (ly_symbol (a.str_),
+                      gh_double2scm (width),
+                      SCM_UNDEFINED);
   a.str_ = "extender";
   a.font_ = font_;
   return a;
@@ -251,12 +267,11 @@ Lookup::rest (int j, bool o) const
 Atom
 Lookup::rule_symbol (Real height, Real width) const
 {
-  Atom a = (*symtables_p_) ("param")->lookup ("rule");
-  Array<Real> arr;
-  arr.push (height);
-  arr.push (width);
-  a.lambda_ = (lambda_scm (a.str_, arr));
-  a.str_ = "rule_symbol";
+  Atom a;
+  a.lambda_ = gh_list (ly_symbol ("rulesym"),
+                      gh_double2scm (height),
+                      gh_double2scm (width),
+                      SCM_UNDEFINED);
   a.dim_.x () = Interval (0, width);
   a.dim_.y () = Interval (0, height);
   return a;
@@ -302,16 +317,15 @@ Lookup::stem (Real y1, Real y2) const
   a.dim_.x () = Interval (0,0);
   a.dim_.y () = Interval (y1,y2);
 
-  Array<Real> arr;
-
   Real stem_width = paper_l_->get_var ("stemthickness");
-  arr.push (-stem_width /2);
-  arr.push (stem_width);
-  arr.push (y2);
-  arr.push (-y1);
 
-  a.lambda_ = (lambda_scm ("stem", arr));
-  a.str_ = "stem";
+  a.lambda_ = gh_list (ly_symbol ("stem"),
+                      gh_double2scm(-stem_width /2),
+                      gh_double2scm(stem_width),
+                      gh_double2scm(y2),
+                      gh_double2scm(-y1),
+                      SCM_UNDEFINED);
+
   a.font_ = font_;
   return a;
 }
@@ -331,16 +345,15 @@ Dictionary<Adobe_font_metric*> afm_p_dict;
 Atom
 Lookup::text (String style, String text) const
 {
-  Array<Scalar> arr;
-
-  arr.push (text);
   Atom a =  (*symtables_p_) ("style")->lookup (style);
-  a.lambda_ = lambda_scm (a.str_, arr);
+
+  a.lambda_ = gh_list(ly_symbol (a.str_),
+                     gh_str02scm (text.ch_C()),
+                     SCM_UNDEFINED);
+  
   Real font_w = a.dim_.x ().length ();
   Real font_h = a.dim_.y ().length ();
 
-// urg
-//  if (!cmr_dict.length_i ())
   if (!cmr_dict.elem_b ("roman"))
     {
       //brrrr
@@ -393,7 +406,6 @@ Lookup::text (String style, String text) const
     }
   DOUT << "\n" << to_str (w) << "\n";
   a.dim_.x () = Interval (0, w);
-  a.str_ = "text";
   a.font_ = font_;
   return a;
 }
@@ -403,43 +415,21 @@ Atom
 Lookup::time_signature (Array<int> a) const
 {
   Atom s ((*symtables_p_) ("param")->lookup ("time_signature"));
-  s.lambda_ =  (lambda_scm (s.str_, a));
-
+  s.lambda_ = gh_list (ly_symbol (s.str_),
+                      gh_int2scm (a[0]),
+                      gh_int2scm (a[1]),
+                      SCM_UNDEFINED);
   return s;
 }
 
-/*
-  should be handled via Tex_ code and Lookup::bar ()
- */
 Atom
 Lookup::vbrace (Real &y) const
 {
-  Atom a = (*symtables_p_) ("param")->lookup ( "brace");
-  Interval ydims = a.dim_[Y_AXIS];
-  Real min_y = ydims[LEFT];
-  Real max_y = ydims[RIGHT];
-  Real step = 1.0 PT;
-  if (y < min_y)
-    {
-      warning (_ ("piano brace") 
-              + " " + _ ("too small") +  " (" + print_dimen (y) + ")");
-      y = min_y;
-    }
-  if (y > max_y)
-    {
-      warning (_ ("piano brace")
-              + " " + _ ("too big") + " (" + print_dimen (y) + ")");
-      y = max_y;
-    }
-
-  
-  int idx = int (rint ( (y- min_y)/step)) + 1;
-  
-  Array<Real> arr;
-  arr.push (idx);
-  a.lambda_ = (lambda_scm (a.str_, arr));
-  a.str_ = "brace";
+  Atom a;
+  a.lambda_ = gh_list (ly_symbol ("pianobrace"),
+                      gh_double2scm (y),
+                      SCM_UNDEFINED
+                      );
   a.dim_[Y_AXIS] = Interval (-y/2,y/2);
   a.font_ = font_;
   return a;
@@ -450,13 +440,13 @@ Lookup::hairpin (Real width, bool decresc, bool continued) const
 {
   Atom a;  
   Real height = paper_l_->staffheight_f () / 6;
-  Array<Real> arr;
-  arr.push (width);
-  arr.push (height);
-  arr.push (continued ? height/2 : 0);
+
   String hairpin = String (decresc ? "de" : "") + "crescendo\n";
-  a.lambda_ = (lambda_scm (hairpin, arr));
-  a.str_ = "hairpin";
+  a.lambda_ = gh_list (ly_symbol (hairpin),
+                      gh_double2scm (width),
+                      gh_double2scm (height),
+                      gh_double2scm (continued ? height/2 : 0.0),
+                      SCM_UNDEFINED);
   a.dim_.x () = Interval (0, width);
   a.dim_.y () = Interval (-2*height, 2*height);
   a.font_ = font_;
@@ -466,21 +456,19 @@ Lookup::hairpin (Real width, bool decresc, bool continued) const
 Atom
 Lookup::plet (Real dy , Real dx, Direction dir) const
 {
-  Array<Real> arr;
-  arr.push (dx);
-  arr.push (dy);
-  arr.push (dir);
   Atom a;
-  a.lambda_ = (lambda_scm ("tuplet", arr));
-  a.str_ = "plet";
+  a.lambda_ = gh_list(ly_symbol ("tuplet"),
+                     gh_double2scm (dx),
+                     gh_double2scm (dy),
+                     gh_int2scm (dir));
   return a;
 }
 
+
 Atom
 Lookup::slur (Array<Offset> controls) const
 {
   assert (controls.size () == 8);
-
   Real dx = controls[3].x () - controls[0].x ();
   Real dy = controls[3].y () - controls[0].y ();
   Atom a;
@@ -492,25 +480,9 @@ Lookup::slur (Array<Offset> controls) const
     scontrols[i] = offset2scm (controls[indices[i]]);
 
 
-  a.lambda_ =
-    gh_append2 (ly_lambda_o (),
-               gh_list (gh_append2 (ly_func_o ("slur"),
-                                    gh_list (ly_quote_scm (gh_list (scontrols[0],
-                                                                    scontrols[1],
-                                                                    scontrols[2],
-                                                                    scontrols[3],
-                                                                    scontrols[4],
-                                                                    scontrols[5],
-                                                                    scontrols[6],
-                                                                    scontrols[7],
-                                                                    SCM_UNDEFINED)),
-                                             SCM_UNDEFINED)
-                                    ),
-                        SCM_UNDEFINED)
-               );
-
-
-  a.str_ = "slur";
+  a.lambda_ =gh_list (ly_symbol ("slur"),
+                     ly_quote_scm (array_to_list (scontrols, 8)),
+                     SCM_UNDEFINED);
 
   a.dim_[X_AXIS] = Interval (0, dx);
   a.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
@@ -529,9 +501,10 @@ Lookup::vbracket (Real &y) const
               + " " + _ ("too small") +  " (" + print_dimen (y) + ")");
       //      y = min_y;
     }
-  Array<Real> arr;
-  arr.push (y);
-  a.lambda_ =  (lambda_scm ("bracket", arr));
+
+  a.lambda_ =  gh_list (ly_symbol ("bracket"),
+                       gh_double2scm (y),
+                       SCM_UNDEFINED);
   a.str_ = "vbracket";
   a.dim_[Y_AXIS] = Interval (-y/2,y/2);
   a.dim_[X_AXIS] = Interval (0,4 PT);
@@ -541,12 +514,15 @@ Lookup::vbracket (Real &y) const
 Atom
 Lookup::volta (Real w, bool last_b) const
 {
-  Array<Real> arr;
-  arr.push (w);
-  arr.push (last_b);
   Atom a;
-  a.lambda_ = (lambda_scm ("volta", arr));
+  a.lambda_ = gh_list (ly_symbol ("volta"),
+                      gh_double2scm (w),
+                      gh_int2scm (last_b),
+                      SCM_UNDEFINED);
   a.str_ = "volta";
+  Real interline_f = paper_l_->interline_f ();
+  a.dim_[Y_AXIS] = Interval (-interline_f / 2, interline_f / 2);
+  a.dim_[X_AXIS] = Interval (0, w);
   return a;
 }
 
index d3c6fdf6577202a3c9a249cd3dacd7d469e5c7e3..bac629b38578ea4fb4b76bb4551a6aacc30aa9f1 100644 (file)
@@ -4,6 +4,7 @@
   source file of the GNU LilyPond music typesetter
 
   (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "lyric-engraver.hh"
 #include "lookup.hh"
 #include "paper-def.hh"
 #include "main.hh"
+#include "dimensions.hh"
+
+ADD_THIS_TRANSLATOR(Lyric_engraver);
 
 Lyric_engraver::Lyric_engraver()
 {
-  lreq_l_ =0;
-  lyric_item_p_ =0;
 }
 
 bool
 Lyric_engraver::do_try_music (Music*r)
 {
-  if (Lyric_req * lr = dynamic_cast <Lyric_req *> (r))
+  if (Lyric_req* l = dynamic_cast <Lyric_req *> (r))
     {
-      lreq_l_ = lr;
+      lyric_req_l_arr_.push (l);
       return true;
     }
   return false;
@@ -34,46 +36,48 @@ Lyric_engraver::do_try_music (Music*r)
 void
 Lyric_engraver::do_process_requests()
 {
-  if (lreq_l_) 
+  if (text_p_arr_.size ())
+    return;
+
+  Scalar style = get_property ("textstyle");
+  Scalar alignment = get_property ("textalignment");
+  for (int i=0; i < lyric_req_l_arr_.size (); i++)
     {
-      Text_def *td_p = new Text_def;
-      td_p->text_str_ = lreq_l_->text_str_;
-      td_p->align_dir_ = LEFT;
-      Scalar style = get_property ("textstyle");
+      Lyric_req* request_l = lyric_req_l_arr_[i];
+      Text_def* text_p = new Text_def;
+      text_p->text_str_ = request_l->text_str_;
+      text_p->align_dir_ = LEFT;
       if (style.length_i ())
-       {
-         td_p->style_str_ = style;
-       }
-      Scalar alignment = get_property ("textalignment");
+       text_p->style_str_ = style;
       if (alignment.isnum_b())
-       {
-         td_p->align_dir_= (Direction)(int)alignment;
-       }
+       text_p->align_dir_= (Direction)(int)alignment;
       
-      lyric_item_p_ =  new Text_item (td_p);
-
-      lyric_item_p_->dir_ = DOWN;
-      lyric_item_p_->fat_b_ = true;
-      announce_element (Score_element_info (lyric_item_p_, lreq_l_));
+      Text_item* item_p =  new Text_item (text_p);
+      item_p->dir_ = DOWN;
+      item_p->fat_b_ = true;
+      // urg
+      // item_p->translate (Offset (0, (i - 1) * item_p->height ().length_i ()));
+//      if (i && ((Text_def*)text_p_arr_[i - 1]->tdef_p_)->text_str_.length_i ())
+      // urg, when/how can one get the heigt of this thing?
+      item_p->translate (Offset (0, - i * 12 PT));
+      text_p_arr_.push (item_p);
+      announce_element (Score_element_info (item_p, request_l));
     }
 }
 
 void
 Lyric_engraver::do_post_move_processing()
 {
-  lreq_l_ =0;
 }
 
 void
 Lyric_engraver::do_pre_move_processing()
 {
-  if (lyric_item_p_)
+  for (int i=0; i < text_p_arr_.size (); i++)
     {
-      typeset_element (lyric_item_p_);
-      lyric_item_p_ =0;
+      typeset_element (text_p_arr_[i]);
     }
+  text_p_arr_.clear ();
+  lyric_req_l_arr_.clear ();
 }
 
-
-
-ADD_THIS_TRANSLATOR(Lyric_engraver);
index 718490df5ef299116cf3582e8a9433236783aec4..3d22831fbfa9ecec925e97be98e3b583a0144cb4 100644 (file)
@@ -8,10 +8,10 @@
 #include "debug.hh"
 #include "music-list.hh"
 #include "music-iterator.hh"
-#include "sequential-music-iterator.hh"
 #include "property-iterator.hh"
-#include "chord-iterator.hh"
 #include "request-iterator.hh"
+#include "sequential-music-iterator.hh"
+#include "simultaneous-music-iterator.hh"
 #include "translator-group.hh"
 #include "translation-property.hh"
 #include "change-iterator.hh"
diff --git a/lily/music-list-iterator.cc b/lily/music-list-iterator.cc
new file mode 100644 (file)
index 0000000..d243aed
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+  Music_list-iterator.cc -- implement Music_list_iterator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#include "music-list-iterator.hh"
+#include "music-list.hh"
+
+Music_list_iterator::Music_list_iterator ()
+{
+}
+
+Music_list_iterator::~Music_list_iterator ()
+{
+}
+
+void
+Music_list_iterator::construct_children ()
+{
+}
+
+void
+Music_list_iterator::do_print() const
+{
+}
+
+void
+Music_list_iterator::do_process_and_next (Moment)
+{
+}
+
+Music_list*
+Music_list_iterator::music_list_l () const
+{
+  return (Music_list *) music_l_;
+}
+
+Moment
+Music_list_iterator::next_moment () const
+{
+  return 0;
+}
+
+bool
+Music_list_iterator::ok () const
+{
+  return false;
+}
+
index 9b27b9a12008eafcf08652c22efa4693072decb6..64c9dd8bae3ba872d1365d55b42b721cb5514b5a 100644 (file)
@@ -739,15 +739,19 @@ Alternative_music: {
                Music_list* m = new Music_list;
                $$ = new Sequential_music (m);
        }
-       | ALTERNATIVE '{' Music_list '}'                {
-               $$ = new Sequential_music ($3);
+       | ALTERNATIVE Simultaneous_music {
+               $$ = $2;
+       }
+       | ALTERNATIVE Sequential_music {
+               $$ = $2;
        }
        ;
 
 Repeated_music: REPEAT unsigned '{' Music '}' Alternative_music        {
                // s/r conflicts -> '{' '}' 
-               Sequential_music* s = (Sequential_music*)$6;
-               $$ = new Repeated_music ($4, $2, s);
+               Music_sequence* m = dynamic_cast <Music_sequence*> ($6);
+               assert (m);
+               $$ = new Repeated_music ($4, $2, m);
        }
        ;
 
index f2f2c19e976871faf293d630949f098563a854f7..3558b8d05ae8d1db908875a3e102a53961c53b58 100644 (file)
@@ -29,10 +29,24 @@ Repeat_engraver::do_try_music (Music* m)
 {
   if (Repeated_music* r = dynamic_cast<Repeated_music *> (m))
     {
-      repeated_music_arr_.push (r);
-      stop_mom_arr_.push (now_moment () + r->repeat_p_->duration () 
-        + r->alternative_p_->music_p_list_p_->top ()->duration ());
+      Moment stop_mom = now_moment () + r->repeat_p_->duration () 
+        + r->alternative_p_->music_p_list_p_->top ()->duration ();
       Moment alt_mom = now_moment () + r->repeat_p_->duration ();
+      /*
+        TODO: 
+         figure out what we don't want.
+
+         we don't want to print more than one set of
+         |: :| and volta brackets on one staff.
+
+         counting nested repeats, it seems safest to forbid
+         two pieces of alternative music to start at the same time.
+       */
+      for (int i = 0; i < alternative_start_mom_arr_.size (); i++)
+        if (alternative_start_mom_arr_[i] == alt_mom)
+         return false;
+      repeated_music_arr_.push (r);
+      stop_mom_arr_.push (stop_mom);
       for (PCursor<Music*> i (r->alternative_p_->music_p_list_p_->top ()); i.ok (); i++)
         {
          alternative_music_arr_.push (i.ptr ());
index 768a289b8f6febbe7f691d1e6501b01290f21568..5faf0880e7fcf3166b1c2fd60579c09034bc90af 100644 (file)
@@ -94,8 +94,8 @@ Repeated_music_iterator::ok () const
          Repeated_music_iterator *urg = (Repeated_music_iterator*)this;
          delete urg->repeat_iter_p_;
          urg->repeat_iter_p_ = 0;
-         urg->alternative_iter_p_ = dynamic_cast<Sequential_music_iterator*>
-           (get_iterator_p (repeated_music_l ()->alternative_p_));  
+         urg->alternative_iter_p_ = dynamic_cast<Music_list_iterator*>
+           (get_iterator_p ((Music*)repeated_music_l ()->alternative_p_));  
        }
     }
   if (alternative_iter_p_)
diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc
new file mode 100644 (file)
index 0000000..764bcdf
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+  Simultaneous_music-iterator.cc -- implement Simultaneous_music_iterator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "translator-group.hh"
+#include "debug.hh"
+#include "simultaneous-music-iterator.hh"
+
+#include "music-list.hh"
+
+Simultaneous_music_iterator::Simultaneous_music_iterator ()
+{
+}
+
+Simultaneous_music_iterator::~Simultaneous_music_iterator ()
+{
+}
+
+void
+Simultaneous_music_iterator::construct_children()
+{
+  int j = 0;
+  for (PCursor<Music*> i (simultaneous_music_l ()->music_p_list_p_->top());  
+       i.ok(); j++, i++) 
+    {
+      Music_iterator * mi = get_iterator_p (i.ptr());
+      if (mi->ok()) 
+       {
+         if  (simultaneous_music_l ()->translator_type_str_.empty_b ())
+           set_translator (mi->report_to_l()->ancestor_l (0));
+         children_p_list_.bottom().add (mi);
+       }
+      else 
+       delete mi;
+    }
+}
+
+
+void
+Simultaneous_music_iterator::do_print() const
+{
+#ifndef NPRINT
+  for (PCursor<Music_iterator*> i (children_p_list_.top()); i.ok (); i++) 
+    {
+      i->print();
+    }
+#endif
+}
+
+void
+Simultaneous_music_iterator::do_process_and_next (Moment until)
+{
+  for (PCursor<Music_iterator*> i (children_p_list_.top()); i.ok ();) 
+    {
+      if  (i->next_moment() == until) 
+       {
+         i->process_and_next (until);
+       }
+      if (!i->ok()) 
+       delete i.remove_p();
+      else
+       i++;
+    }
+  Music_iterator::do_process_and_next (until);
+}
+
+
+
+
+Moment
+Simultaneous_music_iterator::next_moment() const
+{
+  Moment next;
+  next.set_infinite (1);
+  for (PCursor<Music_iterator*> i (children_p_list_.top()); i.ok (); i++)
+    next = next <? i->next_moment() ;
+  return next;
+}
+
+
+
+bool
+Simultaneous_music_iterator::ok() const
+{
+  return children_p_list_.size();
+}
+
+Simultaneous_music*
+Simultaneous_music_iterator::simultaneous_music_l ()const
+{
+  return (  Simultaneous_music *) music_l_;
+}
index bbdac9dee93fd8864068fc2e9543eaaaaef572f6..ecff7e84798b8f5c25e89f0a1418322106b1cd32 100644 (file)
@@ -66,7 +66,9 @@ Text_def::get_atom (Paper_def *p, Direction) const
 
   a.translate_axis (-(align_dir_ + 1)* guess_width_f (a) / 2, X_AXIS);
   // urg 1/1 is too much; see input/test/vertical-text.ly
-  a.translate_axis (a.dim_.y ().length () * 9 / 10, Y_AXIS);
+//  a.translate_axis (a.dim_.y ().length () * 9 / 10, Y_AXIS);
+  // fine for one lyric, urg for lyric chord
+  a.translate_axis (a.dim_.y ().length () * 2 / 5, Y_AXIS);
   
   return a;
 }
index eb4383f3241b23008bdd57d361b2db0b775b2e84..b6252548673cafea2353d7422e8d9625db60e54a 100644 (file)
@@ -75,6 +75,8 @@ Text_item::brew_molecule_p () const
   if (dir_<0)          // should do something better anyway.
     mol_p->translate_axis (mol_p->extent ().y ().left , Y_AXIS);
   mol_p->translate_axis (coordinate_offset_f_, Y_AXIS);
+  // fine for one lyric, urg for lyric chord
+  mol_p->translate_axis (a.dim_.y ().length (), Y_AXIS);
 
   return mol_p;
 }
index 7acd1354710add42da09a59bbc73f34a0cdcf728..7f8558f69b835407d55aabf2ae3a74b4cf993430 100644 (file)
@@ -39,6 +39,6 @@ endchar;
 enddef;
 
 
-for h :=  2 staffsize#  step 1 pt# until (6 * staffsize#):
+for h :=  2 staffsize#  step 1 pt# until (7 * staffsize#):
        draw_brace(h, interline# );
 endfor
index ab45326524543cc2cf215b03b70e25aca66570e6..01156c40eced6a3e42b8c892b09d05079683fc89 100644 (file)
@@ -168,7 +168,7 @@ AC_DEFUN(AC_STEPMAKE_GUILE, [
       AC_CHECK_LIB(guile, scm_boot_guile)\
     )
     if test "$ac_cv_lib_guile_scm_shell" != yes -a \
-      "$ac_cv_lib_scm_boot_guile" != yes ; then
+      "$ac_cv_lib_guile_scm_boot_guile" != yes ; then
            AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
     fi
 ])
index e8a858a0c9b3fa6d065b0f257ca134be606bdbb4..669a319ac3e57f932ad46e240539f889d9ba522f 100644 (file)
@@ -9,6 +9,7 @@ version = '0.1'
 
 import sys
 import os
+import time
 from string import *
 import getopt
 import __main__
@@ -20,6 +21,12 @@ index_file=''
 banner_file = ''
 news_file=''
 news =''
+footer = '\n<hr>Please take me <a href=%s>back to the index</a>\n\
+of %s<!%s%s>\n'
+builtstr = '\n<hr><font size=-1>\n\
+This page was built from %s-%s by\
+<address><br>%s &lt<a href=mailto:%s>%s</a>&gt, at %s.</address><p></font>' 
+
 (options, files) = getopt.getopt(sys.argv[1:], 'hp:', ['help', 'news=', 'index=', 'package=']) 
 
 def help ():
@@ -48,6 +55,9 @@ from packagepython import *
 package = Package (topdir)
 packager = Packager ()
 
+if package.NAME == 'LILYPOND':
+    package.Name = 'GNU LilyPond'
+
 def set_vars():
     os.environ["CONFIGSUFFIX"] = 'www';
     if os.name == 'nt':
@@ -61,17 +71,16 @@ def set_vars():
 
 set_vars ()
 
-backstr = '\n<hr>Please take me <a href=%s>back to the index</a>\n\
-of ' + package.Name + '\n'
-builtstr = '\n<hr><font size=-1>\n\
-This page was built  from ' + package.name + '-%s by <p>\n\
-<address><br>%s &lt<a href=mailto:%s>%s</a>&gt</address>\n\
-<p></font>' 
-
 def footstr(index):
-    s = backstr % index
-    s = s + builtstr % (version_tuple_to_str (package.version), fullname,
-                        packager.mail, packager.mail)
+    try:
+       footer = gulp_file (package.topdir + '/Documentation/footer.html.in')
+    except:
+        pass
+    s = footer % (index, package.Name, packager.webmaster, packager.webmaster)
+    s = s + builtstr % (package.Name, 
+                       version_tuple_to_str (package.version), fullname,
+                       packager.mail, packager.mail, 
+                       time.strftime ('%c %Z', time.localtime (time.time ())))
     return s
 
 banner = footstr (index_file)
index 68c7abdc67ab7e9689b39a4582586bce063b24f7..a1b8bab54649316c9c5def950cd5e53beb9c4a40 100755 (executable)
@@ -61,6 +61,11 @@ class Packager:
                except KeyError:
                        m= '(address unknown)'
                self.mail= m
+               try:
+                       m= os.environ['WEBMASTER']
+               except KeyError:
+                       m= self.mail
+               self.webmaster= m
 
 
 def full_version_tup(tup):
index 20b12df5e0ee0461f44215691308540682bbeb37..ee03b11bcf68af0a5978d243c5ce063eb5fa340d 100644 (file)
@@ -12,7 +12,7 @@
   \font\bracefontsixteen = feta-braces16
   \font\fingerfontsixteen = feta-nummer4
   \font\markfontsixteen = feta-nummer10
-  \font\fetanummerjsixteen = feta-nummer6
+  \font\fetanummerjsixteen = feta-nummer5
 \def\currentsize{sixteen}
 }