]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/global-context-scheme.cc: Separated ly:run-translator into
authorErik Sandberg <mandolaerik@gmail.com>
Tue, 11 Jul 2006 05:58:01 +0000 (05:58 +0000)
committerErik Sandberg <mandolaerik@gmail.com>
Tue, 11 Jul 2006 05:58:01 +0000 (05:58 +0000)
smaller pieces.

* lily/score-engraver.cc, lily/score-performer.cc,
scm/define-context-properties.scm: Make paper/midi output
accessable as a context property.

* lily/score-translator.cc, lily/score-context.cc: Removed.

29 files changed:
ChangeLog
lily/bar-engraver.cc
lily/beam-engraver.cc
lily/context-def.cc
lily/context.cc
lily/engraver.cc
lily/folded-repeat-iterator.cc
lily/forbid-break-engraver.cc
lily/global-context-scheme.cc
lily/global-context.cc
lily/include/context.hh
lily/include/global-context.hh
lily/include/music-iterator.hh
lily/include/score-context.hh [deleted file]
lily/include/score-engraver.hh
lily/include/score-performer.hh
lily/include/score-translator.hh [deleted file]
lily/include/translator.hh
lily/ligature-engraver.cc
lily/music-iterator.cc
lily/paper-column-engraver.cc
lily/percent-repeat-engraver.cc
lily/score-context.cc [deleted file]
lily/score-engraver.cc
lily/score-performer.cc
lily/score-translator.cc [deleted file]
lily/simultaneous-music-iterator.cc
lily/translator.cc
scm/define-context-properties.scm

index 0200f9dce5054a735fb6bf769ac97954300523c7..5ae5cece082fe1769e90e1ce9dddb6478875263f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-07-11  Erik Sandberg  <mandolaerik@gmail.com>
+
+       * lily/global-context-scheme.cc: Separated ly:run-translator into
+       smaller pieces.
+
+       * lily/score-engraver.cc, lily/score-performer.cc,
+       scm/define-context-properties.scm: Make paper/midi output
+       accessable as a context property.
+
+       * lily/score-translator.cc, lily/score-context.cc: Removed.
+
 2006-07-07  Guido Amoruso  <guidonte@katamail.com>
 
        * scm/ps-to-png.scm (Module): 
index 29151650094cdc1ccdc03539b88c8dba3e588afe..16792eac58adf2306e2b295e61f8b94e2cf250db 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "bar-line.hh"
 #include "context.hh"
-#include "score-context.hh"
 #include "score-engraver.hh"
 #include "warn.hh"
 #include "item.hh"
index c8104d0bd09f8a877c6c50cb68f23ab9927e3caa..f20160518e6c88314df24c4ed662a30edadab9e2 100644 (file)
@@ -15,7 +15,6 @@
 #include "international.hh"
 #include "item.hh"
 #include "rest.hh"
-#include "score-context.hh"
 #include "spanner.hh"
 #include "stem.hh"
 #include "warn.hh"
index f4ee43b1608fbfda98e673b9f648601ada5d3795..f15a1ab1413e0c0f9e1b74617ee887a9c1503e21 100644 (file)
@@ -11,9 +11,9 @@
 
 #include "context-def.hh"
 
+#include "context.hh"
 #include "international.hh"
 #include "output-def.hh"
-#include "score-context.hh"
 #include "translator.hh"
 #include "warn.hh"
 
@@ -252,12 +252,7 @@ Context_def::get_translator_names (SCM user_mod) const
 Context *
 Context_def::instantiate (SCM ops, Object_key const *key)
 {
-  Context *context = 0;
-
-  if (context_name_ == ly_symbol2scm ("Score"))
-    context = new Score_context (key);
-  else
-    context = new Context (key);
+  Context *context = new Context (key);
 
   context->definition_ = self_scm ();
   context->definition_mods_ = ops;
index f39fb5e1c29e4e9e7e3e298dfecce272015887ef..5211cbb3f01f2bd118375e09e5e541e776d399e3 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "context-def.hh"
 #include "dispatcher.hh"
+#include "global-context.hh"
 #include "international.hh"
 #include "ly-smobs.icc"
 #include "main.hh"
@@ -17,7 +18,6 @@
 #include "profile.hh"
 #include "program-option.hh"
 #include "scm-hash.hh"
-#include "score-context.hh"
 #include "translator-group.hh"
 #include "warn.hh"
 
@@ -140,8 +140,8 @@ Context::create_unique_context (SCM name, string id, SCM operations)
     }
 
   /*
-    Don't go up to Global_context, because global goes down to
-    Score_context
+    Don't go up to Global_context, because global goes down to the
+    Score context
   */
   Context *ret = 0;
   if (daddy_context_ && !dynamic_cast<Global_context *> (daddy_context_))
@@ -202,8 +202,8 @@ Context::find_create_context (SCM n, string id, SCM operations)
     }
 
   /*
-    Don't go up to Global_context, because global goes down to
-    Score_context
+    Don't go up to Global_context, because global goes down to the
+    Score context
   */
   Context *ret = 0;
   if (daddy_context_ && !dynamic_cast<Global_context *> (daddy_context_))
@@ -563,12 +563,10 @@ Context::context_name () const
   return ly_symbol2string (context_name_symbol ());
 }
 
-Score_context *
+Context *
 Context::get_score_context () const
 {
-  if (Score_context *sc = dynamic_cast<Score_context *> ((Context *) this))
-    return sc;
-  else if (daddy_context_)
+  if (daddy_context_)
     return daddy_context_->get_score_context ();
   else
     return 0;
index eebd22e4bea706dbf8635b70c0e1ebf412cedb24..7f7dc65f3a872d9aac101e9377742622cf3cf87e 100644 (file)
@@ -14,7 +14,6 @@
 #include "spanner.hh"
 #include "item.hh"
 #include "context.hh"
-#include "score-context.hh"
 #include "lilypond-key.hh"
 
 Engraver_group *
index 1a4de7c369b828618110634bad5797cd73f7acba..79bfcb2fc797aba35c884da3950c06c9f6f2b299 100644 (file)
@@ -98,7 +98,7 @@ Folded_repeat_iterator::enter_alternative ()
       */
       Simultaneous_music_iterator *s = new Simultaneous_music_iterator;
       s->create_separate_contexts_ = true;
-      s->init_translator (mus, get_outlet ());
+      s->init_context (mus, get_outlet ());
 
       alternative_iter_ = s;
       alternative_iter_->construct_children ();
index 14471e8ec62b944102fe12d516b5725760a8dd91..709f5e87d1897e6a6428e7383e3575dd894b7d26 100644 (file)
@@ -5,14 +5,14 @@
 
   (c) 2002--_2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
+#include "context.hh"
 #include "duration.hh"
-#include "grob.hh"
 #include "engraver.hh"
+#include "grob.hh"
 #include "input.hh"
 #include "moment.hh"
 #include "pitch.hh"
 #include "rhythmic-head.hh"
-#include "score-context.hh"
 
 #include "translator.icc"
 
index 9229a8a0d956d8124cfd83aa671cbfb185f08d7a..273ae10b1d27de99abc899e782bcba432c7cabe8 100644 (file)
@@ -5,7 +5,6 @@
 
   (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
-
 #include "cpu-timer.hh"
 #include "global-context.hh"
 #include "international.hh"
@@ -47,47 +46,57 @@ LY_DEFINE (ly_make_global_translator, "ly:make-global-translator",
   return tg->unprotect ();
 }
 
-LY_DEFINE (ly_run_translator, "ly:run-translator",
-          2, 1, 0, (SCM mus, SCM output_def, SCM key),
-          "Process @var{mus} according to @var{output_def}. \n"
-          "An interpretation context is set up,\n"
-          "and @var{mus} is interpreted with it.  \n"
-          "The context is returned in its final state.\n"
-          "\n\n"
-          "Optionally, this routine takes an Object-key to\n"
+LY_DEFINE (ly_make_global_context, "ly:make-global-context",
+          1, 1, 0, (SCM output_def, SCM key),
+          "Set up a global interpretation context, using the output\n"
+          "block @var{output_def}.\n"
+          "The context is returned.\n"
+
+          "\n\nOptionally, this routine takes an Object-key to\n"
           "to uniquely identify the Score block containing it.\n")
 {
   Output_def *odef = unsmob_output_def (output_def);
-  Music *music = unsmob_music (mus);
 
-  if (!music
-      || !music->get_length ().to_bool ())
+  SCM_ASSERT_TYPE (odef, output_def, SCM_ARG1, __FUNCTION__,
+                  "Output definition");
+
+  Global_context *glob = new Global_context (odef, unsmob_key (key));
+
+  if (!glob)
     {
-      warning (_ ("no music found in score"));
+      programming_error ("no toplevel translator");
       return SCM_BOOL_F;
     }
 
-  SCM_ASSERT_TYPE (music, mus, SCM_ARG1, __FUNCTION__, "Music");
-  SCM_ASSERT_TYPE (odef, output_def, SCM_ARG2, __FUNCTION__,
-                  "Output definition");
+  return glob->unprotect ();
+}
 
-  Cpu_timer timer;
+LY_DEFINE (ly_interpret_music_expression, "ly:interpret-music-expression",
+          2, 0, 0, (SCM mus, SCM ctx),
+          "Interpret the music expression @var{mus} in the\n"
+          "global context @var{ctx}. The context is returned in its\n"
+          "final state.\n")
+{
+  Music *music = unsmob_music (mus);
+  Global_context *g = dynamic_cast<Global_context *> (unsmob_context (ctx));
+  SCM_ASSERT_TYPE (music, mus, SCM_ARG1, __FUNCTION__, "Music");
+  SCM_ASSERT_TYPE (g, ctx, SCM_ARG2, __FUNCTION__, "Global context");
 
-  Global_context *glob = new Global_context (odef, unsmob_key (key));
-  if (!glob)
+  if (!music
+      || !music->get_length ().to_bool ())
     {
-      programming_error ("Couldn't create Global context");
+      warning (_ ("no music found in score"));
       return SCM_BOOL_F;
     }
 
-  SCM tgs = ly_make_global_translator (glob->self_scm ());
-  Translator_group *tg = unsmob_translator_group (tgs);
+  Cpu_timer timer;
 
   message (_ ("Interpreting music... "));
 
   SCM protected_iter = Music_iterator::get_static_get_iterator (music);
   Music_iterator *iter = unsmob_iterator (protected_iter);
-  iter->init_translator (music, glob);
+
+  iter->init_context (music, g);
   iter->construct_children ();
 
   if (!iter->ok ())
@@ -97,13 +106,31 @@ LY_DEFINE (ly_run_translator, "ly:run-translator",
       return SCM_BOOL_F;
     }
 
-  glob->run_iterator_on_me (iter);
+  g->run_iterator_on_me (iter);
+
   iter->quit ();
   scm_remember_upto_here_1 (protected_iter);
-  send_stream_event (glob, "Finish", 0, 0);
+
+  send_stream_event (g, "Finish", 0, 0);
 
   if (be_verbose_global)
     message (_f ("elapsed time: %.2f seconds", timer.read ()));
 
-  return glob->unprotect ();
+  return ctx;
+}
+
+LY_DEFINE (ly_run_translator, "ly:run-translator",
+          2, 1, 0, (SCM mus, SCM output_def, SCM key),
+          "Process @var{mus} according to @var{output_def}. \n"
+          "An interpretation context is set up,\n"
+          "and @var{mus} is interpreted with it.  \n"
+          "The context is returned in its final state.\n"
+          "\n\n"
+          "Optionally, this routine takes an Object-key to\n"
+          "to uniquely identify the Score block containing it.\n")
+{
+  SCM glob = ly_make_global_context (output_def, key);
+  ly_make_global_translator (glob);
+  ly_interpret_music_expression (mus, glob);
+  return glob;
 }
index 94f354763071d3d8700d5c432ef55f1ba2d9c18d..40fe3a61cdb7a0b657398fc459bde7a7e6a87ed7 100644 (file)
@@ -18,7 +18,6 @@ using namespace std;
 #include "music-iterator.hh"
 #include "music.hh"
 #include "output-def.hh"
-#include "score-context.hh"
 #include "stream-event.hh"
 #include "warn.hh"
 
@@ -96,10 +95,6 @@ Global_context::prepare (SCM sev)
   now_mom_ = *mom;
   
   clear_key_disambiguations ();
-
-  // should do nothing now
-  if (get_score_context ())
-    get_score_context ()->prepare (now_mom_);
 }
 
 Moment
@@ -108,31 +103,18 @@ Global_context::now_mom () const
   return now_mom_;
 }
 
-Score_context *
+Context *
 Global_context::get_score_context () const
 {
   return (scm_is_pair (context_list_))
-    ? dynamic_cast<Score_context *> (unsmob_context (scm_car (context_list_)))
+    ? unsmob_context (scm_car (context_list_))
     : 0;
 }
 
 SCM
 Global_context::get_output ()
 {
-  return get_score_context ()->get_output ();
-}
-
-void
-Global_context::one_time_step ()
-{
-  get_score_context ()->one_time_step ();
-}
-
-void
-Global_context::finish ()
-{
-  if (get_score_context ())
-    get_score_context ()->finish ();
+  return get_score_context ()->get_property ("output");
 }
 
 void
@@ -169,23 +151,6 @@ Global_context::run_iterator_on_me (Music_iterator *iter)
       if (iter->ok ())
        iter->process (w);
 
-      if (!get_score_context ())
-       {
-         error ("ES TODO: no score context, this shouldn't happen");
-         SCM sym = ly_symbol2scm ("Score");
-         Context_def *t = unsmob_context_def (find_context_def (get_output_def (),
-                                                                sym));
-         if (!t)
-           error (_f ("can't find `%s' context", "Score"));
-
-         Object_key const *key = get_context_key ("Score", "");
-         Context *c = t->instantiate (SCM_EOL, key);
-         add_context (c);
-
-         Score_context *sc = dynamic_cast<Score_context *> (c);
-         sc->prepare (w);
-       }
-
       send_stream_event (this, "OneTimeStep", 0, 0);
       apply_finalizations ();
       check_removal ();
index eaa280ff588d8e63315675a4030d89735516f69b..1a9c0c256730133045bd3a7573dbd0127f8d523a 100644 (file)
@@ -102,7 +102,7 @@ public:
   SCM context_name_symbol () const;
   Global_context *get_global_context () const;
 
-  virtual Score_context *get_score_context () const;
+  virtual Context *get_score_context () const;
   virtual Output_def *get_output_def () const;
   virtual Moment now_mom () const;
   virtual Context *get_default_interpreter ();
index 0ff225c50d38ec96e5385de723a09d6e9e0d5091..75172595cc6471fd324a43f95df307115a6290b5 100644 (file)
@@ -26,14 +26,12 @@ public:
   Moment sneaky_insert_extra_moment (Moment);
   void add_moment_to_process (Moment);
   void run_iterator_on_me (Music_iterator *);
-  virtual Score_context *get_score_context () const;
+  virtual Context *get_score_context () const;
 
   void apply_finalizations ();
   void add_finalization (SCM);
 
   DECLARE_LISTENER (prepare);
-  virtual void one_time_step ();
-  virtual void finish ();
   virtual SCM get_output ();
   virtual Output_def *get_output_def () const;
   virtual Moment now_mom () const;
index 3c62205b90ce396359dd2d6ee75d66d883ac98be..4078ec655bd90b9d1060dccf3b510203ca0dface 100644 (file)
@@ -65,7 +65,7 @@ public:
   Context *get_outlet () const;
   void set_context (Context *);
   static SCM get_static_get_iterator (Music *mus);
-  void init_translator (Music *, Context *);
+  void init_context (Music *, Context *);
   void quit ();
   void substitute_outlet (Context *from, Context *to);
   void descend_to_bottom_context ();
diff --git a/lily/include/score-context.hh b/lily/include/score-context.hh
deleted file mode 100644 (file)
index 349c768..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-  score-context.hh -- declare Score_context
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-#ifndef SCORE_CONTEXT_HH
-#define SCORE_CONTEXT_HH
-
-#include "global-context.hh"
-
-class Score_context : public Context
-{
-public:
-  Score_context (Object_key const *);
-
-  virtual SCM get_output ();
-  virtual void prepare (Moment);
-  virtual void finish ();
-  virtual void one_time_step ();
-};
-
-#endif /* SCORE_CONTEXT_HH */
index b3127f8977784a8ea111b942d9a6a048a9d838cc..47f7604f1aaf0c79cc0d56970c0a0ef93e146b90 100644 (file)
 #define SCORE_ENGRAVER_HH
 
 #include "engraver-group.hh"
-#include "score-translator.hh"
 
-class Score_engraver : public virtual Score_translator,
-                      public virtual Engraver_group
+class Score_engraver : public Engraver_group
 {
   System *system_;
 
@@ -43,7 +41,6 @@ protected:
 
 public:
   Score_engraver ();
-  virtual SCM get_output ();
 };
 
 #endif /* SCORE_ENGRAVER_HH */
index f98dd18dd549be2ceb72a436db41361838f4bf97..0987ef7d686ff5873e8f8a4f6beb375ac8deb32f 100644 (file)
 
 #include "moment.hh"
 #include "performer-group.hh"
-#include "score-translator.hh"
 
 /**
    Top level performer. Completely takes care of MIDI output
 */
-class Score_performer : public Score_translator,
-                       public virtual Performer_group
+class Score_performer : public Performer_group
 {
 public:
   VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Score_performer);
@@ -36,7 +34,6 @@ protected:
   virtual void announce_element (Audio_element_info);
   virtual int get_tempo () const;
   virtual void play_element (Audio_element *p);
-  virtual SCM get_output ();
   virtual void derived_mark () const;
 private:
   void header (Midi_stream &);
diff --git a/lily/include/score-translator.hh b/lily/include/score-translator.hh
deleted file mode 100644 (file)
index 01ee9e3..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-  score-translator.hh -- declare Score_translator
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#ifndef SCORE_TRANSLATOR_HH
-#define SCORE_TRANSLATOR_HH
-
-#include "translator-group.hh"
-
-class Score_translator : public virtual Translator_group
-{
-  friend class Score_context;
-protected:
-  virtual SCM get_output ();
-};
-
-#endif /* SCORE_TRANSLATOR_HH */
-
index f6b3c8881936de24e34292e515a69ae2fc3154e5..442942932112066b514cf3be7985e74aff22a18f 100644 (file)
@@ -89,7 +89,7 @@ public:
   void process_music ();
   void process_acknowledged ();
 
-  Score_context *get_score_context () const;
+  Context *get_score_context () const;
   Global_context *get_global_context () const;
 
   TRANSLATOR_DECLARATIONS (Translator);
index 87db230110abe864de513ea2742c408a577b63f2..822df306ff91d55f83b1d7622b45ebcb9c1998cb 100644 (file)
@@ -12,7 +12,6 @@
 #include "international.hh"
 #include "note-head.hh"
 #include "rest.hh"
-#include "score-context.hh"
 #include "spanner.hh"
 #include "warn.hh"
 
index 83838427df32aac99a381dd0b2f157bff6b6faaa..ce824968a9b1d3242c8dd582c77a7ad4e749ac8d 100644 (file)
@@ -118,7 +118,7 @@ Music_iterator::music_start_mom ()const
 }
 
 void
