[Top][All Lists]

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

Re: Feature request: conditional code for score and parts

From: Juergen Reuter
Subject: Re: Feature request: conditional code for score and parts
Date: Tue, 26 Aug 2003 14:56:15 +0200 (CEST)

On Tue, 26 Aug 2003, Han-Wen Nienhuys wrote:

> ...
> For music expressions you could use
>              \apply #only-in-parts <stuff>
> and then write a only-in-parts function that sets a music property
> #'part-only in <stuff>.
> Then a later function can filter out all expressions having the
> #'part-only. Similarly, you can have expressions with #'score-only.
> (or maybe it is neater to have a  property #'conditional, which is a
> list of symbols, eg.
>   #'conditional =  #'(F-part Eb-part)
> or
>   #'conditional =  #'(parts score)
> and filter by means of
>     \apply #(filter-music 'score) <stuff>

Maybe this approach could also be used to solve the old problem of
having different editions/revisions (which I think is essential for the
future of the mutopia project), which already has been somewhat discussed
a few times on this list.

In the music source, one could tag variants of music with a symbol that
represents the edition, e.g.

\apply #(tag "autograph") <stuff>
\apply #(tag "first-print") <alternate stuff>
\apply #(tag "corrected-print") <another alternative>

and then write a filter function that makes e.g. an autograph version by
selecting the stuff that is tagged with "autograph".  The autograph may be
incomplete.  Hence, you should be able to tell the filter function a
fallback, such as "use autograph were available; otherwise use the
corrected-print version".  In the simplest case, one would design the
filter function to accept a priority list of tags, such as:

\apply #(filter-music '("autograph" "corrected-print" "first-print")) <stuff>

Another conceptually orthogonal point is, that the first print and the
corrected print may be almost identical.  Rather than writing two separate
\apply's with different tags but the same stuff, you would then like to
allow multiple tags for the same stuff, maybe like:

\apply #(tags '("first-print" "corrected-print")) <shared stuff>

This should have the same effect as:

\apply #(tag "first-print") <shared stuff>
\apply #(tag "corrected-print") <shared stuff>

One could also create an automatic revision report by implementing a
guile function that sums up the differences between all of the versions.

Comments?  Further ideas?

Unfortunately, I am not a lisp/scheme/guile guru, and it probably would
take quite a while for me to implement this stuff.  So, are there any
volunteers? ;-)

> One of the problems is that it is (not yet) possible to mark
> articulations in a generic way.

For revisions/editions, this would be essential, I guess.


reply via email to

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