lilypond-user
[Top][All Lists]
Advanced

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

Re: Learning LilyPond, comments invited


From: Colin Tennyson
Subject: Re: Learning LilyPond, comments invited
Date: Fri, 3 Jan 2014 02:11:00 -0800 (PST)

Hi Carl,

You have pointed out something very interesting:

This is the the way I had written the nesting structure in my first message:

addKey = { \key c \major  \time 4/4 }

\score {
  \new StaffGroup
  <<
    \new Staff 
    <<
      \set Staff.instrumentName = #"Superius " 
      \new Voice = "staffOne" << \addKey \staffOneNotes >>
      \lyricsto "staffOne" \new Lyrics \staffOneWords
    >>
    \new Staff 
    <<
      \set Staff.instrumentName = #"Contratenor " 
      \new Voice = "staffTwo" << \addKey \staffTwoNotes >>
      \lyricsto "staffTwo" \new Lyrics \staffTwoWords
    >>
  >>
}


The LillyPond parser accepts this, there is no error, and the score _is
rendered correctly_.
But as you point out:
 this:
<< \addKey \staffOneNotes >>
is better written as:
{ \addKey \staffOneNotes }


\score {
  \new StaffGroup
  <<
    \new Staff 
    <<
      \set Staff.instrumentName = #"Superius " 
      \new Voice = "staffOne" { \addKey \staffOneNotes }
      \lyricsto "staffOne" \new Lyrics \staffOneWords
    >>
    \new Staff 
    <<
      \set Staff.instrumentName = #"Contratenor " 
      \new Voice = "staffTwo" { \addKey \staffTwoNotes }
      \lyricsto "staffTwo" \new Lyrics \staffTwoWords
    >>
  >>
}


While the { ... } notation is better, LilyPond accepts both: { \addKey
\staffTwoNotes } and << \addKey \staffTwoNotes >>.  In this case both are
rendered the same.




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Learning-LilyPond-comments-invited-tp156969p157008.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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