Pitch np = p->transposed (delta);
- if (abs (np.get_alteration ()) > 2)
+ if (abs (np.get_alteration ()) > DOUBLE_SHARP)
{
warning (_f ("Transposition by %s makes alteration larger than two",
delta.to_string ()));
{
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;