Am 02.02.2017 um 21:25 schrieb SoundsFromSound: > Urs Liska wrote >> You can use the explicit staff name to access the context (or compare to >> some arbitrary value), and it's for example used in the \change Staff = >> "upper" command. > > Can you give an example of a simple score where you create a staff and > access the context explicitly? I am having trouble visualizing what you > mean, but I understand the idea and how powerful it can be when it's used in > practice. > > (i.e. \new Staff = 'Example')...then later in the file, access \context > Example and override something.
Not really a practical or understandable one. But you may have a look at https://github.com/openlilylib/scholarly/blob/master/annotate/engraver.ily#L86 Here an annotation will get a property for the context (i.e. to print the context where the annotation refers to). If the context is given explicitly in the annotation (i.e. there's some \with { context = "flute 1" } or so) this is taken. As the next step the function looks for a named context (i.e. the music happens to be in something like \new Staff = "flute 1"), and if that fails too it takes the containing directory name (which is pretty stupid and only makes sense in the project setup where the scholarLY package was originally developed). So the idea is that at some point you can extract the name of the Voice or Staff the current music is in and use that as a label or a lookup key for something. HTH Urs > > Thank you! > > > > ----- > composer | sound designer | asmr artist > LilyPond Tutorials (for beginners) --> http://bit.ly/bcl-lilypond > -- > View this message in context: > http://lilypond.1069038.n5.nabble.com/Question-about-new-Staff-command-tp199675p199688.html > Sent from the Dev mailing list archive at Nabble.com. > > _______________________________________________ > lilypond-devel mailing list > lilypond-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-devel > -- Urs Liska https://openlilylib.org http://lilypondblog.org _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel