#include "music.hh"
#include "output-def.hh"
#include "global-context.hh"
-#include "lilypond-key.hh"
#include "music-output.hh"
#include "paper-score.hh"
#include "paper-book.hh"
(SCM music),
"Return score with @var{music} encapsulated in @var{score}.")
{
+ LY_ASSERT_SMOB (Music, music, 1);
Music *mus = unsmob_music (music);
- SCM_ASSERT_TYPE (mus, music, SCM_ARG1, __FUNCTION__, "music");
Score *score = new Score;
score->set_music (music);
1, 0, 0, (SCM score),
"All output defs in a score.")
{
+ LY_ASSERT_SMOB (Score, score, 1);
Score *sc = unsmob_score (score);
- SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "score");
SCM l = SCM_EOL;
for (vsize i = 0; i < sc->defs_.size (); i++)
1, 0, 0, (SCM score),
"return score header.")
{
+ LY_ASSERT_SMOB (Score, score, 1);
Score *sc = unsmob_score (score);
- SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "score");
return sc->header_;
}
1, 0, 0, (SCM score),
"return score music.")
{
+ LY_ASSERT_SMOB (Score, score, 1);
Score *sc = unsmob_score (score);
- SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "score");
return sc->get_music ();
}
1, 0, 0, (SCM score),
"Was there an error in the score?")
{
+ LY_ASSERT_SMOB (Score, score, 1);
Score *sc = unsmob_score (score);
- SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "score");
return scm_from_bool (sc->error_found_);
}
LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format",
- 2, 1, 0, (SCM score, SCM layout, SCM key),
+ 2, 0, 0, (SCM score, SCM layout),
"Run @var{score} through @var{layout}, an output definition, "
"scaled to correct output-scale already, "
"return a list of layout-lines. "
"\nTake optional Object_key argument.")
{
+ 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);
if (sc->error_found_)
return SCM_EOL;
- SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "Score");
- SCM_ASSERT_TYPE (od, layout, SCM_ARG2, __FUNCTION__, "Output_def");
-
Output_def *score_def = 0;
/* UGR, FIXME, these are default \layout blocks once again. They
itself. */
score_def->parent_ = od;
- SCM context = ly_run_translator (sc->get_music (), score_def->self_scm (),
- key);
+ SCM context = ly_run_translator (sc->get_music (), score_def->self_scm ());
SCM output = ly_format_output (context);
scm_remember_upto_here_1 (prot);