"All output definitions in a score.")
{
LY_ASSERT_SMOB (Score, score, 1);
- Score *sc = unsmob_score (score);
+ Score *sc = Score::unsmob (score);
SCM l = SCM_EOL;
for (vsize i = 0; i < sc->defs_.size (); i++)
{
LY_ASSERT_SMOB (Score, score, 1);
LY_ASSERT_SMOB (Output_def, def, 2);
- Score *sc = unsmob_score (score);
- Output_def *output_def = unsmob_output_def (def);
+ Score *sc = Score::unsmob (score);
+ Output_def *output_def = Output_def::unsmob (def);
sc->add_output_def (output_def);
return SCM_UNSPECIFIED;
}
"Return score header.")
{
LY_ASSERT_SMOB (Score, score, 1);
- Score *sc = unsmob_score (score);
+ Score *sc = Score::unsmob (score);
return sc->get_header ();
}
SCM_ASSERT_TYPE (ly_is_module (module), module, SCM_ARG2, __FUNCTION__,
"module");
- Score *sc = unsmob_score (score);
+ Score *sc = Score::unsmob (score);
sc->set_header (module);
return SCM_UNSPECIFIED;
}
"Return score music.")
{
LY_ASSERT_SMOB (Score, score, 1);
- Score *sc = unsmob_score (score);
+ Score *sc = Score::unsmob (score);
return sc->get_music ();
}
"Was there an error in the score?")
{
LY_ASSERT_SMOB (Score, score, 1);
- Score *sc = unsmob_score (score);
+ Score *sc = Score::unsmob (score);
return scm_from_bool (sc->error_found_);
}
LY_ASSERT_SMOB (Score, score, 1);
LY_ASSERT_SMOB (Output_def, layout, 2);
- Score *sc = unsmob_score (score);
- Output_def *od = unsmob_output_def (layout);
+ Score *sc = Score::unsmob (score);
+ Output_def *od = Output_def::unsmob (layout);
if (sc->error_found_)
return SCM_EOL;
if (!score_def)
return SCM_BOOL_F;
- score_def = scale_output_def (score_def, output_scale (od));
+ /* Don't rescale if the layout has already been scaled */
+ if (to_boolean (score_def->c_variable ("cloned")))
+ score_def = score_def->clone ();
+ else
+ score_def = scale_output_def (score_def, output_scale (od));
+
score_def->parent_ = od;
SCM context = ly_run_translator (sc->get_music (), score_def->unprotect ());