[Top][All Lists]

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

Context paths (and the Edition Engraver)

From: Dan Eble
Subject: Context paths (and the Edition Engraver)
Date: Sun, 19 Jan 2020 22:42:14 +0100

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 

  \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 = #...

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

reply via email to

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