On Saturday 08 July 2006 12:26, Han-Wen Nienhuys wrote: > Erik Sandberg schreef: > > While (2) makes an improvement over the previous situation, I'm still not > > satisfied: I'd like to keep the output in translators, and then rewrite > > all uses of ly:run-translator to extract output from the translators > > instead. > > I don't understand this remark completely.
Current behaviour: glob = (run-translator music output-def) result = (process (extract-output glob)) I want to change this to: global = (make-global-context) score-engraver = (make-global-translator global output-def) (iterate-music global mus) result = (process (extract-output score-engraver)) I.e., results of typesetting is stored in engravers, where they belong IMHO. The main advantage is architectural / spiritual, the only practical advantage I see is that you can create midi and paper output in parallel. > does this patch depend on the other one (I just commented on)? nope > if not, please apply after verifying that make web still works. > > > +(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))) > > i'm not a fan of these 2 line excursions to scheme from C++. Why not > call ly_make_translator_context directly from ly:run-translator mainly for testing. I'll change it before I commit. -- Erik _______________________________________________ lilypond-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-devel
