lilypond-devel
[Top][All Lists]
Advanced

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

Re: Context paths (and the Edition Engraver)


From: David Kastrup
Subject: Re: Context paths (and the Edition Engraver)
Date: Mon, 20 Jan 2020 10:04:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Dan Eble <address@hidden> writes:

> One of the things in Kieren's intro to the Edition Engraver (EE) that 
> resonated with me was the context paths.  His example was something like 
> `singwithbach.along.Voice.B`, which was supposed to refer to something like 
> this:
>
>   \context Staff = "along" {
>     \context Voice = "B" {
>       ...
>     }
>   }
>
> The ability to refer to contexts this way is a great idea, though IMHO it 
> needs some work to reduce ambiguity.  But the point I came here to make is 
> this: if an EE using a similar syntax is ever to be a part of LilyPond 
> proper, the syntax ought to be consistently supported for other LilyPond 
> commands that refer to contexts.  For example,
>
>   \context along.Voice.B { ... }
>
>   \set along.Voice.B.property = #...
>
>   \change Voice = ChoirStaff.A.Staff.B
>
> It would be wise to ask whether there are use cases for any "pronouns"
> (like `.` and `..` in file paths, and `this` in C++) to make it
> possible to root a search very specifically.  The existence of the
> `descend-only` music property suggests that there might be.

I think that this would warrant closely analysing what the EE does and
checking whether its way of specifying things is a natural match to what
might be useful with LilyPond, or at least can be made so without
impacting its usefulness.  It seems that the applicability inside of
LilyPond currently is sufficiently vague that merging EE and LilyPond
core usage in that manner makes sense only if the solution is not
awkward for either LilyPond or EE in some manner: we don't want subtly
different and/or less than useful semantics.

> I also think I have a pretty good use case for finding "the closest
> enclosing context where a given property is defined," but I am not now
> prepared to elaborate.  — Dan

Comments from the EE crowd?

-- 
David Kastrup



reply via email to

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