[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: applyContext and music streams
From: |
Han-Wen Nienhuys |
Subject: |
Re: applyContext and music streams |
Date: |
Mon, 12 Jun 2006 16:33:02 +0200 |
User-agent: |
Thunderbird 1.5.0.2 (X11/20060501) |
Erik Sandberg schreef:
Hi,
There are two different ways of handling applyContext for music streams:
1. The way I did it in my thesis: leave the command as it is, and just let the
apply-context-iterator apply the function.
2. Send the function in a stream event, and let a translator apply the
function (similar to how applyOutput is implemented).
I like (1) better, because it makes the music stream format more
simple/verbose (it should always be possible to encode the the actions of an
applyContext as stream events, if they affect output).
However, I realise that (1) will however break some code, such as
wilhelmus.ly, which currently set properties directly instead of using stream
events (if wilhelmus is exported to a music stream and then reloaded to a
different context tree, the property changes will be lost).
I think (1) is better too. Breaking wilhelmus.ly is a non-issue; we can
adapt it if necessary. It should use the
\override Foo #'space-alist #'staff-bar = #5
form anyway.
BTW: My current progress is that all information now goes through the stream.
I propose that we add command-line flags --[no-]isolated-iteration, which
makes iteration and translation use separate context trees. This would be
slightly inefficient, but useful for testing/debugging, so it could be
defaulted to #t in development versions and to #f in stable ones.
I don't understand the issue. What do we gain by either solution?
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
LilyPond Software Design
-- Code for Music Notation
http://www.lilypond-design.com