making sense of templates in manual

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

making sense of templates in manual

Markian Hlynka
Ok, I'm looking at templates in the manual, 3.2.2, and 3.2.3.


rather than reprint, you can see it here:


The first one (3.2.2) makes perfect sense to me:

it has \score, and within that it has a voice, and then a pianostaff in the form
        \context PianoStaff <<
           \context Staff = upper \upper
           \context Staff = lower \lower
        >>

That makes sense. Now, 3.2.3 says it will remove the separate vocal line. I would expect it to look something like
        \context PianoStaff <<
           \context Staff = upper \upper
           \lyricsto upper \new Lyrics \text
           \context Staff = lower \lower
        >>

or something like that. Instead, you see, in part,
         \context Staff = upper {
             \context Voice = singer \upper }
         \lyricsto "singer" \new Lyrics \text

What really confuses me is that the lower staff is now within its own << >>, whereas the upper staff has none of these, only { } . But not entirely! the \lyricsto section is outside of the upper staff context's { } !! So, it appears to me that the upper staff has no syntactic bound!

Why doesn't the upper voice need << >> ?! This seems counter-intuitive to me. Or, if it is intuitive, can someone please explain how?


Thanks,

Markian

----
Early to bed and early to rise, makes a man stupid and blind in the eyes.
                                                     --Mazer Rackham



_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: making sense of templates in manual

Mats Bengtsson-6


Markian Hlynka wrote:

> Ok, I'm looking at templates in the manual, 3.2.2, and 3.2.3.
>
>
> rather than reprint, you can see it here:
> http://lilypond.org/doc/v2.6/Documentation/user/out-www/lilypond/Piano-templates.html#Piano-templates
>
>
> The first one (3.2.2) makes perfect sense to me:
>
> it has \score, and within that it has a voice, and then a pianostaff
> in the form
>         \context PianoStaff <<
>            \context Staff = upper \upper
>            \context Staff = lower \lower
>         >>
>
> That makes sense. Now, 3.2.3 says it will remove the separate vocal
> line. I would expect it to look something like
>         \context PianoStaff <<
>            \context Staff = upper \upper
>            \lyricsto upper \new Lyrics \text
>            \context Staff = lower \lower
>         >>
>
> or something like that. Instead, you see, in part,
>          \context Staff = upper {
>              \context Voice = singer \upper }
>          \lyricsto "singer" \new Lyrics \text
>
> What really confuses me is that the lower staff is now within its own
> << >>, whereas the upper staff has none of these, only { } . But not
> entirely! the \lyricsto section is outside of the upper staff
> context's { } !! So, it appears to me that the upper staff has no
> syntactic bound!


I will modify the template to use {...} in both staves. Since the bass
clef should
appear before the music, it's certainly more intuitive to use a sequence
{\clef bass \lower } instead of two parallel "actions" << \clef bass
\lower >>.
Both provide the same result, though.

Note also that a Staff context can only contain notes, not lyrics, even
though
this seems to contradict some peoples intuition of what a staff/stave
constitutes.

   /Mats


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user