]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/titling.scm (default-score-title): remove caps for piece.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 9 Oct 2004 13:41:27 +0000 (13:41 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 9 Oct 2004 13:41:27 +0000 (13:41 +0000)
* lily/include/slur-scoring.hh (struct Slur_score_state): new file

* lily/include/slur-configuration.hh (class Slur_configuration):
new file.

* lily/slur-configuration.cc: new file. move scoring functions
into Slur_configuration.

* lily/slur-scoring.cc (Slur_score_state): change static functions
to methods of Slur_score_state.

ChangeLog
lily/accidental-engraver.cc
lily/auto-beam-engraver.cc
lily/bar-number-engraver.cc
lily/beam-engraver.cc
lily/chord-tremolo-engraver.cc
lily/multi-measure-rest-engraver.cc
lily/percent-repeat-engraver.cc
lily/timing-translator.cc

index c68ee31d0df0caa31f661f9e80922e6cd85a1be2..ef01edc548dee3edb0411c4d5d383f938cd92b56 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-10-09  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/*.cc: use robust_scm2moment() where appropriate.
+
+       * lily/tuplet-engraver.cc (try_music): 
+
        * lily/moment.cc (robust_scm2moment): new function.
 
        * scm/titling.scm (default-score-title): remove caps for piece.
index d2182a4b1d2f8276ae2b93caa8f6f47828922ab4..648b1ccf8b0ec089f8a90ff8a6b5ac15673b33df 100644 (file)
@@ -300,7 +300,7 @@ Accidental_engraver::get_bar_number ()
 
   int bn = robust_scm2int (barnum, 0);
   
-  Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+  Moment mp = robust_scm2moment (smp,  Moment (0));
   if (mp.main_part_ < Rational (0))
     bn--;
   
index 51220537eca12f99602b6b18f457f78951e344fb..0e8aa359798e42d11a0e5aabafc87af40a5580c1 100644 (file)
@@ -188,10 +188,7 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom)
   /* end beam at end of beat */
   if (dir == STOP)
     {
-      SCM beat (get_property ("beatLength"));
-      
-      if (unsmob_moment (beat))
-       moment = *unsmob_moment (beat);
+      moment = robust_scm2moment (get_property ("beatLength"), moment)
     }
 
   /* second guess: property generic time exception */
index e0a6917648ce27e6d6bc55de887b7c12d551dd04..96e4afb2e75d2b874f39e1747fbec36b57c70549 100644 (file)
@@ -47,9 +47,7 @@ Bar_number_engraver::process_music ()
   
   if (scm_is_string (wb))
     {
-      SCM smp = get_property ("measurePosition");
-      
-      Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+      Moment mp (robust_scm2moment (get_property ("measurePosition"),Moment (0));
       if (mp.main_part_ == Rational (0))
        {
          SCM bn = get_property ("currentBarNumber");
index 4e6238bedf35859f456933059ca9f06db9f2c362..07c45a7813d357ab3ab521a25b8e72b44da8ae82 100644 (file)
@@ -143,8 +143,7 @@ Beam_engraver::process_music ()
       set_melisma (true);
       prev_start_ev_ = start_ev_;
       beam_ = make_spanner ("Beam", start_ev_->self_scm ());
-      SCM smp = get_property ("measurePosition");
-      Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+      Moment mp (robust_scm2moment (get_property ("measurePosition"), Moment (0));
 
       beam_start_location_ = mp;
       beam_start_mom_ = now_mom ();
@@ -181,7 +180,7 @@ Beam_engraver::start_translation_timestep ()
       set_melisma (true);
       
       subdivide_beams_ = to_boolean (get_property ("subdivideBeams"));
-      beat_length_ = *unsmob_moment (get_property ("beatLength"));
+      beat_length_ = robust_scm2moment (get_property ("beatLength"), Moment (1,4));
     }
 }
 
index ab2dc0d39a979525dc49c1382fed3a451ca73e35..41b5448fcd2a21a73dbe2d2af8ef0836d8b76e72 100644 (file)
@@ -124,10 +124,8 @@ Chord_tremolo_engraver::process_music ()
       beam_ = make_spanner ("Beam", repeat_->self_scm ());
       beam_->set_property ("chord-tremolo", SCM_BOOL_T);
 
-      SCM smp = get_property ("measurePosition");
-      Moment mp
-       = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
-      beam_start_location_ = mp;
+      SCM smp = 
+      beam_start_location_ = robust_scm2moment (get_property ("measurePosition"), Moment (0));
     }
 }
 
index 4b69b38de4122fd4785536c6680ef71cd7f090ed..d752115505a1242ad0ae620caad04d7dfb6540a0 100644 (file)
@@ -174,8 +174,8 @@ Multi_measure_rest_engraver::stop_translation_timestep ()
     }
   
   
-  SCM smp = get_property ("measurePosition");
-  Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+  
+  Moment mp(robust_scm2moment (get_property ("measurePosition"),  Moment (0));
 
   if (last_rest_)
     {
@@ -196,8 +196,7 @@ Multi_measure_rest_engraver::start_translation_timestep ()
 
   bar_seen_ = false;
 
-  SCM smp = get_property ("measurePosition");
-  Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+  Moment mp(robust_scm2moment (get_property ("measurePosition"),  Moment (0));
 
   Moment now =now_mom ();
   if (mmrest_
index 16de3b513d7ff250a5d35cd7a591f3c5cca7d587..2639dfabdc32609998887328f219413f35292747 100644 (file)
@@ -93,11 +93,7 @@ Percent_repeat_engraver::try_music (Music * m)
       stop_mom_ = start_mom_ + Moment (count) * body_length_;
       next_moment_ = start_mom_ + body_length_;
 
-      SCM m = get_property ("measureLength");
-      Moment meas_len;
-      if (unsmob_moment (m))
-       meas_len = *unsmob_moment (m);
-
+      Moment meas_len (robust_scm2moment (get_property ("measureLength"), Moment (1)));
       if (meas_len == body_length_)
        repeat_sign_type_ = MEASURE;
       else if (Moment (2)* meas_len == body_length_)
index 69257cffb9bdb391f6cd98468e5939dec07a3b38..9fde83d395c7d5c51e02e5719ea21735e12b0120 100644 (file)
@@ -126,7 +126,7 @@ Timing_translator::start_translation_timestep ()
     {
       measposp = now;
       context ()->set_property ("measurePosition",
-                                   measposp.smobbed_copy ());
+                               measposp.smobbed_copy ());
     }
   
   measposp += dt;