]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/percent-repeat-engraver.cc (try_music): add correct
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 23 Feb 2003 11:59:01 +0000 (11:59 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 23 Feb 2003 11:59:01 +0000 (11:59 +0000)
processing moments for double-measure percents as well.

* input/regression/percent-repeat-skipbars.ly (texidoc): new file

ChangeLog
input/regression/percent-repeat-skipbars.ly [new file with mode: 0644]
lily/axis-group-engraver.cc
lily/percent-repeat-engraver.cc
lily/stem-engraver.cc
scm/grob-property-description.scm

index 378da4c359e6c0273e368a680dd0e13b19e6e4e1..255c3964421c3071b5e6a5a63b4e221e6fad6b1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2003-02-23  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * lily/percent-repeat-engraver.cc (try_music): add correct
+       processing moments for double-measure percents as well.
+
+       * input/regression/percent-repeat-skipbars.ly (texidoc): new file
+
        * lily/lily-guile.cc (ly:dimension?): add dimension as separate
        grob prop type. 
 
diff --git a/input/regression/percent-repeat-skipbars.ly b/input/regression/percent-repeat-skipbars.ly
new file mode 100644 (file)
index 0000000..0ecf396
--- /dev/null
@@ -0,0 +1,16 @@
+\header {
+texidoc = "Percent repeats are not skipped, even when skipBars is set.  "
+}
+
+
+\include "paper20.ly"
+
+\score {
+     \context Staff <
+       \property Score.skipBars = ##t
+       \notes {
+       \repeat "percent" 2 { g2 a g a }
+       }
+     >
+}
+
index b9c3ef874141b4e1a6e610189cf61148a9eb316a..286d42477b85b79fca6c760df20641a28302a5f6 100644 (file)
@@ -155,7 +155,8 @@ Hara_kiri_engraver::acknowledge_grob (Grob_info i)
 {
   Axis_group_engraver::acknowledge_grob (i);
   if (Rhythmic_head::has_interface (i.grob_)
-      || i.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface")))
+      || i.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))
+      )
     {
       Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob_);
     }
index fd42e56c1465cabd1cd01f74a0732fe81d778ffb..9cf39db4a94bbcbb8dd5ed939ff7d87ef042d47d 100644 (file)
@@ -120,17 +120,9 @@ Percent_repeat_engraver::try_music (Music * m)
       repeat_ = rp;
 
       
-      Global_translator *global =0;
-      Translator *t = this;
-      do
-       {
-         t = t->daddy_trans_ ;
-         global = dynamic_cast<Global_translator*> (t);
-       }
-      while (!global);
-
+      Global_translator *global =top_engraver();
       for (int i = 0; i < count; i++)  
-       global->add_moment_to_process (now + Moment (1+i) * body_length_);
+       global->add_moment_to_process (next_moment_ + Moment (i) * body_length_);
   
       return true;
     }
@@ -170,6 +162,8 @@ Percent_repeat_engraver::process_music ()
            top_engraver()->forbid_breaks ();   // guh. Use properties!      
        }
       next_moment_ = next_moment_ + body_length_;
+
+      top_engraver()->add_moment_to_process (next_moment_);
     }
 }
 
index c2e2db386e0738afe1a1996497501cb3db833d7b..7535d3916286b5d5ac4c32f49b90655d61e9866d 100644 (file)
@@ -121,7 +121,9 @@ Stem_engraver::acknowledge_grob (Grob_info i)
 
       if (Stem::duration_log (stem_) != duration_log)
        {
-         i.music_cause ()->origin ()->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 <<  Stem::duration_log (stem_)));
+         i.music_cause ()->origin ()->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 <<  Stem::duration_log (stem_))
+                                               + _f ("Don't you want polyphonic voices instead?")
+                                               );
        }
 
       Stem::add_head (stem_,h);
