+ debug_output (_f ("elapsed time: %.2f seconds", timer.read ()));
+
+ return ctx;
+}
+
+LY_DEFINE (ly_run_translator, "ly:run-translator",
+ 2, 1, 0, (SCM mus, SCM output_def),
+ "Process @var{mus} according to @var{output-def}. An"
+ " interpretation context is set up, and @var{mus} is"
+ " interpreted with it. The context is returned in its"
+ " final state.\n"
+ "\n"
+ "Optionally, this routine takes an object-key to"
+ " to uniquely identify the score block containing it.")
+{
+ LY_ASSERT_SMOB (Music, mus, 1);
+ LY_ASSERT_SMOB (Output_def, output_def, 2);
+
+ SCM glob = ly_make_global_context (output_def);
+ ly_make_global_translator (glob);
+ ly_interpret_music_expression (mus, glob);
+ return glob;