From be201adb38c131af8766b5fcd8cb8417fb9315c4 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 15 May 2002 23:03:15 +0000 Subject: [PATCH] '' --- ChangeLog | 5 ++++ Documentation/user/lilypond-book.itely | 3 +++ input/regression/pedal.ly | 34 ++++++++++++++++---------- lily/include/grob.hh | 14 +++-------- lily/piano-pedal-engraver.cc | 7 ++++-- lily/text-spanner.cc | 4 +-- 6 files changed, 40 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc8062bb52..e20c398ff8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-05-16 Han-Wen + + * lily/piano-pedal-engraver.cc (create_bracket_grobs): fix broken + pedal spanners. + 2002-05-15 Han-Wen Nienhuys * lily/*.cc: remove as many iostream use as possible. diff --git a/Documentation/user/lilypond-book.itely b/Documentation/user/lilypond-book.itely index 43acf821a0..be3ac5734a 100644 --- a/Documentation/user/lilypond-book.itely +++ b/Documentation/user/lilypond-book.itely @@ -327,6 +327,9 @@ right margin. Almost all La@TeX{} commands that change margins and line widths are ignored. +There is no way to automatically apply convert-ly to fragments inside a +lilypond-book file. + Since there is no finder's fee which doubles every year, there is no need to wait for the prize money to grow. So send a bug report today if you need this one of these options. diff --git a/input/regression/pedal.ly b/input/regression/pedal.ly index 119f26a50d..c9550ea2b2 100644 --- a/input/regression/pedal.ly +++ b/input/regression/pedal.ly @@ -1,7 +1,11 @@ \version "1.5.38" \header{ texidoc = "Piano pedal symbols merge stop and start. The strings are configurable. -Text style, bracket style, and a mixture of both are supported. " +Text style, bracket style, and a mixture of both are supported. +Brackets work across line breaks. + +" + } @@ -10,24 +14,28 @@ Text style, bracket style, and a mixture of both are supported. " \score{ \context Staff \notes\relative c'{ -c4 d e f g -\sustainDown b c -c, [d16 c c c] [e e \sustainUp \sustainDown e e ] f4 \sustainUp -g\sustainDown b \sustainUp c -\property Staff.pedalSustainStrings = #'("-" "-P" "P") -\property Staff.SustainPedal \override #'padding = #-2 -c, \sustainDown d e \sustainUp \sustainDown f - \sustainUp g b c +c4 d e f g +\sustainDown b c c, | + [d16 c c c] [e e \sustainUp \sustainDown e e ] f4 \sustainUp + g\sustainDown | + b \sustainUp c + \property Staff.pedalSustainStrings = #'("-" "-P" "P") + \property Staff.SustainPedal \override #'padding = #-2 + c, \sustainDown d e \sustainUp \sustainDown f + \sustainUp g b + + \property Staff.UnaCordaPedal \override #'pedal-type = #'mixed + d \unaCorda e f g + \break + | b b b \treCorde c | + \property Staff.SustainPedal \override #'pedal-type = #'bracket c4 d e \sustainDown b c c, \sustainUp \sustainDown [d8 c] [e8 e \sustainUp \sustainDown] f4 d \sustainUp g \sustainDown b b, \sustainUp c' +c4 -\property Staff.UnaCordaPedal \override #'pedal-type = #'mixed - -c4 d \unaCorda e f g - b \treCorde c } diff --git a/lily/include/grob.hh b/lily/include/grob.hh index 083e34ec46..c01a5fe7a7 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -39,8 +39,6 @@ typedef void (Grob::*Grob_method_pointer) (void); class Grob { public: SCM immutable_property_alist_; - - // rename me to ``property_alist_'' SCM mutable_property_alist_; Grob *original_l_; @@ -52,7 +50,7 @@ public: 0 means ORPHAN, */ char status_c_; - String name () const; + /* IDEA: make this a global variable. This is the same for all @@ -60,21 +58,18 @@ public: scores being formatted multithreadedly. */ Paper_score *pscore_l_; + Dimension_cache dim_cache_[NO_AXES]; Grob (SCM basic_props); Grob (Grob const&); - + String name () const; + /* properties */ SCM internal_get_grob_property (SCM) const; void internal_set_grob_property (SCM, SCM val); -#if 0 - void set_immutable_grob_property (const char * , SCM val); - void set_immutable_grob_property (SCM key, SCM val); -#endif - void warning (String); void set_elt_pointer (const char*, SCM val); @@ -136,7 +131,6 @@ public: void init (); - Dimension_cache dim_cache_[NO_AXES]; public: diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 0a645094eb..5af7b0e4b2 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -350,9 +350,12 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype) pedaltype == ly_symbol2scm ("mixed") ? gh_bool2scm ( (bool) ! p->req_l_drul_[STOP]) : gh_bool2scm (false)); - if (p->item_p_) - p->bracket_p_->set_parent (p->item_p_, Y_AXIS); + /* + Warning: we can't hang the bracket on an item in Y-direction: + it will cause problems when the bracket is broken, because the + item can be on another line. + */ p->bracket_p_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn"))); Axis_group_interface::add_element (p->line_spanner_, p->bracket_p_); diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 5dae3a1226..23220c7559 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -39,8 +39,8 @@ Text_spanner::brew_molecule (SCM smob) { Grob *me= unsmob_grob (smob); Spanner *spanner = dynamic_cast (me); - - if (spanner->internal_has_interface (ly_symbol2scm ("piano-pedal-interface")) ) + + if (spanner->internal_has_interface (ly_symbol2scm ("piano-pedal-interface"))) { setup_pedal_bracket(spanner); } -- 2.39.5