-Music_iterator::init_translator (Music *m, Context *report)
+Music_iterator::init_context (Music *m, Context *report)
 {
   music_ = m;
   assert (m);
@@ -145,7 +145,7 @@ Music_iterator::get_iterator (Music *m) const
   SCM ip = get_static_get_iterator (m);
   Music_iterator *p = unsmob_iterator (ip);
 
-  p->init_translator (m, get_outlet ());
+  p->init_context (m, get_outlet ());
 
   p->construct_children ();
   return ip;
index cef0f9e5c055659010f63a2d3afaba9953f4d770..b6f249e9af0d623392838fe571e120f3ed8c3a65 100644 (file)
@@ -14,7 +14,6 @@
 #include "note-spacing.hh"
 #include "pointer-group-interface.hh"
 #include "context.hh"
-#include "score-context.hh"
 #include "axis-group-interface.hh"
 #include "warn.hh"
 
index a979a2e743914f91bed6371c3fd3319e420ab102..81d831aff87ea508eb6c148363e7f9391325a2b4 100644 (file)
@@ -16,7 +16,6 @@
 #include "misc.hh"
 #include "percent-repeat-iterator.hh"
 #include "repeated-music.hh"
-#include "score-context.hh"
 #include "side-position-interface.hh"
 #include "spanner.hh"
 #include "warn.hh"
diff --git a/lily/score-context.cc b/lily/score-context.cc
deleted file mode 100644 (file)
index 60ef490..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  score-context.cc -- implement Score_context
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#include "score-context.hh"
-
-#include "score-translator.hh"
-
-void
-Score_context::prepare (Moment)
-{
-}
-
-void
-Score_context::finish ()
-{
-}
-
-void
-Score_context::one_time_step ()
-{
-}
-
-SCM
-Score_context::get_output ()
-{
-  Translator_group *t = implementation ();
-  Score_translator *s = dynamic_cast<Score_translator *> (t);
-  return s->get_output ();
-}
-
-Score_context::Score_context (Object_key const *key)
-  : Context (key)
-{
-}
index b6c79d01588f57eeff3980742f534a1c8253d2fb..9ad0998cfb9a4b760758540e19b74b7763ff88ec 100644 (file)
@@ -35,7 +35,6 @@ Score_engraver::derived_mark () const
 {
   if (pscore_)
     scm_gc_mark (pscore_->self_scm ());
-  Score_translator::derived_mark ();
   Engraver_group::derived_mark ();
 }
 
@@ -77,6 +76,7 @@ Score_engraver::initialize ()
 
   pscore_ = new Paper_score (dynamic_cast<Output_def *> (context ()->get_output_def ()));
   pscore_->unprotect ();
+  context ()->set_property ("output", pscore_->self_scm ());
 
   SCM props = updated_grob_properties (context (), ly_symbol2scm ("System"));
 
@@ -114,7 +114,7 @@ Score_engraver::disconnect_from_context ()
 void
 Score_engraver::finalize ()
 {
-  Score_translator::finalize ();
+  Engraver_group::finalize ();
 
   typeset_all ();
 }
@@ -157,13 +157,6 @@ Score_engraver::typeset_all ()
   elems_.clear ();
 }
 
