lilypond-devel
[Top][All Lists]
Advanced

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

applyContext and music streams


From: Erik Sandberg
Subject: applyContext and music streams
Date: Mon, 12 Jun 2006 00:44:30 +0200
User-agent: KMail/1.9.1

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).

FWIW, solution (2) will also break wilhelmus.ly, in a weaker sense: The 
applyContext functions in wilhelmus.ly can not be written explicitly to disk.

Is the breakage of (1) OK, or do you prefer solution (2)?

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.

-- 
Erik




reply via email to

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