Learning LilyPond, comments invited

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

Learning LilyPond, comments invited

Colin Tennyson
My second score created with Lilypond is (again) choral music, set with a mensurstriche.
It's a 100 measure score; here I present the first 10 measures, and the upper two staffs, copy-pasted in this message. Can you please have a look, your comments are appreciated.

When creating source (HTML/CSS, POVRAY, SVG) I try to apply the general rules of thumb:
- Separate the things that change from the things that stay the same
- Group the the things that change together
- Do not repeat yourself


As pointed out in the LilyPond documentation, layout of music notation is both top-down and keeping things synchronized.

http://www.lilypond.org/doc/v2.17/Documentation/notation/working-with-ancient-music_002d_002dscenarios-and-solutions#mensurstriche-layout

Following the example in the above link I have placed the layout-declaring commands in a separate group called 'barSetup':
- \hide Staff.BarLine
- All the instances of \break
- \undo \hide \Staff.BarLine
The \undo \hide \Staff.Barline must be kept in sync with the notes, so it must be snug with the notes.


It's clear to me now how much the  << .... >> operator is the workhorse of LilyPond.


I enter everything (barSetup, notes and lyrics) in groups of five measures on every line.
For the lyrics: I group the underscores for the melisma's according to the bars (three whitespaces where there is a barline), to help me keep track.

There is the hierarchical ordering:
Score
  StaffGroup
    Staff
      Voice

(And of course there are additional levels in between, as part of the internal Lilypond implementation. )

As you can see in my 10 measure snippet, I inserted a \transpose between \Score and \StaffGroup.
It's a null-transposition: c' c'. I don't comment out the \transpose, because then I have to comment out the closing bracket too, and that would be error prone. I intend to add a \transpose like that to every score, to make it transposition-ready.
Incidentally, I noticed that with the \key command inside the \transpose the key is automatically transposed too. So, transposion is set with a _single edit_.


I was able to move all of the layout to \layout, using the \context accessor.
Most of the syntax could be readily inferred:

\StaffGroup
\override Score.BarNumber.font-size = #1.5

