]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/define-context-properties.scm
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 4 Jul 2004 12:15:09 +0000 (12:15 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 4 Jul 2004 12:15:09 +0000 (12:15 +0000)
(all-user-translation-properties): change voltaOnThisStaff
definition. Backport?

* lily/volta-engraver.cc (stop_translation_timestep): set bounds
if necessary.

* lily/volta-bracket.cc (print): handle volta brackets without
bars.

ChangeLog
Documentation/topdocs/NEWS.texi
Documentation/user/advanced.itely
Documentation/user/notation.itely
lily/volta-bracket.cc
lily/volta-engraver.cc
ly/engraver-init.ly
scm/define-context-properties.scm

index 9ee0a70f0eeda6ff8bafc6d859b0c18ec886fd25..a9fa5fee63787218055d3e18d54c465ae09af5af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2004-07-04  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * scm/define-context-properties.scm
+       (all-user-translation-properties): change voltaOnThisStaff
+       definition. Backport? 
+
+       * lily/volta-engraver.cc (stop_translation_timestep): set bounds
+       if necessary.
+
+       * lily/volta-bracket.cc (print): handle volta brackets without
+       bars. 
+
 2004-07-01  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scripts/abc2ly.py (try_parse_chord_delims): Bugfix: update to
index 22858430803b145fc5df4318b45a7c030c537e00..5eb687ea8c99801d14712eaf6bd983cf2472a863 100644 (file)
@@ -26,7 +26,11 @@ following code may be used.
 @end example
 
 @item A new block, @code{\bookpaper} has been introduced to
-hold settings for paper size and output scaling.
+hold settings for paper size and output scaling. Further options
+include @code{raggedbottom} (if set, systems are not vertically filled
+to reach the bottom of the page), and @code{raggedlastbottom}.
+
+
 
 @item Support for fret diagrams  has been contributed by Carl
 D. Sorensen. @file{input/test/fret-diagram.ly} contains an example.
index 339ca90fce8b2f961251927c56a0c27af4f01e66..385ad001fd4114fa9f34cecefac660d1b3314b7d 100644 (file)
@@ -87,7 +87,7 @@ interactions between different modules of LilyPond.
 
 LilyPond includes an interpreter for the programming language Scheme,
 a member of the LISP family. This interpreter,
-@uref{GUILE,http://www.gnu.org/software/guile/}, 
+@uref{http://www.gnu.org/software/guile/,GUILE}, 
 forms the basis of the 
 
 ****************************************************************
index bc6f0bdd45ef9fc96c045f2c02b4284c69c5a927..48dda9a530595023e2f77135a4acc859ceecb669 100644 (file)
@@ -2546,6 +2546,13 @@ c1
 }
 @end lilypond
 
+@seealso
+
+Brackets for the repeat are normally only printed over the topmost
+staff. This can be adjusted by setting the @code{voltaOnThisStaff}
+property @inputfileref{input/regression,volta-multi-staff.ly},
+@inputfileref{input/regression,volta-chord-names.ly}
+
 @refbugs
 
 A nested repeat like
@@ -2563,6 +2570,16 @@ having the @code{\alternative} belong to the inner @code{\repeat}.
 For clarity, it is advisable to use braces in such situations.
 @cindex ambiguity
 
+
+
+Timing information is not remembered at the start of an alternative,
+so after a repeat timing information must be reset by hand, for
+example by setting @code{Score.measurePosition} or entering
+@code{\partial}.  Similarly, slurs or ties are also not repeated.
+
+
+
+
 @node Repeats and MIDI
 @subsection Repeats and MIDI
 
@@ -2572,13 +2589,6 @@ For instructions on how to expand repeats for MIDI output, see the
 example file @inputfileref{input/test,unfold-all-repeats.ly}.
 
 
-@refbugs
-
-Timing information is not remembered at the start of an alternative,
-so after a repeat timing information must be reset by hand, for
-example by setting @code{Score.measurePosition} or entering
-@code{\partial}.  Similarly, slurs or ties are also not repeated.
-
 
 @node Manual repeat commands
 @subsection Manual repeat commands
@@ -3670,24 +3680,6 @@ Program reference: Layout objects @internalsref{LyricText} and
 @internalsref{VocalName}.  Music expressions
 @internalsref{LyricEvent}.
 
-@refbugs
-
-@cindex ambiguity
-
-Input for lyrics introduces a syntactical ambiguity
-@example 
-foo = bar 
-@end example 
-
-@noindent
-is interpreted as assigning a string identifier @code{\foo} such that
-it contains @code{"bar"}.  However, it could also be interpreted as
-making or a music identifier @code{\foo} containing the syllable
-`bar'.  The force the latter interpretation, use
-@example
-foo = \lyrics bar4
-@end example
 
 
 @node Ambitus
@@ -4362,6 +4354,9 @@ names, for example
 }
 @end lilypond
 
+For longer instrument names, it may be useful to increase the
+@code{indent} setting in the @code{\paper} block.
+
 @seealso
 
 Program reference: @internalsref{InstrumentName}.
@@ -7594,6 +7589,10 @@ The MIDI output allocates a channel for each Staff, and one for global
 settings.  Hence, the MIDI file should not have more than 15 staves
 (or 14 if you do not use drums). Other staves will remain silent.
 
+Not all MIDI players correctly handle tempo change in the MIDI
+output. Players that are known to work include
+@uref{timidity,http://timidity.sourceforge.net/}
+
 
 @menu
 * MIDI block::                  
index 9f4d8a505f8d87c54e5f6449906dc031b1f0a094..0d2d93a491053fc2e1b5c8f0469631db01c4eb7a 100644 (file)
@@ -37,12 +37,6 @@ SCM
 Volta_bracket_interface::print (SCM smob) 
 {
   Grob *me = unsmob_grob (smob);
-  Link_array<Item> bars
-    = Pointer_group_interface__extract_grobs (me, (Item*)0, "bars");
-
-  if (!bars.size ())
-    return SCM_EOL;
-
   Spanner *orig_span =  dynamic_cast<Spanner*> (me->original_);
 
   bool broken_first_bracket = orig_span && (orig_span->broken_intos_[0] == (Spanner*)me);
@@ -52,14 +46,14 @@ Volta_bracket_interface::print (SCM smob)
   bool no_vertical_start = orig_span && !broken_first_bracket;
   bool no_vertical_end = orig_span && !broken_last_bracket;
   SCM s = me->get_property ("bars");
-  Grob * endbar =   unsmob_grob (ly_car (s));
-  SCM glyph = endbar->get_property ("glyph");
+  Grob * endbar = ly_c_pair_p (s) ?  unsmob_grob (ly_car (s)) : 0;
+  SCM glyph = endbar ? endbar->get_property ("glyph") : SCM_EOL;
   
   String str;
   if (ly_c_string_p (glyph))
     str = ly_scm2string (glyph);
   else
-    return SCM_EOL;
+    str = "|";
   
   const char* cs = str.to_str0 ();
   no_vertical_end |=
index 6215489426a523c0ad6b280c779c0575f351fd6a..15fe9e9c0c1e5433b4aca179f173b58868a21b45 100644 (file)
@@ -60,41 +60,42 @@ Volta_engraver::Volta_engraver ()
 bool
 Volta_engraver::staff_eligible ()
 {
-  /*
-    UGH.
-   */
-  if (!unsmob_grob (staff_))
-    return true;
-  
-  if (!to_boolean (get_property ("voltaOnThisStaff")))
+  SCM doit =get_property ("voltaOnThisStaff");
+  if (ly_c_boolean_p (doit))
     {
-      /*
-       TODO: this does weird things when you open a piece with a
-       volta spanner.
-       
-       */
-      SCM staffs = get_property ("stavesFound");
+      return to_boolean (doit);
+    }
 
-      /*
-       only put a volta on the top staff.
+
+  if (!unsmob_grob (staff_))
+    return false;
+
+  /*
+    TODO: this does weird things when you open a piece with a
+    volta spanner.
+  */
+  SCM staffs = get_property ("stavesFound");
+
+  /*
+    only put a volta on the top staff.
        
-       May be this is a bit convoluted, and we should have a single
-       volta engraver in score context or somesuch.
+    May be this is a bit convoluted, and we should have a single
+    volta engraver in score context or somesuch.
        
-      */
-      if (!ly_c_pair_p (staffs))
-       {
-         programming_error ("Huh? Volta engraver can't find staffs?");
-         return false;
-       }
-      else if (ly_car (scm_last_pair (staffs)) != staff_)
-       {
-         return false;
-       }
+  */
+  if (!ly_c_pair_p (staffs))
+    {
+      programming_error ("Huh? Volta engraver can't find staffs?");
+      return false;
+    }
+  else if (ly_car (scm_last_pair (staffs)) != staff_)
+    {
+      return false;
     }
   return true;
 }
 
+
 void
 Volta_engraver::process_music ()
 {
@@ -227,7 +228,22 @@ Volta_engraver::stop_translation_timestep ()
       volta_span_ = 0;
     }
   
+  if (end_volta_span_ && !end_volta_span_->get_bound (RIGHT))
+    {
+      Grob * cc = unsmob_grob (get_property ("currentCommandColumn"));
+      Item * ci = dynamic_cast<Item*> (cc);
+      end_volta_span_->set_bound (RIGHT, ci);
+    }
+
   end_volta_span_ =0;
+
+  if (volta_span_ && !volta_span_->get_bound (LEFT))
+    {
+      Grob * cc = unsmob_grob (get_property ("currentCommandColumn"));
+      Item * ci = dynamic_cast<Item*> (cc);
+      volta_span_->set_bound (LEFT, ci);
+    }
+  
 }
 
 /*
@@ -235,7 +251,7 @@ Volta_engraver::stop_translation_timestep ()
  */
 
 ENTER_DESCRIPTION (Volta_engraver,
-/* descr */       "Make volta brackets",
+/* descr */       "Make volta brackets.",
 /* creats*/       "VoltaBracket",
 /* accepts */     "",
 /* acks  */       "bar-line-interface staff-symbol-interface note-column-interface",
index 0b2a4479028ada041961dd98beaac68d79413eed..a8b80d096a778051359a84bbb7e9c7b439e74e70 100644 (file)
@@ -352,6 +352,8 @@ printing of a single line of lyrics.  "
     \type "Engraver_group_engraver"
     \name ChordNames
     \description "Typesets chord names."
+
+    \consists "Volta_engraver"
     
     \consists "Rest_swallow_translator" 
     \consists "Output_property_engraver"       
@@ -360,6 +362,7 @@ printing of a single line of lyrics.  "
     \consists "Skip_event_swallow_translator"
     \consistsend "Hara_kiri_engraver"
     
+    voltaOnThisStaff = ##f
     minimumVerticalExtent = #'(0 . 2.5)
     extraVerticalExtent = ##f
     \override SeparatingGroupSpanner #'padding = #0.8
index 85e926711a0313c4be06a850f072fe98e26ca506..18382269ddba755937f8e6548e4a8106874d25f9 100644 (file)
@@ -393,8 +393,8 @@ vertical group.")
 
      (voltaOnThisStaff ,boolean?
                       "Normally, volta brackets are put only on the
-topmost staff. Setting this variable will create a bracket on
-this staff as well.")
+topmost staff.  This variable overrides this behavior, when set to
+@code{#t} or @code{#f}.")
 
      (voltaSpannerDuration ,ly:moment? "This specifies the maximum duration
 to use for the brackets printed for @code{\\alternative}.  This can be