lilypond-devel
[Top][All Lists]
Advanced

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

Re: \context foo = "bar" vs. \new foo


From: Trevor Bača
Subject: Re: \context foo = "bar" vs. \new foo
Date: Fri, 10 Feb 2006 20:07:39 -0600

On 2/10/06, Graham Percival <address@hidden> wrote:
> Why do we have \context and \new ?  I know that \context lets you name
> a context and \new doesn't... but is that the only difference?  ...
> actually, you can use \context to do fancy stuff with already-existing
> contexts, right?
>
> Could we change \new so that it can also name a new context?  I'm
> looking at the vocal templates, having:
> \score {
>    \new Staff { \violinmelody }
>    \context Staff =singer {
>      \context Voice = vocal { \blah }
>    \new PianoStaff {...}
> }
>
> The alternating \new and \context seems confusing.  It would be nice if
> we could do
>    \new Staff { \violinmelody }
>    \new Staff = singer {
>      \new Voice = vocal { \blah }
>    \new PianoStaff {...}

Ah ... you know, I remember being surprisingly confused by just this
point way back when I was first studying the templates, but had since
forgotten the point.

Certainly would be cleaner, if there's a reasonable implementation path.

--
Trevor Bača
address@hidden

reply via email to

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