X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fevent.cc;h=bdadc3283c686c0be4bab3abe3cdcdbe8eb1e135;hb=ca20eaa74e7e762c0611de26cc2267909ae27e02;hp=d4beba4c13b3cdc6833800fc73960fabda15f1a0;hpb=02c7d07616fd310070e32b262959bc50f2cbd404;p=lilypond.git diff --git a/lily/event.cc b/lily/event.cc index d4beba4c13..bdadc3283c 100644 --- a/lily/event.cc +++ b/lily/event.cc @@ -3,13 +3,13 @@ source file of the GNU LilyPond music typesetter - (c) 1996--2004 Han-Wen Nienhuys + (c) 1996--2005 Han-Wen Nienhuys */ #include "event.hh" #include "warn.hh" -MAKE_SCHEME_CALLBACK(Event,length_callback,1); +MAKE_SCHEME_CALLBACK(Event, length_callback, 1); SCM Event::length_callback (SCM m) { @@ -23,36 +23,6 @@ Event::length_callback (SCM m) } return mom.smobbed_copy(); } - - -Pitch -Event::to_relative_octave (Pitch last) -{ - Pitch *old_pit = unsmob_pitch (get_property ("pitch")); - if (old_pit) - { - Pitch new_pit = *old_pit; - new_pit = new_pit.to_relative_octave (last); - - SCM check = get_property ("absolute-octave"); - if (scm_is_number (check) && - new_pit.get_octave () != scm_to_int (check)) - { - Pitch expected_pit (scm_to_int (check), - new_pit.get_notename (), - new_pit.get_alteration ()); - origin ()->warning (_f ("octave check failed; expected %s, found: %s", - expected_pit.to_string (), - new_pit.to_string ())); - new_pit = expected_pit; - } - - set_property ("pitch", new_pit.smobbed_copy ()); - - return new_pit; - } - return last; -} Event::Event (SCM i) : Music (i) @@ -65,17 +35,5 @@ Event::Event (SCM i) ADD_MUSIC (Event); -Key_change_ev::Key_change_ev (SCM x) - : Event (x) -{ -} -void -Key_change_ev::transpose (Pitch p) -{ - SCM pa = get_property ("pitch-alist"); - set_property ("pitch-alist", ly_transpose_key_alist (pa, p.smobbed_copy ())); - Event::transpose (p); -} -ADD_MUSIC (Key_change_ev);