CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/04/18 15:18:16
Modified files:
. : ChangeLog
input/regression: repeat-percent.ly
lily : axis-group-engraver.cc
percent-repeat-engraver.cc
ly : engraver-init.ly
scm : define-context-properties.scm
Log message:
* lily/percent-repeat-engraver.cc (try_music): add measure before
next_moment to future processing moment. Fixes:
percent-repeat-mm-rest.ly
(process_music): don't add moment for 2nd time.
* input/regression/repeat-percent.ly: add mmrests as extra test.
* lily/axis-group-engraver.cc (acknowledge_grob): read
keepAliveInterfaces to decide what to kill.
* ly/engraver-init.ly (AncientRemoveEmptyStaffContext): add
percent-repeat-interface to keepAliveInterfaces. This fixes
percent-repeat-harakiri.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3463&tr2=1.3464&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/repeat-percent.ly.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/axis-group-engraver.cc.diff?tr1=1.85&tr2=1.86&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/percent-repeat-engraver.cc.diff?tr1=1.38&tr2=1.39&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ly/engraver-init.ly.diff?tr1=1.225&tr2=1.226&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-context-properties.scm.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3463 lilypond/ChangeLog:1.3464
--- lilypond/ChangeLog:1.3463 Mon Apr 18 14:57:41 2005
+++ lilypond/ChangeLog Mon Apr 18 15:18:16 2005
@@ -1,3 +1,19 @@
+2005-04-18 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+
+ * lily/percent-repeat-engraver.cc (try_music): add measure before
+ next_moment to future processing moment. Fixes:
+ percent-repeat-mm-rest.ly
+ (process_music): don't add moment for 2nd time.
+
+ * input/regression/repeat-percent.ly: add mmrests as extra test.
+
+ * lily/axis-group-engraver.cc (acknowledge_grob): read
+ keepAliveInterfaces to decide what to kill.
+
+ * ly/engraver-init.ly (AncientRemoveEmptyStaffContext): add
+ percent-repeat-interface to keepAliveInterfaces. This fixes
+ percent-repeat-harakiri.
+
2005-04-17 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
* SCons updates.
Index: lilypond/input/regression/repeat-percent.ly
diff -u lilypond/input/regression/repeat-percent.ly:1.20
lilypond/input/regression/repeat-percent.ly:1.21
--- lilypond/input/regression/repeat-percent.ly:1.20 Sat Oct 30 20:55:16 2004
+++ lilypond/input/regression/repeat-percent.ly Mon Apr 18 15:18:16 2005
@@ -1,13 +1,19 @@
\version "2.4.0"
\header {
-texidoc = "Measure repeats may be nested with beat repeats."
+ texidoc = "Measure repeats may be nested with beat repeats."
}
-
-\score { \relative c'' \context Voice { \time 4/4
- % riff
- \repeat "percent" 2 { r8. a16 g8. a16 bes8. a16 f8 d | a c8 ~ c8 d8 ~ d8
r8 r4 }
-
- \repeat "percent" 2 { \repeat "percent" 4 { c8 es } }
- }
+
+\paper {
+ raggedright = ##t
+}
+\relative c'' \context Voice {
+ \set Score.skipBars = ##t
+ \time 4/4
+ % riff
+ \repeat "percent" 2 { r8. a16 g8. a16 bes8. a16 f8 d | a c8 ~ c8 d8 ~ d8 r8
r4 }
+
+ R1*2
+ \repeat "percent" 2 { \repeat "percent" 4 { c8 es } }
+ R1*2
}
Index: lilypond/lily/axis-group-engraver.cc
diff -u lilypond/lily/axis-group-engraver.cc:1.85
lilypond/lily/axis-group-engraver.cc:1.86
--- lilypond/lily/axis-group-engraver.cc:1.85 Tue Apr 12 22:49:29 2005
+++ lilypond/lily/axis-group-engraver.cc Mon Apr 18 15:18:16 2005
@@ -154,11 +154,22 @@
virtual Spanner *get_spanner ();
virtual void acknowledge_grob (Grob_info);
virtual void add_element (Grob *e);
+ virtual void start_translation_timestep ();
+
+ SCM interesting_;
public:
TRANSLATOR_DECLARATIONS (Hara_kiri_engraver);
};
void
+Hara_kiri_engraver::start_translation_timestep ()
+{
+ Axis_group_engraver::start_translation_timestep ();
+ interesting_ = get_property ("keepAliveInterfaces");
+}
+
+
+void
Hara_kiri_engraver::add_element (Grob *e)
{
Hara_kiri_group_spanner::add_element (staffline_, e);
@@ -176,16 +187,19 @@
Hara_kiri_engraver::acknowledge_grob (Grob_info i)
{
Axis_group_engraver::acknowledge_grob (i);
- if (staffline_
- && (i.grob_->internal_has_interface (ly_symbol2scm
("rhythmic-grob-interface"))
- || i.grob_->internal_has_interface (ly_symbol2scm
("lyric-interface"))))
+ if (staffline_)
{
- Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob_);
+ for (SCM s = interesting_; scm_is_pair (s); s = scm_cdr (s))
+ {
+ if (i.grob_->internal_has_interface (scm_car (s)))
+ Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob_);
+ }
}
}
Hara_kiri_engraver::Hara_kiri_engraver ()
{
+ interesting_ = SCM_EOL;
}
ADD_TRANSLATOR (Hara_kiri_engraver,
@@ -194,7 +208,7 @@
/* creats*/ "RemoveEmptyVerticalGroup",
/* accepts */ "",
/* acks */ "grob-interface",
- /* reads */ "",
+ /* reads */ "keepAliveInterfaces",
/* write */ "");
ADD_TRANSLATOR (Axis_group_engraver,
Index: lilypond/lily/percent-repeat-engraver.cc
diff -u lilypond/lily/percent-repeat-engraver.cc:1.38
lilypond/lily/percent-repeat-engraver.cc:1.39
--- lilypond/lily/percent-repeat-engraver.cc:1.38 Tue Apr 12 22:49:28 2005
+++ lilypond/lily/percent-repeat-engraver.cc Mon Apr 18 15:18:16 2005
@@ -93,7 +93,6 @@
else if (Moment (2) * meas_len == body_length_)
{
repeat_sign_type_ = DOUBLE_MEASURE;
- next_moment_ += meas_len;
}
else
{
@@ -105,16 +104,19 @@
repeat_ = m;
Global_context *global = get_global_context ();
- for (int i = 0; i < count; i++)
+ for (int i = 1; i < count; i++)
{
- global->add_moment_to_process (next_moment_
- + Moment (i) * body_length_);
+ Moment m = next_moment_ + Moment (i) * body_length_;
+ global->add_moment_to_process (m);
/* bars between % too. */
if (repeat_sign_type_ == DOUBLE_MEASURE)
- global->add_moment_to_process (next_moment_ + meas_len + Moment (i)
* body_length_);
+ global->add_moment_to_process (m - meas_len);
}
+ if (repeat_sign_type_ == DOUBLE_MEASURE)
+ next_moment_ += meas_len;
+
return true;
}
@@ -144,8 +146,6 @@
get_score_engraver ()->forbid_breaks (); // guh. Use properties!
}
next_moment_ = next_moment_ + body_length_;
-
- get_global_context ()->add_moment_to_process (next_moment_);
}
}
Index: lilypond/ly/engraver-init.ly
diff -u lilypond/ly/engraver-init.ly:1.225 lilypond/ly/engraver-init.ly:1.226
--- lilypond/ly/engraver-init.ly:1.225 Sun Apr 17 20:59:43 2005
+++ lilypond/ly/engraver-init.ly Mon Apr 18 15:18:16 2005
@@ -559,6 +559,7 @@
(Voice Slur direction -1)
)
+ keepAliveInterfaces = #'(rhythmic-grob-interface lyric-interface
percent-repeat-interface)
quotedEventTypes = #'(note-event rest-event time-scaled-music tie-event)
instrumentTransposition = #(ly:make-pitch 0 0 0)
@@ -778,6 +779,7 @@
\override TextSpanner #'enclose-bounds = #1
\override TextSpanner #'edge-text = #'("" . "")
}
+
\context {
\Staff
\name "GregorianTranscriptionStaff"
Index: lilypond/scm/define-context-properties.scm
diff -u lilypond/scm/define-context-properties.scm:1.37
lilypond/scm/define-context-properties.scm:1.38
--- lilypond/scm/define-context-properties.scm:1.37 Sun Apr 17 20:59:43 2005
+++ lilypond/scm/define-context-properties.scm Mon Apr 18 15:18:16 2005
@@ -231,6 +231,8 @@
the instrument. Its value is the pitch that sounds like middle C. This
is used to transpose the MIDI output, and @code{\\quote}s.")
+ (keepAliveInterfaces ,list? "List of symbols, signifying grob interfaces
that
+are worth keeping a RemoveEmptyStaff staff around for.")
(keyAccidentalOrder ,list? " Alist that defines in what order
alterations should be printed. The format is (@var{name}
. @var{alter}), where @var{name} is from 0 .. 6 and @var{alter} from
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs