]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/event.cc
* lily/sequential-iterator.cc (run_always): implement run_always().
[lilypond.git] / lily / event.cc
index 75948dac04d13e376988b7d4b7b23346c2f1a83d..ed0a826c697c235ddf4567fcf0f79099ec59e8fd 100644 (file)
@@ -61,6 +61,22 @@ Event::to_relative_octave (Pitch last)
     {
       Pitch new_pit = *old_pit;
       new_pit = new_pit.to_relative_octave (last);
+
+      SCM check = get_mus_property ("absolute-octave");
+      if (gh_number_p (check) &&
+         new_pit.get_octave () != gh_scm2int (check))
+       {
+         String s =_("Failed octave check, got: ");
+         s += new_pit.to_string ();
+         new_pit = Pitch (gh_scm2int (check),
+                          new_pit.get_notename (),
+                          new_pit.get_alteration ());
+
+         s += " expected ";
+         s += new_pit.to_string ();
+         origin ()->warning (s);
+       }
+      
       set_mus_property ("pitch", new_pit.smobbed_copy ());
   
       return new_pit;