-SCM
-Score_engraver::get_output ()
-{
-  Music_output *o = pscore_;
-  return o->self_scm ();
-}
-
 bool
 Score_engraver::try_music (Music *m)
 {
index c71b4c53616f565940346e78e4997e8832d925c1..a0b0c7d17e4c44120df756404628d047d59cece1 100644 (file)
@@ -130,21 +130,12 @@ Score_performer::get_tempo () const
   return ::get_tempo (performance_->midi_, Moment (Rational (1, 4)));
 }
 
-SCM
-Score_performer::get_output ()
-{
-  Music_output *o = performance_;
-  performance_ = 0;
-  return o->self_scm ();
-}
-
 void
 Score_performer::derived_mark () const
 {
   if (performance_)
     scm_gc_mark (performance_->self_scm ());
 
-  Score_translator::derived_mark ();
   Performer_group::derived_mark ();
 }
 
@@ -153,6 +144,7 @@ Score_performer::initialize ()
 {
   performance_ = new Performance;
   performance_->unprotect ();
+  context ()->set_property ("output", performance_->self_scm ()); 
   performance_->midi_ = context ()->get_output_def ();
 
   Translator_group::initialize ();
diff --git a/lily/score-translator.cc b/lily/score-translator.cc
deleted file mode 100644 (file)
index 68baba6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  score-translator.cc -- implement Score_translator
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#include "score-translator.hh"
-#include "moment.hh"
-
-SCM
-Score_translator::get_output ()
-{
-  return SCM_EOL;
-}
index a264d55ba9ab1174c80c4ce9001b4ea1c8687e83..62d3b3c200e8396c8b50f496ef96239ce0daecd7 100644 (file)
@@ -51,14 +51,14 @@ Simultaneous_music_iterator::construct_children ()
         number number as name */
 
       SCM name = ly_symbol2scm (get_outlet ()->context_name ().c_str ());
-      Context *t = (j && create_separate_contexts_)
+      Context *c = (j && create_separate_contexts_)
        ? get_outlet ()->find_create_context (name, to_string (j), SCM_EOL)
        : get_outlet ();
 
-      if (!t)
-       t = get_outlet ();
+      if (!c)
+       c = get_outlet ();
 
-      mi->init_translator (mus, t);
+      mi->init_context (mus, c);
       mi->construct_children ();
 
       if (mi->ok ())
index 391af52b4b70534ad8e49716e37d1fbf496edd4f..762fdfd2f9a7664d877e899a312a059c27137e9c 100644 (file)
@@ -125,7 +125,7 @@ Translator::get_global_context () const
   return daddy_context_->get_global_context ();
 }
 
-Score_context *
+Context *
 Translator::get_score_context () const
 {
   return daddy_context_->get_score_context ();
index 427c14c2bc9a0196d4759959b193640c6b50f80a..084ab18f6b17e35bbe5050508458a9f2ef8ef26d 100644 (file)
@@ -308,6 +308,7 @@ markup.  Called with 2 arguments, event and context.")
 selects the highest string with a fret at least @code{minimumFret}")
      (minimumVerticalExtent ,number-pair? "minimum vertical extent, same
 format as @var{verticalExtent}")
+     (output ,ly:music-output? "The output produced by a score-level translator during music interpretation")
      (ottavation ,string? "If set, the text for an ottava spanner. Changing
 this creates a new text spanner. ")
      (pedalSustainStrings ,list? "List of string to print for