]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/piano-pedal-engraver.cc (finalize): attach unfinished
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 10 Mar 2004 11:06:06 +0000 (11:06 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 10 Mar 2004 11:06:06 +0000 (11:06 +0000)
bracket to last command column.

* lily/piano-pedal-bracket.cc (print): only flatten bracket if it
continues on next/prev system.

* input/regression/pedal-end.ly: new file.

ChangeLog
Documentation/topdocs/NEWS.texi
Documentation/user/notation.itely
input/regression/pedal-end.ly [new file with mode: 0644]
lily/piano-pedal-bracket.cc
lily/piano-pedal-engraver.cc
scripts/GNUmakefile

index 4af78bd08dc86059388ba667b8d68f999302516d..10000605ba94b680ac7e0faf32cc8f79b209479f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-03-10  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * lily/piano-pedal-engraver.cc (finalize): attach unfinished
+       bracket to last command column.
+
+       * lily/piano-pedal-bracket.cc (print): only flatten bracket if it
+       continues on next/prev system.
+
+       * input/regression/pedal-end.ly: new file.
+
 2004-03-10  Werner Lemberg  <wl@gnu.org>
 
        * make/lilypond.redhat.spec.in, make/lilypond.suse.spec.in:
@@ -21,6 +31,8 @@
 
 2004-03-10  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/input-file-results.cc (do_one_file): use new Paper_book()
+
        * lily/score.cc (default_rendering): clean protection.
 
        * lily/paper-book.cc (mark_smob): implement smob marking.
index c6de4acd6a34180fa8a7d4b79e001078bd504b92..5a87cbd95bc529b9afcf04b4c5ebdb74c6b5b049 100644 (file)
@@ -7,15 +7,6 @@
 
 @chapter New features in 2.1 since 2.0
 
-@ignore
-Unreleased:
-
-@itemize
-@end itemize
-
-Version 2.1.13
-@end ignore
-
 @itemize @bullet
 
 @item Context definitions now use the word @code{\context} instead of @code{\translator}.
@@ -48,15 +39,15 @@ instrument. For example,
 @end verbatim
 
 @item The transposition of an instrument can be specified using the
-@code{\transposition} command. The following command specifies an
-E-flat alto saxophone:
+@code{\transposition} command.  An
+E-flat alto saxophone is specified as 
 
 @example
   \transposition es'
 @end example 
 
 @item The naming of exported Scheme functions now follows Scheme conventions.
-Changes be applied to Scheme files with convert-ly:
+Changes be applied to Scheme files with 
 
 @example
         convert-ly -e -n --from=2.1.24 --to=2.1.26 *.scm 
@@ -64,7 +55,7 @@ Changes be applied to Scheme files with convert-ly:
 
 
 @item Notes can  be excluded from auto-beaming, by  marking them with
-@code{\noBeam}:
+@code{\noBeam}
 @example
   c8 c \noBeam c c 
 @end example
index f97d8025ef58a6feb15e492286be9d89a3aaa9bc..a9f32c78b5790067830ebb775ef81df7f0c86e66 100644 (file)
@@ -3048,30 +3048,30 @@ information.
 Pedals can also be indicated by a sequence of brackets, by setting the 
 @code{pedalSustainStyle} property to @code{bracket} objects: 
 
-@lilypond[fragment,verbatim]
+@lilypond[fragment,verbatim,relative=2]
  \set Staff.pedalSustainStyle = #'bracket
- c''4\sustainDown d''4 e''4
a'4\sustainUp\sustainDown
- f'4 g'4 a'4\sustainUp
+ c\sustainDown d e
b\sustainUp\sustainDown
+ b g \sustainUp a \sustainDown \bar "|."
 @end lilypond
 
 A third style of pedal notation is a mixture of text and brackets,
 obtained by setting the @code{pedalSustainStyle} style property to
 @code{mixed}:
 
-@lilypond[fragment,verbatim]
+@lilypond[fragment,verbatim,relative=2]
  \set Staff.pedalSustainStyle = #'mixed
-c''4\sustainDown d''4 e''4
-c'4\sustainUp\sustainDown
- f'4 g'4 a'4\sustainUp
+ c\sustainDown d e
+ b\sustainUp\sustainDown
+ b g \sustainUp a \sustainDown \bar "|."
 @end lilypond
 
 The default `*Ped.' style for sustain and damper pedals corresponds to
 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
 default.
 
-@lilypond[fragment,verbatim]
-c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
+@lilypond[fragment,verbatim,relative=2]
+  c\sostenutoDown d e c, f g a\sostenutoUp
 @end lilypond
 
 For fine-tuning of the appearance of a pedal bracket, the properties
@@ -3083,8 +3083,7 @@ bracket may be extended to the end of the note head:
 @lilypond[fragment,verbatim]
 \override Staff.PianoPedalBracket  
    #'shorten-pair = #'(0 . -1.0)
-c''4\sostenutoDown d''4 e''4 c'4
-f'4 g'4 a'4\sostenutoUp
+  c\sostenutoDown d e c, f g a\sostenutoUp
 @end lilypond
 
 @node Arpeggio
diff --git a/input/regression/pedal-end.ly b/input/regression/pedal-end.ly
new file mode 100644 (file)
index 0000000..7a44711
--- /dev/null
@@ -0,0 +1,15 @@
+\version "2.1.29"
+\header {
+
+    texidoc = "Unterminated piano pedal brackets run to the end of the piece. "
+
+}
+
+\score {
+    \notes {
+       \set Staff.pedalSustainStyle = #'bracket
+       c4 \sustainDown
+       \bar "|."
+    }
+    \paper { raggedright  = ##t }
+}
index 52afd47c530f2f1c8c67d6066926b4df7dc5fb47..74e09979fd59d510ec951445e1a80256ccf45f4b 100644 (file)
@@ -24,6 +24,7 @@ SCM
 Piano_pedal_bracket::print (SCM smob)
 {
   Spanner *me = dynamic_cast<Spanner*> (unsmob_grob (smob));
+  Spanner *orig = dynamic_cast<Spanner*> (me->original_); 
   
   Drul_array<bool> broken (false,false);
   Drul_array<Real> height = robust_scm2drul
@@ -47,8 +48,15 @@ Piano_pedal_bracket::print (SCM smob)
       Item *b = me->get_bound (d);
       broken[d] = b->break_status_dir () != CENTER;
       if (broken[d])
-       height[d] = 0.0;
-
+       {
+         if (orig
+             && ((d == RIGHT && me->get_break_index () != orig->broken_intos_.size()-1)
+                 || (d == LEFT && me->get_break_index ())))
+           height[d] = 0.0;
+         else
+           flare[d] = 0.0; 
+       }
+      
       Interval ext   = b->extent (common,  X_AXIS);
       span_points[d] = ext [broken[d] ?  RIGHT : LEFT];
     }
index b26d280600057a5530f7aa5ac19b5deaad846452..f04f31c413e91a90892226400bb3a32202cc3974 100644 (file)
@@ -444,20 +444,31 @@ Piano_pedal_engraver::finalize ()
          && !p->line_spanner_->live ())
        p->line_spanner_ = 0;
       
-      if (p->line_spanner_)
-       {
-         p->finished_line_spanner_ = p->line_spanner_;
-         typeset_all ();
-       }
       if (p->bracket_
          && !p->bracket_->live ())
        p->bracket_ = 0;
       
       if (p->bracket_)
        {
-         p->current_bracket_ev_->origin ()->warning (_ ("unterminated pedal bracket"));
-         p->bracket_->suicide ();
+         SCM cc = get_property ("currentCommandColumn");
+         Item *c = unsmob_item (cc);
+         if (p->line_spanner_)
+           {
+             p->line_spanner_->set_bound (RIGHT, c);
+           }
+         p->bracket_ ->set_bound (RIGHT, c);
+
+         p->finished_bracket_ = p->bracket_;
          p->bracket_ = 0;
+         p->finished_line_spanner_ = p->line_spanner_;
+         p->line_spanner_ = 0;
+         typeset_all ();
+       }
+
+      if (p->line_spanner_)
+       {
+         p->finished_line_spanner_ = p->line_spanner_;
+         typeset_all ();
        }
     }
 }
@@ -557,5 +568,8 @@ ENTER_DESCRIPTION (Piano_pedal_engraver,
 /* creats*/       "SostenutoPedal SustainPedal UnaCordaPedal SostenutoPedalLineSpanner SustainPedalLineSpanner UnaCordaPedalLineSpanner",
 /* accepts */     "pedal-event",
 /* acks  */       "note-column-interface",
-/* reads */       "pedalSostenutoStrings pedalSustainStrings pedalUnaCordaStrings pedalSostenutoStyle pedalSustainStyle pedalUnaCordaStyle",
+/* reads */       "currentCommandColumn "
+                  "pedalSostenutoStrings pedalSustainStrings "
+                  "pedalUnaCordaStrings pedalSostenutoStyle "
+                  "pedalSustainStyle pedalUnaCordaStyle",
 /* write */       "");
index 72a36b01531872af9d7ab31f069a0904afd4d516..2c0ad847fecc1c302b534bdefd751156178d2831 100644 (file)
@@ -1,6 +1,6 @@
 depth = ..
 
-SEXECUTABLES=convert-ly lilypond-book lilypond abc2ly etf2ly musedata2ly mup2ly midi2ly
+SEXECUTABLES=convert-ly lilypond-book lilypond abc2ly etf2ly musedata2ly  mup2ly midi2ly
 STEPMAKE_TEMPLATES=script help2man po
 LOCALSTEPMAKE_TEMPLATES = lilypond
 HELP2MAN_EXECS = $(SEXECUTABLES)