Index: lily/bar-engraver.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/bar-engraver.cc,v retrieving revision 1.87 diff -u -r1.87 bar-engraver.cc --- lily/bar-engraver.cc 9 May 2006 02:15:56 -0000 1.87 +++ lily/bar-engraver.cc 8 Jul 2006 09:45:55 -0000 @@ -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: lily/beam-engraver.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/beam-engraver.cc,v retrieving revision 1.139 diff -u -r1.139 beam-engraver.cc --- lily/beam-engraver.cc 22 May 2006 17:45:40 -0000 1.139 +++ lily/beam-engraver.cc 8 Jul 2006 09:45:55 -0000 @@ -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: lily/context-def.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/context-def.cc,v retrieving revision 1.63 diff -u -r1.63 context-def.cc --- lily/context-def.cc 26 Jun 2006 22:11:38 -0000 1.63 +++ lily/context-def.cc 8 Jul 2006 09:45:57 -0000 @@ -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 * 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: lily/context.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/context.cc,v retrieving revision 1.84 diff -u -r1.84 context.cc --- lily/context.cc 26 Jun 2006 22:11:38 -0000 1.84 +++ lily/context.cc 8 Jul 2006 09:45:58 -0000 @@ -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 @@ } /* - 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 (daddy_context_)) @@ -202,8 +202,8 @@ } /* - 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 (daddy_context_)) @@ -563,12 +563,10 @@ return ly_symbol2string (context_name_symbol ()); } -Score_context * +Context * Context::get_score_context () const { - if (Score_context *sc = dynamic_cast ((Context *) this)) - return sc; - else if (daddy_context_) + if (daddy_context_) return daddy_context_->get_score_context (); else return 0; Index: lily/engraver.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/engraver.cc,v retrieving revision 1.79 diff -u -r1.79 engraver.cc --- lily/engraver.cc 30 May 2006 15:47:16 -0000 1.79 +++ lily/engraver.cc 8 Jul 2006 09:45:58 -0000 @@ -14,7 +14,6 @@ #include "spanner.hh" #include "item.hh" #include "context.hh" -#include "score-context.hh" #include "lilypond-key.hh" Engraver_group * Index: lily/folded-repeat-iterator.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/folded-repeat-iterator.cc,v retrieving revision 1.44 diff -u -r1.44 folded-repeat-iterator.cc --- lily/folded-repeat-iterator.cc 24 May 2006 07:00:41 -0000 1.44 +++ lily/folded-repeat-iterator.cc 8 Jul 2006 09:45:58 -0000 @@ -98,7 +98,7 @@ */ 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: lily/forbid-break-engraver.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/forbid-break-engraver.cc,v retrieving revision 1.27 diff -u -r1.27 forbid-break-engraver.cc --- lily/forbid-break-engraver.cc 9 May 2006 02:15:56 -0000 1.27 +++ lily/forbid-break-engraver.cc 8 Jul 2006 09:45:58 -0000 @@ -5,14 +5,14 @@ (c) 2002--_2005 Han-Wen Nienhuys */ +#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: lily/global-context-scheme.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/global-context-scheme.cc,v retrieving revision 1.14 diff -u -r1.14 global-context-scheme.cc --- lily/global-context-scheme.cc 26 Jun 2006 22:11:38 -0000 1.14 +++ lily/global-context-scheme.cc 8 Jul 2006 09:45:59 -0000 @@ -5,7 +5,6 @@ (c) 2005--2006 Han-Wen Nienhuys */ - #include "cpu-timer.hh" #include "global-context.hh" #include "international.hh" @@ -47,47 +46,57 @@ 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 (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 @@ 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 proc = ly_lily_module_constant ("run-translator"); + if (!unsmob_key (key)) + key = SCM_EOL; + return scm_call_3 (proc, mus, output_def, key); } Index: lily/global-context.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/global-context.cc,v retrieving revision 1.42 diff -u -r1.42 global-context.cc --- lily/global-context.cc 26 Jun 2006 22:11:38 -0000 1.42 +++ lily/global-context.cc 8 Jul 2006 09:45:59 -0000 @@ -18,7 +18,6 @@ #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 @@ 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 @@ return now_mom_; } -Score_context * +Context * Global_context::get_score_context () const { return (scm_is_pair (context_list_)) - ? dynamic_cast (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 @@ 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 (c); - sc->prepare (w); - } - send_stream_event (this, "OneTimeStep", 0, 0); apply_finalizations (); check_removal (); Index: lily/ligature-engraver.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/ligature-engraver.cc,v retrieving revision 1.60 diff -u -r1.60 ligature-engraver.cc --- lily/ligature-engraver.cc 9 May 2006 02:15:56 -0000 1.60 +++ lily/ligature-engraver.cc 8 Jul 2006 09:46:01 -0000 @@ -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: lily/music-iterator.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/music-iterator.cc,v retrieving revision 1.110 diff -u -r1.110 music-iterator.cc --- lily/music-iterator.cc 5 Jun 2006 13:57:05 -0000 1.110 +++ lily/music-iterator.cc 8 Jul 2006 09:46:01 -0000 @@ -118,7 +118,7 @@ } 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 @@ 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: lily/paper-column-engraver.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/paper-column-engraver.cc,v retrieving revision 1.18 diff -u -r1.18 paper-column-engraver.cc --- lily/paper-column-engraver.cc 26 Jun 2006 22:11:38 -0000 1.18 +++ lily/paper-column-engraver.cc 8 Jul 2006 09:46:01 -0000 @@ -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: lily/percent-repeat-engraver.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/percent-repeat-engraver.cc,v retrieving revision 1.57 diff -u -r1.57 percent-repeat-engraver.cc --- lily/percent-repeat-engraver.cc 16 May 2006 11:19:50 -0000 1.57 +++ lily/percent-repeat-engraver.cc 8 Jul 2006 09:46:02 -0000 @@ -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" Index: lily/score-context.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/score-context.cc,v retrieving revision 1.14 diff -u -r1.14 score-context.cc --- lily/score-context.cc 26 Jun 2006 22:11:38 -0000 1.14 +++ lily/score-context.cc 8 Jul 2006 09:46:02 -0000 @@ -8,31 +8,6 @@ #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 (t); - return s->get_output (); -} - Score_context::Score_context (Object_key const *key) : Context (key) { Index: lily/score-engraver.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/score-engraver.cc,v retrieving revision 1.166 diff -u -r1.166 score-engraver.cc --- lily/score-engraver.cc 26 Jun 2006 22:11:38 -0000 1.166 +++ lily/score-engraver.cc 8 Jul 2006 09:46:02 -0000 @@ -35,7 +35,6 @@ { if (pscore_) scm_gc_mark (pscore_->self_scm ()); - Score_translator::derived_mark (); Engraver_group::derived_mark (); } @@ -77,6 +76,7 @@ pscore_ = new Paper_score (dynamic_cast (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 @@ void Score_engraver::finalize () { - Score_translator::finalize (); + Engraver_group::finalize (); typeset_all (); } @@ -157,13 +157,6 @@ elems_.clear (); } -SCM -Score_engraver::get_output () -{ - Music_output *o = pscore_; - return o->self_scm (); -} - bool Score_engraver::try_music (Music *m) { Index: lily/score-performer.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/score-performer.cc,v retrieving revision 1.73 diff -u -r1.73 score-performer.cc --- lily/score-performer.cc 26 Jun 2006 22:11:38 -0000 1.73 +++ lily/score-performer.cc 8 Jul 2006 09:46:02 -0000 @@ -130,21 +130,12 @@ 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 @@ { performance_ = new Performance; performance_->unprotect (); + context ()->set_property ("output", performance_->self_scm ()); performance_->midi_ = context ()->get_output_def (); Translator_group::initialize (); Index: lily/simultaneous-music-iterator.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/simultaneous-music-iterator.cc,v retrieving revision 1.70 diff -u -r1.70 simultaneous-music-iterator.cc --- lily/simultaneous-music-iterator.cc 24 May 2006 07:00:41 -0000 1.70 +++ lily/simultaneous-music-iterator.cc 8 Jul 2006 09:46:02 -0000 @@ -51,14 +51,14 @@ 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: lily/translator.cc =================================================================== RCS file: /sources/lilypond/lilypond/lily/translator.cc,v retrieving revision 1.100 diff -u -r1.100 translator.cc --- lily/translator.cc 11 Feb 2006 11:35:17 -0000 1.100 +++ lily/translator.cc 8 Jul 2006 09:46:03 -0000 @@ -125,7 +125,7 @@ return daddy_context_->get_global_context (); } -Score_context * +Context * Translator::get_score_context () const { return daddy_context_->get_score_context (); Index: lily/include/context.hh =================================================================== RCS file: /sources/lilypond/lilypond/lily/include/context.hh,v retrieving revision 1.41 diff -u -r1.41 context.hh --- lily/include/context.hh 26 Jun 2006 22:11:39 -0000 1.41 +++ lily/include/context.hh 8 Jul 2006 09:46:03 -0000 @@ -102,7 +102,7 @@ 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: lily/include/global-context.hh =================================================================== RCS file: /sources/lilypond/lilypond/lily/include/global-context.hh,v retrieving revision 1.15 diff -u -r1.15 global-context.hh --- lily/include/global-context.hh 26 Jun 2006 22:11:39 -0000 1.15 +++ lily/include/global-context.hh 8 Jul 2006 09:46:03 -0000 @@ -26,14 +26,12 @@ 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: lily/include/music-iterator.hh =================================================================== RCS file: /sources/lilypond/lilypond/lily/include/music-iterator.hh,v retrieving revision 1.75 diff -u -r1.75 music-iterator.hh --- lily/include/music-iterator.hh 24 May 2006 07:00:41 -0000 1.75 +++ lily/include/music-iterator.hh 8 Jul 2006 09:46:05 -0000 @@ -65,7 +65,7 @@ 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 (); Index: lily/include/score-context.hh =================================================================== RCS file: /sources/lilypond/lilypond/lily/include/score-context.hh,v retrieving revision 1.7 diff -u -r1.7 score-context.hh --- lily/include/score-context.hh 6 Jan 2006 09:13:24 -0000 1.7 +++ lily/include/score-context.hh 8 Jul 2006 09:46:05 -0000 @@ -14,11 +14,6 @@ { 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: lily/include/score-engraver.hh =================================================================== RCS file: /sources/lilypond/lilypond/lily/include/score-engraver.hh,v retrieving revision 1.43 diff -u -r1.43 score-engraver.hh --- lily/include/score-engraver.hh 26 Jun 2006 22:11:39 -0000 1.43 +++ lily/include/score-engraver.hh 8 Jul 2006 09:46:05 -0000 @@ -10,10 +10,8 @@ #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 @@ public: Score_engraver (); - virtual SCM get_output (); }; #endif /* SCORE_ENGRAVER_HH */ Index: lily/include/score-performer.hh =================================================================== RCS file: /sources/lilypond/lilypond/lily/include/score-performer.hh,v retrieving revision 1.39 diff -u -r1.39 score-performer.hh --- lily/include/score-performer.hh 26 Jun 2006 22:11:39 -0000 1.39 +++ lily/include/score-performer.hh 8 Jul 2006 09:46:05 -0000 @@ -10,13 +10,11 @@ #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 @@ 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 &); Index: lily/include/translator.hh =================================================================== RCS file: /sources/lilypond/lilypond/lily/include/translator.hh,v retrieving revision 1.100 diff -u -r1.100 translator.hh --- lily/include/translator.hh 26 Jun 2006 22:11:39 -0000 1.100 +++ lily/include/translator.hh 8 Jul 2006 09:46:05 -0000 @@ -89,7 +89,7 @@ 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: scm/define-context-properties.scm =================================================================== RCS file: /sources/lilypond/lilypond/scm/define-context-properties.scm,v retrieving revision 1.76 diff -u -r1.76 define-context-properties.scm --- scm/define-context-properties.scm 16 May 2006 19:00:39 -0000 1.76 +++ scm/define-context-properties.scm 8 Jul 2006 09:46:09 -0000 @@ -308,6 +308,7 @@ 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 Index: scm/music-functions.scm =================================================================== RCS file: /sources/lilypond/lilypond/scm/music-functions.scm,v retrieving revision 1.173 diff -u -r1.173 music-functions.scm --- scm/music-functions.scm 4 Jul 2006 07:38:50 -0000 1.173 +++ scm/music-functions.scm 8 Jul 2006 09:46:11 -0000 @@ -820,6 +820,13 @@ (skip-to-last x parser) ))) +(define (ly:make-translator-context od key) + (let ((glob (ly:make-global-context od key))) + (ly:make-global-translator glob) + glob)) + +(define-public (run-translator mus od key) + (ly:interpret-music-expression mus (ly:make-translator-context od key))) ;;;;;;;;;;;;;;;;; ;; lyrics