index 97d1a4a377be12a56788989c83e1b650f5b52ff2..fa9ff3a7f8a946aad9c462e866037325155b9cfb 100644 (file)
@@ -452,63 +452,7 @@ the Nth element of the list gives the amount stem shortening of a note with N fl
 (grob-property-description 'style symbol? "a string determining what style of  glyph is typeset. Valid choices depend on the function that is reading this property. .")
 (grob-property-description 'support-head ly:grob? "the note head at
 one end of the stem.")
-(grob-property-description 'text markup? "
-Scheme markup text.  It is defined as follows:
-
-@example
-text: string | (head? text+)
-head: markup | (markup+)
-markup-item: property | abbrev
-property: (@var{key} . @var{value})
-abbrev: @code{columns lines roman music bold italic named super sub overstrike text}
-        @code{finger volta timesig mmrest mark script large Large dynamic}
-@end example
-
-
-The following abbreviations are currently defined:
-@table @samp
-@item columns
- horizontal mode: set all text on one line (default)
-@item lines
- vertical mode: set every text on new line
-@item roman
- select roman font
-@item music
- select feta font, and lookup by character name
-@item bold
- select bold series
-@item italic
- select italic shape
-@item named
- lookup by character name
-@item text
- plain text lookup (by character value)
-@item super
- superscript
-@item sub
- subscript
-@item overstrike
- the next text or character overstrikes this one
-@item finger
- select fingering number fontstyle
-@item volta
- select volta number fontstyle
-@item timesig
- select time signature number fontstyle
-@item mmrest
- select multi measure rest number fontstyle
-@item mark
- select mark number fontstyle
-@item script
- select scriptsize roman fontstyle
-@item large
- select large roman fontstyle
-@item Large
- select Large roman fontstyle
-@item dynamic
- select dynamics fontstyle
-@end table
-.")
+(grob-property-description 'text markup? "Text markup.  See reference manual for more information.")
 (grob-property-description 'text-start boolean? "Indicator for whether a piano pedal bracket has leading text, such as Ped.")
 (grob-property-description 'thick-thickness number? "thickness, measured in stafflinethickness.")
 (grob-property-description 'thickness number? "thickness, measured in stafflinethickness.")
@@ -534,22 +478,19 @@ Like @code{bracket-visibility}, but for the number.")
 
 (grob-property-description 'break-visibility procedure? "a function that takes the break direction and returns a  cons of booleans containing (TRANSPARENT . EMPTY).
 
-
 Some items need special treatment for line breaking. For example, a
-clef is normally only printed at the start of a line (i.e. after a line
-break).  To model this, `breakable' items (clef, key signature, bar lines,
-etc.) are copied twice. Then we have three versions of each breakable
-item: one version if there is no line break, one version that is printed
-before the line break (at the end of a system), one version that is
-printed after the line break.
+clef is normally only printed at the start of a line (i.e. after a
+line break).  To model this, `breakable' items (clef, key signature,
+bar lines, etc.) are copied twice. Then we have three versions of each
+breakable item: one version if there is no line break, one version
+that is printed before the line break (at the end of a system), one
+version that is printed after the line break.
 
 Whether these versions are visible and take up space, is determined by
 the outcome of the @code{break-visibility}. This grob property is a
-function taking a direction (-1, 0 or 1) as argument. It returns a cons
-of booleans, signifying whether this grob should be transparent and have
-no extent.
-
-")
+function taking a direction (-1, 0 or 1) as argument. It returns a
+cons of booleans, signifying whether this grob should be transparent
+and have no extent.")
 (grob-property-description 'virga boolean? "is this neume a virga?.")
 (grob-property-description 'when ly:moment? "when does this column happen?.")
 (grob-property-description 'word-space ly:dimension? "elongate left by this much (FIXME: cumbersome semantics).")
@@ -583,7 +524,6 @@ columns.
 (grob-property-description 'right-neighbors grob-list? "see left-neighbors")
 (grob-property-description 'left-items grob-list? "")
 (grob-property-description 'right-items grob-list? "")
-
 (grob-property-description 'cause scheme? "Any kind of causation objects (i.e. music, or perhaps translator) that was the cause for this grob.  ")
 (grob-property-description 'font ly:font-metric? "Cached font metric object")
 (grob-property-description 'break-alignment-done boolean? "mark flag to signal we've done alignment already.")