lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Doing \score { <<...>... } and \context Staff << .... >> in scheme?


From: Nicolas Sceaux
Subject: Re: Doing \score { <<...>... } and \context Staff << .... >> in scheme?
Date: Tue, 19 Feb 2008 22:25:05 +0100


Le 19 févr. 08 à 09:48, Mats Bengtsson a écrit :



Nicolas Sceaux wrote:
A score is a Score :-)

Not if you want to attach a \header, \layout or \midi block to it

Of course it is, even with a header, layouts or a midi blocks.


By the way, this is strange:

--- a/lily/score-scheme.cc
+++ b/lily/score-scheme.cc
@@ -59,7 +59,20 @@ LY_DEFINE (ly_score_header, "ly:score-header",
 {
   LY_ASSERT_SMOB (Score, score, 1);
   Score *sc = unsmob_score (score);
-  return sc->header_;
+  return sc->get_header ();
+}
+
+
+LY_DEFINE (ly_score_set_header_x, "ly:score-set-header!",
+          2, 0, 0, (SCM score, SCM module),
+          "Set the score header.")
+{
+  LY_ASSERT_SMOB (Score, score, 1);
+ SCM_ASSERT_TYPE (ly_is_module (module), module, SCM_ARG2, __FUNCTION__,
+                  "module");
+
+  Score *sc = unsmob_score (score);
+  return sc->get_header ();
 }


Shoudn't ly:score-set-header! actually set the header, rather than
returning it?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]