-
- SCM_ASSERT_TYPE (music, mus, SCM_ARG1, __FUNCTION__, "Music");
- SCM_ASSERT_TYPE (odef, output_def, SCM_ARG2, __FUNCTION__, "Output definition");
-
- Cpu_timer timer;
-
- Global_context *trans = new Global_context (odef, music->get_length ());
-
- if (!trans)
- {
- programming_error ("no toplevel translator");
- return SCM_BOOL_F;
- }
- progress_indication (_ ("Interpreting music... "));
-
- SCM protected_iter = Music_iterator::get_static_get_iterator (music);
- Music_iterator * iter = unsmob_iterator (protected_iter);
- iter->init_translator (music, trans);
-
- iter->construct_children ();
-
- if (!iter->ok ())
- {
- warning (_ ("Need music in a score"));
- /* todo: should throw exception. */
- return SCM_BOOL_F;
- }
-
- trans->run_iterator_on_me (iter);
- iter->quit ();
- scm_remember_upto_here_1 (protected_iter);
- trans->finish ();
-
- if (verbose_global_b)
- progress_indication (_f ("elapsed time: %.2f seconds", timer.read ()));
-
- return scm_gc_unprotect_object (trans->self_scm ());
-}
+ header_ = ly_make_anonymous_module (false);
+ if (ly_c_module_p (s.header_))
+ ly_module_copy (header_, s.header_);