+LY_DEFINE (ly_make_music_relative_x, "ly:make-music-relative!",
+ 2, 0, 0, (SCM music, SCM pitch),
+ "Make @var{music} relative to @var{pitch},"
+ " return final pitch.")
+{
+ LY_ASSERT_SMOB (Music, music, 1);
+ LY_ASSERT_SMOB (Pitch, pitch, 2);
+
+ Pitch start = *Pitch::unsmob (pitch);
+ Music *m = Music::unsmob (music);
+ Pitch last = m->to_relative_octave (start);
+
+ return last.smobbed_copy ();
+}
+