1 #include "relative-octave-check.hh"
7 yeah, so this should be in a separate file.
11 Relative_octave_check::to_relative_octave (Pitch p)
13 Pitch * check_p = unsmob_pitch (get_property ("pitch"));
19 check_p->get_notename (),
20 check_p->get_alteration ());
22 Pitch result = no_octave.to_relative_octave (p);
24 if (result != *check_p)
26 String s = _("Failed octave check, got: ");
27 s += result.to_string ();
29 origin ()->warning (s);
31 delta_oct = check_p->get_octave () - result.get_octave ();
35 return Pitch (p.get_octave () + delta_oct,
36 p.get_notename (), p.get_alteration ());
39 ADD_MUSIC (Relative_octave_check);