\layout {
\context { \Score \override BarNumber.font-size = #1.5 }
}


But this one took many guesses:
\StaffGroup
  \set Score.barNumberVisibility = #(every-nth-bar-number-visible 5)

\layout {
  \context { \Score barNumberVisibility = #(every-nth-bar-number-visible 5) }
}


Lyrics.

Getting the lyrics to line up with the notes was laborious. I tried to prepare the lyrics as best as I could, but inevitably there are errors. It took many iterations to line them up.

In the case of this document the only group that has a pipe symbol for _every_ barline is the \barSetup group. It would be nice to have other groups sync up to that one.



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



\version "2.18.0"
\language "english"

% 't' as in 'test' or 'transcribing an existing score'
tBreak = { \break }
ficta = { \once \set suggestAccidentals = ##t }
addKey = { \key c \major  \time 4/4 }

barSetup =
{
  \hide Staff.BarLine  % for the Mensurstriche: inside the staff hide the barline
  s1 |         s1 |         s1 | \tBreak s1 |         s1 |         %005
  s1 |         s1 |         s1 | \tBreak s1 |         s1 |         %010
  \undo \hide Staff.BarLine \bar "||" % final barline visible
}


staffOneNotes =  \relative c'' {
  <<
    {
      g1 | g2 a2 | b2 g2 | r2 a2 | d2. c4 | %005
      b2 a2 | r4 d4 d4 b4 | c4. b8 a8[ g8] a4. g8[ f8 e8] d4 a'2  g2 \ficta fs4 |  %010
    }
    \barSetup
  >>
}
staffOneWords = \lyricmode {
  San -- cta Ma -- ri -- a, San -- cta Ma -- %005
  ri -- a, suc -- cur -- re mi- _ _ _ _  _ _ _ _  _ _ %010
}
staffTwoNotes =  \relative c' {
  <<
    {
      %\clef "G_8"
      g2 c2. d4 a2 | g4. a8 b8[ c8] d2 cs4 d2 | r4 d2 d4 |  %005
      e2 f2 | d2 r2 | c2 f2. d4 f2 | e2 d4. c8 | %010
    }
    \barSetup
  >>
}
staffTwoWords = \lyricmode {
  San -- cta Ma -- ri -- a, San -- cta %05
  Ma -- ri -- _ _ _ _ _   _ a, suc -- cur -- re mi -- se- _ _  %10
}


#(set-global-staff-size 18)

\header {
  title = "Sancta Maria, succurre miseris"
  composer = "Philippe Verdelot"
  tagline = ""
}


\score {
  \transpose c' c'
  {
    \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
      >>
    >>
  }

  \layout
  {
    indent = 6\cm
    %#(layout-set-staff-size 18)
    \context { \Score \hide SystemStartBracket }
    \context { \Score barNumberVisibility = #(every-nth-bar-number-visible 5) }
    \context { \Score \override BarNumber.break-visibility = #end-of-line-invisible }
    \context { \Score \override BarNumber.self-alignment-X = #LEFT }
    \context { \Score \override BarNumber.font-size = #3 }
   
    \context { \Staff \override InstrumentName.self-alignment-X = #RIGHT }
   
    \context { \Voice \remove "Forbid_line_break_engraver" }
  }
  %\midi { }
}
Reply | Threaded
Open this post in threaded view
|

Re: Learning LilyPond, comments invited

David Kastrup
Colin Tennyson <[hidden email]> writes:

> There is the hierarchical ordering:
> Score
>   StaffGroup
>     Staff
>       Voice
>
> (And of course there are additional levels in between, as part of the
> internal Lilypond implementation. )
>
> As you can see in my 10 measure snippet, I inserted a \transpose between
> \Score and \StaffGroup.

No, you didn't.  You used \transpose inside of a \score which starts
with \new StaffGroup.

Totally not the same thing.  \score is a reserved word in the syntax.
\new StaffGroup is music that creates a new context based on the
StaffGroup definition in the current output (either \midi or \layout).

\StaffGroup in an output block _copies_ the current StaffGroup
definition, usually in order to add further material to the copy.  Since
the copy includes the \name "StaffGroup" definition, without overriding
that name the resulting modified copy will replace the original
StaffGroup definition.

Similarly, \Score in an output definition creates a copy of the current
Score definition.  Score is more often than not created implicitly
rather than with \new Score.

> It's a null-transposition: c' c'. I don't comment out the \transpose,
> because then I have to comment out the closing bracket too,

No, you don't.  \transpose c' c' can just be removed and/or inserted.
If a single music expression is preceded with \transpose c' c', the
result is again a single music expression.  And since \score only
accepts a single music expression, you can always insert \transpose c'
g' right before that expression without having to add or remove a single
brace.

> and that would be error prone. I intend to add a \transpose like that
> to every score, to make it transposition-ready.

Every \score is transposition-ready anyway.

> I was able to move all of the layout to \layout, using the \context
> accessor.
> Most of the syntax could be readily inferred:
>
> \StaffGroup
> \override Score.BarNumber.font-size = #1.5

Again, you confuse \StaffGroup and \new StaffGroup.  \StaffGroup is not
generally available in music.  It does not make sense here.

> \layout {
> \context { \Score \override BarNumber.font-size = #1.5 }
> }

If you don't want to "infer syntax":

\layout {
  \override Score.BarNumber.font-suze = #1.5
}

will work just fine.  The difference is that your definition will _only_
affect the current definition of Score in the layout, while the second
syntax will affect _all_ definitions that have a \name _or_ an \alias of
"Score".  Now here the difference is pretty academical since you almost
never want Score to be aliased.  For other contexts, it may be more
interesting.

> But this one took many guesses:
> \StaffGroup
>   \set Score.barNumberVisibility = #(every-nth-bar-number-visible 5)
>
> \layout {
>   \context { \Score barNumberVisibility = #(every-nth-bar-number-visible 5)
> }
> }

Again:

\layout {
  \set Score.barNumberVisibility = #(every-nth-bar-number-visible 5)
}

would also work.

>   \layout
>   {
>     indent = 6\cm
>     %#(layout-set-staff-size 18)
>     \context { \Score \hide SystemStartBracket }
>     \context { \Score barNumberVisibility = #(every-nth-bar-number-visible
> 5) }
>     \context { \Score \override BarNumber.break-visibility =
> #end-of-line-invisible }

Uh, overkill.  Every line creates a new copy of the Score definition.
You can instead just write
    \context { \Score
               \hide SystemStartBracket
               barNumberVisibility = #(every-nth-bar-number-visible 5)
               ...
    }

--
David Kastrup

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

Re: Learning LilyPond, comments invited

Colin Tennyson
David Kastrup wrote
\transpose c' c' can just be removed and/or inserted.
If a single music expression is preceded with \transpose c' c', the
result is again a single music expression.  And since \score only
accepts a single music expression, you can always insert \transpose c'
g' right before that expression without having to add or remove a single
brace.
Thank you, your information will be very helpful to me.

I will study all remarks, let me reply for now to this particular one.

My prior experience with any form of markup code is HTML/CSS and SVG. In those environments when you open something you have to close it again.

http://www.lilypond.org/doc/v2.17/Documentation/notation/changing-multiple-pitches#transpose

That is the pattern that I see in the documentation.
\transpose a c { ... }
I assumed that the opening and closing brace are _part of the syntax_ of the \transpose command.
I assumed that you _must_ tell the \transpose command where to stop transposing, hence I assumed a need for an opening and a closing brace.

I gather from your reply that the \transpose command is simply placed in front of a block, and then the \transpose command will apply to the end of that block.


OK.



Reply | Threaded
Open this post in threaded view
|

Re: Learning LilyPond, comments invited

David Kastrup
Colin Tennyson <[hidden email]> writes:

> David Kastrup wrote
>> \transpose c' c' can just be removed and/or inserted.
>> If a single music expression is preceded with \transpose c' c', the
>> result is again a single music expression.  And since \score only
>> accepts a single music expression, you can always insert \transpose c'
>> g' right before that expression without having to add or remove a single
>> brace.
>
> Thank you, your information will be very helpful to me.
>
> I will study all remarks, let me reply for now to this particular one.
>
> My prior experience with any form of markup code is HTML/CSS and SVG. In
> those environments when you open something you have to close it again.
>
> http://www.lilypond.org/doc/v2.17/Documentation/notation/changing-multiple-pitches#transpose
>
> That is the pattern that I see in the documentation.
> \transpose a c { ... }
> I assumed that the opening and closing brace are _part of the syntax_ of the
> \transpose command.
> I assumed that you _must_ tell the \transpose command where to stop
> transposing, hence I assumed a need for an opening and a closing brace.
>
> I gather from your reply that the \transpose command is simply placed in
> front of a block, and then the \transpose command will apply to the end of
> that block.

LilyPond has no "blocks".  There are some constructs enclosing more than
one music expression, like { ... } (sequential music), << ... >>
(simultaneous music), < ... > (chords).

But the essential music expression does not need delimiters, and the
above constructs do not merely group more than one music expression but
they also imply semantics.

Now it's not all too different from C which tends to group a lot of
things with { } (and LilyPond also uses braces for more than just
music), but when { } are used in code, they are not just an amorphous
collection of statements, but imply _sequential_ execution of the
statements.

At any rate,

\transpose c' g' \transpose g' d' c'4-.

is a perfectly valid single music expression.

--
David Kastrup

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

Re: Learning LilyPond, comments invited

Carl Sorensen-3
In reply to this post by Colin Tennyson
Hi Colin,

On 1/2/14 12:20 PM, "Colin Tennyson" <[hidden email]> wrote:

>
>Following the example in the above link I have placed the layout-declaring
>commands in a separate group called 'barSetup':
>- \hide Staff.BarLine
>- All the instances of \break
>- \undo \hide \Staff.BarLine
>The \undo \hide \Staff.Barline must be kept in sync with the notes, so it
>must be snug with the notes.

Actually, it doesn't need to be snug with the notes.  If you know the
overall layout you want, you can entirely separate it.  You don't need to
but \barSetup in the notes for each staff; you can just add it in each
staff.  That's the way I'd recommend to do it; it has nothing to do with
the notes.

>
>
>It's clear to me now how much the  << .... >> operator is the workhorse of
>LilyPond.

You're using some parallel music in places where you don't need to, IMO.

>
>In the case of this document the only group that has a pipe symbol for
>_every_ barline is the \barSetup group. It would be nice to have other
>groups sync up to that one.

The bar check symbol (pipe symbol) doesn't sync anything.  It just checks
the musical moment and throws a warning if it's not zero.

Your music has some durations that cross bar lines.  These durations mess
up the bar checks.  Is there a reason you don't separate them into tied
groups so there are bar line breaks?

In this music you have melismata across rests.  Do you really want to do
that?  I don't know how I would sing a syllable across a rest.

You don't use extenders for melismata, but instead try to just use
hyphens.  Is there a reason for that?


Here's the way I'd lay out your music, FWIW.

Carl S.

\version "2.18.0"
\language "english"

% 't' as in 'test' or 'transcribing an existing score'
tBreak = { \break }
ficta = { \once \set suggestAccidentals = ##t }
addKey = { \key c \major  \time 4/4 }

barSetup =
{
  \hide Staff.BarLine  % for the Mensurstriche: inside the staff hide the
barline
  s1 |         s1 |         s1 | \tBreak s1 |         s1 |         %005
  s1 |         s1 |         s1 | \tBreak s1 |         s1 |         %010
  \undo \hide Staff.BarLine \bar "||" % final barline visible
}


staffOneNotes =  \relative c'' {
  g1 | g2 a2 | b2 g2 | r2 a2 | d2. c4 | %005
  b2 a2 | r4 d4 d4 b4 | c4. b8 a8[ g8] a4. g8[ f8 e8] d4 a'2  g2 \ficta
fs4 |  %010
}

staffOneWords = \lyricmode {
  San -- cta Ma -- ri -- a, San -- cta Ma -- %005
  ri -- a, suc -- cur -- re mi-  __ _ _ _ _ _ _ _ _ _ _  _ %010
}

staffTwoNotes =  \relative c' {
  %\clef "G_8"
  g2 c2~ | c4 d4 a2 | g4. a8 b8[ c8] d4 ~ | d4 cs4 d2 | r4 d2 d4 |  %005
  e2 f2 | d2 r2 | c2 f2~ | f4 d4 f2 | e2 d4. c8 | %010
}

staffTwoWords = \lyricmode {
  San -- cta Ma -- ri -- a, San -- cta %05
  Ma -- ri- __ _ _ _ _ _ _  a, suc -- cur -- re mi -- se- __ _ _  %10
}


#(set-global-staff-size 18)

\header {
  title = "Sancta Maria, succurre miseris"
  composer = "Philippe Verdelot"
  tagline = ""
}


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

  \layout {
    indent = 6\cm
    %#(layout-set-staff-size 18)
    \context { \Score \hide SystemStartBracket }
    \context { \Score barNumberVisibility = #(every-nth-bar-number-visible
5) }
    \context { \Score \override BarNumber.break-visibility =
#end-of-line-invisible }
    \context { \Score \override BarNumber.self-alignment-X = #LEFT }
    \context { \Score \override BarNumber.font-size = #3 }
   
    \context { \Staff \override InstrumentName.self-alignment-X = #RIGHT }
   
    \context { \Voice \remove "Forbid_line_break_engraver" }
  }
  %\midi { }
}




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

Re: Learning LilyPond, comments invited

Colin Tennyson
Carl Sorensen-3 wrote
Your music has some durations that cross bar lines.  These durations mess
up the bar checks.  Is there a reason you don't separate them into tied
groups so there are bar line breaks?

Ah, let me explain.

The composer, Philippe Verdelot, lived somewhere around 1500, and back then they didn't use bar lines yet.

Please consult the following entry from the LilyPond documentation:
http://www.lilypond.org/doc/v2.17/Documentation/notation/working-with-ancient-music_002d_002dscenarios-and-solutions#mensurstriche-layout

It's a compromise. The ancient notation isn't copied, but some characteristics are allowed to shine through, particularly the fact that renaissance music has no concept of measures.

That poses a challenge, of course. Can the music typesetting software handle that requirement? It may be, I don't know, that graphically oriented software is rigidly dependent on bar checks at _every_ bar.

The LilyPond developers are aware of all this, of course. LilyPond must be able to reproduce a wide range of typesetting styles.
Reply | Threaded
Open this post in threaded view
|

Re: Learning LilyPond, comments invited

Urs Liska


Colin Tennyson <[hidden email]> schrieb:

>Carl Sorensen-3 wrote
>> Your music has some durations that cross bar lines.  These durations
>mess
>> up the bar checks.  Is there a reason you don't separate them into
>tied
>> groups so there are bar line breaks?
>
>
>Ah, let me explain.
>
>The composer, Philippe Verdelot, lived somewhere around 1500, and back
>then
>they didn't use bar lines yet.
>
>Please consult the following entry from the LilyPond documentation:
>http://www.lilypond.org/doc/v2.17/Documentation/notation/working-with-ancient-music_002d_002dscenarios-and-solutions#mensurstriche-layout
>
>It's a compromise. The ancient notation isn't copied, but some
>characteristics are allowed to shine through, particularly the fact
>that
>renaissance music has no concept of measures.

I didn't follow the thread so far.
But this sounds like you should simply drop the barchecks.
If the music doesn't have a notion of measures, why check for them?

Urs

>
>That poses a challenge, of course. Can the music typesetting software
>handle
>that requirement? It may be, I don't know, that graphically oriented
>software is rigidly dependent on bar checks at _every_ bar.
>
>The LilyPond developers are aware of all this, of course. LilyPond must
>be
>able to reproduce a wide range of typesetting styles.
>
>
>
>--
>View this message in context:
>http://lilypond.1069038.n5.nabble.com/Learning-LilyPond-comments-invited-tp156969p157002.html
>Sent from the User mailing list archive at Nabble.com.
>
>_______________________________________________
>lilypond-user mailing list
>[hidden email]
>https://lists.gnu.org/mailman/listinfo/lilypond-user


--
Urs Liska
openlilylib.org

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

Re: Learning LilyPond, comments invited

Colin Tennyson
In reply to this post by Carl Sorensen-3
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.
Reply | Threaded
Open this post in threaded view
|

Re: Learning LilyPond, comments invited

David Kastrup
Colin Tennyson <[hidden email]> writes:

> 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 }
>
>
> While the { ... } notation is better, LilyPond accepts both: { \addKey
> \staffTwoNotes } and << \addKey \staffTwoNotes >>.  In this case both are
> rendered the same.
But that's not a given.  Take, for example, the output of

addKey = { \key g \major  \time 4/4 }
staffOneNotes = { \grace { d'16 g' b' } d''8 8 8 8 fis'8 8 g'4 }

\score {
  \new StaffGroup <<
    \new Staff \new Voice = "staffOne" << \addKey \staffOneNotes >>
    \new Staff \new Voice = "staffOne" { \addKey \staffOneNotes }
  >>
}


Also, if you have something like

\new StaffGroup
{
   << \key c\major { c' c' c' c' } >>
}

you'll likely be surprised by the results...

--
David Kastrup

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

Re: Learning LilyPond, comments invited

Urs Liska


David Kastrup <[hidden email]> schrieb:

>Colin Tennyson <[hidden email]> writes:
>
>> 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 }
>>
>>
>> While the { ... } notation is better, LilyPond accepts both: {
>\addKey
>> \staffTwoNotes } and << \addKey \staffTwoNotes >>.  In this case both
>are
>> rendered the same.
>
>But that's not a given.  Take, for example, the output of
>
>
>------------------------------------------------------------------------
>
>
>Also, if you have something like
>
>\new StaffGroup
>{
>   << \key c\major { c' c' c' c' } >>
>}
>
>you'll likely be surprised by the results...

Colin, your example works because you have exactly one music expression inside the angled brackets.
These let you enter multiple expressions that are interpreted in parallel. And if there is just one expression inside it just does nothing.

HTH
Urs


--
Urs Liska
openlilylib.org

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

Re: Learning LilyPond, comments invited

David Kastrup
Urs Liska <[hidden email]> writes:

> David Kastrup <[hidden email]> schrieb:
>>Colin Tennyson <[hidden email]> writes:
>>
>>> 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 }
>>>
>>>
>>> While the { ... } notation is better, LilyPond accepts both: {
>>\addKey
>>> \staffTwoNotes } and << \addKey \staffTwoNotes >>.  In this case both
>>are
>>> rendered the same.
>>
>>But that's not a given.  Take, for example, the output of
>>
>>
>>------------------------------------------------------------------------
>>
>>
>>Also, if you have something like
>>
>>\new StaffGroup
>>{
>>   << \key c\major { c' c' c' c' } >>
>>}
>>
>>you'll likely be surprised by the results...
>
> Colin, your example works because you have exactly one music
> expression inside the angled brackets.

\addKey \staffOneNotes are _two_ music expressions.  I used exactly the
same template for demonstrating things that don't work.

> These let you enter multiple expressions that are interpreted in
> parallel. And if there is just one expression inside it just does
> nothing.

But that's not what we had here.

--
David Kastrup

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

Re: Learning LilyPond, comments invited

Urs Liska


David Kastrup <[hidden email]> schrieb:

>Urs Liska <[hidden email]> writes:
>
>> David Kastrup <[hidden email]> schrieb:
>>>Colin Tennyson <[hidden email]> writes:
>>>
>>>> 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 }
>>>>
>>>>
>>>> While the { ... } notation is better, LilyPond accepts both: {
>>>\addKey
>>>> \staffTwoNotes } and << \addKey \staffTwoNotes >>.  In this case
>both
>>>are
>>>> rendered the same.
>>>
>>>But that's not a given.  Take, for example, the output of
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>
>>>Also, if you have something like
>>>
>>>\new StaffGroup
>>>{
>>>   << \key c\major { c' c' c' c' } >>
>>>}
>>>
>>>you'll likely be surprised by the results...
>>
>> Colin, your example works because you have exactly one music
>> expression inside the angled brackets.
>
>\addKey \staffOneNotes are _two_ music expressions.  I used exactly the
>same template for demonstrating things that don't work.
>
>> These let you enter multiple expressions that are interpreted in
>> parallel. And if there is just one expression inside it just does
>> nothing.
>
>But that's not what we had here.

Ok, sorry for not having looked close enough.


--
Urs Liska
openlilylib.org

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

Re: Learning LilyPond, comments invited

Colin Tennyson
In reply to this post by David Kastrup
David Kastrup wrote
Take, for example, the output of

addKey = { \key g \major  \time 4/4 }
staffOneNotes = { \grace { d'16 g' b' } d''8 8 8 8 fis'8 8 g'4 }

\score {
  \new StaffGroup <<
    \new Staff \new Voice = "staffOne" << \addKey \staffOneNotes >>
    \new Staff \new Voice = "staffOne" { \addKey \staffOneNotes }
  >>
}


Also, if you have something like

\new StaffGroup
{
   << \key c\major { c' c' c' c' } >>
}

you'll likely be surprised by the results...

Given these concerns the following templates in the documentation need to be updated:
http://www.lilypond.org/doc/v2.18/Documentation/learning/satb-on-four-staves

The template uses the ill advised << ... >> grouping

This is just one of the templates, presumably _all_ the vocal ensenble templates are using  << ... >>

How many different versions of the documentation do you keep?
I'm mostly encountering v2.16 and v2.17, but sometimes a google search gives me a result in v2.14

(For google searches in the lilypond documentation I generally add the following specifiation in the Google search bar:   site:lilypond.org/doc/v2.17/Documentation/)
Reply | Threaded
Open this post in threaded view
|

Re: Learning LilyPond, comments invited

Alex Loomis-2
In reply to this post by Colin Tennyson
From what I've seen, \cadenzaOn seems to be the preferred way of writing unmeasured music.



On Jan 3, 2014, at 3:14 AM, Colin Tennyson <[hidden email]> wrote:

> Carl Sorensen-3 wrote
>> Your music has some durations that cross bar lines.  These durations mess
>> up the bar checks.  Is there a reason you don't separate them into tied
>> groups so there are bar line breaks?
>
>
> Ah, let me explain.
>
> The composer, Philippe Verdelot, lived somewhere around 1500, and back then
> they didn't use bar lines yet.
>
> Please consult the following entry from the LilyPond documentation:
> http://www.lilypond.org/doc/v2.17/Documentation/notation/working-with-ancient-music_002d_002dscenarios-and-solutions#mensurstriche-layout
>
> It's a compromise. The ancient notation isn't copied, but some
> characteristics are allowed to shine through, particularly the fact that
> renaissance music has no concept of measures.
>
> That poses a challenge, of course. Can the music typesetting software handle
> that requirement? It may be, I don't know, that graphically oriented
> software is rigidly dependent on bar checks at _every_ bar.
>
> The LilyPond developers are aware of all this, of course. LilyPond must be
> able to reproduce a wide range of typesetting styles.
>
>
>
> --
> View this message in context: http://lilypond.1069038.n5.nabble.com/Learning-LilyPond-comments-invited-tp156969p157002.html
> Sent from the User mailing list archive at Nabble.com.
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user

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

Re: Learning LilyPond, comments invited

Colin Tennyson
Alex Loomis-2 wrote
From what I've seen, \cadenzaOn seems to be the preferred way of writing unmeasured music.
Well, the availability of "\hide \BarLine" and  "\undo \hide \BarLine" is relatively recent.
I think I saw a place where it was described in the v2.17 documentation, but not in the v2.16 documentation


As to \cadenzaOn, from the LilyPond documentation:
http://www.lilypond.org/doc/v2.17/Documentation/notation/displaying-rhythms

"Inserting a \bar command within a cadenza does not start a new measure, even if a bar line is printed. So any accidentals – which are usually assumed to remain in force until the end of the measure – will still be valid after the bar line printed by \bar."

In the case of typesetting renaissance (choral) music you do want the modern conventions for accidentals. With \cadenzaOn you would lose the automated handling of accidentals.
Reply | Threaded
Open this post in threaded view
|

Re: Learning LilyPond, comments invited

Eluze
In reply to this post by David Kastrup
David Kastrup wrote
[...]
 Take, for example, the output of

addKey = { \key g \major  \time 4/4 }
staffOneNotes = { \grace { d'16 g' b' } d''8 8 8 8 fis'8 8 g'4 }

\score {
  \new StaffGroup <<
    \new Staff \new Voice = "staffOne" << \addKey \staffOneNotes >>
    \new Staff \new Voice = "staffOne" { \addKey \staffOneNotes }
  >>
}
isn't that the well-known issue with grace notes at the begin of simultaneous music - if you don't have grace notes in staffOneNotes or you add corresponding grace notes in addKey like

addKey = { \key g \major  \time 4/4  \grace s8. }

then it works correctly, doesn't it?

this said, I also prefer the form

{ \addKey \staffOneNotes }

Eluze
Reply | Threaded
Open this post in threaded view
|

Re: Learning LilyPond, comments invited

David Kastrup
Eluze <[hidden email]> writes:

> David Kastrup wrote
>> [...]
>>  Take, for example, the output of
>>
>> addKey = { \key g \major  \time 4/4 }
>> staffOneNotes = { \grace { d'16 g' b' } d''8 8 8 8 fis'8 8 g'4 }
>>
>> \score {
>>   \new StaffGroup <<
>>     \new Staff \new Voice = "staffOne" << \addKey \staffOneNotes >>
>>     \new Staff \new Voice = "staffOne" { \addKey \staffOneNotes }
>>   >>
>> }
>
> isn't that the well-known issue with grace notes at the begin of
> simultaneous music - if you don't have grace notes in staffOneNotes or you
> add corresponding grace notes in addKey like
>
> addKey = { \key g \major  \time 4/4  \grace s8. }
>
> then it works correctly, doesn't it?

I'm not saying that it works incorrectly.  Parallel music is
synchronized at the time point 0.  Sequential music is executed in
sequence.

The behavior in this case is quite logical.

It would make some sense to move context creation backward in time
before simultaneous grace music in order to maintain top-down order in a
<< \new ... \new ... \new ... >> construct.

--
David Kastrup

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

Re: Learning LilyPond, comments invited

Noeck
In reply to this post by Colin Tennyson
Hi Colin,

Am 03.01.2014 15:35, schrieb Colin Tennyson:
> Alex Loomis-2 wrote
>> From what I've seen, \cadenzaOn seems to be the preferred way of writing
>> unmeasured music.
>
> Well, the availability of "\hide \BarLine" and  "\undo \hide \BarLine" is
> relatively recent.
> I think I saw a place where it was described in the v2.17 documentation, but
> not in the v2.16 documentation

But please be aware that hiding just means that the barline is not
visible. It still takes space and the timing is still in place and checked.
To really leave out the barline, you can \omit it (or BarLine.stencil =
##f). Even then this only affects the optical output. And you still have
your 4/4 measure (or what ever) that needs to be satisfied.

\cadenzaOn only affects the timing:
cadenzaOn  = \set Timing.timing = ##f
cadenzaOff = \set Timing.timing = ##t

And I think this what you want.

You don't loose the accidental handling - it is just adapted.
Remembering the accidentals until the barline just does not make sense
without a barline. How long would you like to remember it?

Cheers,
Joram

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

Re: Learning LilyPond, comments invited

Karl Hammar
In reply to this post by Colin Tennyson
Colin Tennyson:
> Carl Sorensen-3 wrote
> > Your music has some durations that cross bar lines.  These durations mess
> > up the bar checks.  Is there a reason you don't separate them into tied
> > groups so there are bar line breaks?
...
> The composer, Philippe Verdelot, lived somewhere around 1500, and back then
> they didn't use bar lines yet.

There are examples of pre1600 scores using bar lines though I don't
have any references handy. Perhaps if you consult:

 Willy Apel / The Notation of Polyphonic Music 900-1600

http://en.wikipedia.org/wiki/Bar_line says:

 The earliest barlines, used in keyboard and vihuela music in the 15th
 and 16th centuries, didn't reflect a regular meter at all but were
 only section divisions, or in some cases marked off every beat.

 Barlines began to be introduced into ensemble music in the late 16th
 century but continued to be used irregularly for a time. Not until
 the mid-1600s were barlines used in the modern style with every
 measure being the same length, and they began to be associated with
 time signatures.

> Please consult the following entry from the LilyPond documentation:
> http://www.lilypond.org/doc/v2.17/Documentation/notation/working-with-ancient-music_002d_002dscenarios-and-solutions#mensurstriche-layout

Mensurstriche are really hard to read and confuses many
singers/musicians. Why don't you either a) don't use bar lines and the
likes at all or b) use:

 http://www.lilypond.org/doc/v2.17/Documentation/notation/displaying-rhythms#automatic-note-splitting

and

 \set Score.defaultBarType = ";"

> It's a compromise. The ancient notation isn't copied, but some
> characteristics are allowed to shine through, particularly the fact that
> renaissance music has no concept of measures.

Yes and no. The music had the concept of "taktus", which meant a few
different things.

. how the brevis was subdivided, in 3 (perfect) or in 2 (imperfect)
  semibrevis
. the normal pulse, it was what the then current conductor showed in
  his gesture, up and down.
. the word taktus has survived in the word tempo (= beat), and the
  german/swedish/dänish/finnish word for bar/measure, see:
  http://www.lilypond.org/doc/v2.17/Documentation/music-glossary/measure

In the music of that time (and the baroque and up to our days)
there was the concept of strong and weak beats (see e.g.
Jeppesen / Kontrapunkt (vokalpolyfoni)).

The wikipedia link above also says:

 In musical notation, a bar (or measure) is a segment of time defined
 by a given number of beats, each of which are assigned a particular
 note value.

and in that sense the concept of a bar/measure is clearly there.

In some ways you could say that the the brevis was what is a
bar/measure today.

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57



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