Re: Strange error from \new Voice

2020-04-10 Thread David Wright
On Fri 10 Apr 2020 at 09:58:57 (+0200), Michael Gerdau wrote:
> > When working with addlyrics it was outside the \new staff construct like
> > here:
> > 
> > tenorVoicePart = \new Staff \with {
> >   instrumentName = "Tenor"
> >   midiInstrument = "choir aahs"
> > } { \clef "treble_8" \tenorVoice }
> > \addlyrics { \verseVoice }
> > 
> > Now, it is within
> > 
> > Soprano = \new Staff \with {
> >   instrumentName = "Sopran"
> > } <<
> >   \new Voice = "SI" { \voiceOne \SopranoVoiceI }
> >   \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
> >   \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }
> >>>
> > 
> > That should be mentioned.
> 
> I'm surprised that works. I always do it like this:
> Soprano = <<
>   \new Staff \with {
> instrumentName = "Sopran"
>   } <<
> \new Voice = "SI" { \voiceOne \SopranoVoiceI }
> \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
>   >>
>   \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }
> >>
> 
> That's what's documented under the link that Joram already provided.

I shall attempt to explain (corrections welcomed).

The OP posted¹:

Soprano = \new Staff \with {
  instrumentName = "Sopran"
} <<
  \new Voice = "SI" { \voiceOne \SopranoVoiceI }
  \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
>>
\addlyrics { \VerseSopranoVoiceI }²

\addlyrics nowadays works on the Staff (2.18.2 would fail here³), and
sets the lyrics with one syllable per musical moment, whichever voice
it occurs in. See my example from earlier today. Of course, that's not
what the OP wanted, because it doesn't respect ties and slurs etc in
either voice.

Your first post suggested:

Soprano = \new Staff \with {
  instrumentName = "Sopran"
} <<
  \new Voice = "SI" { \voiceOne \SopranoVoiceI }
  \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
>>
\new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }

LP now tries to set a score consisting solely of Lyrics (because
\new Lyrics is actually at top-level), at which it fails.

In your last post, you've written:

Soprano = <<
  \new Staff \with {
instrumentName = "Sopran"
  } <<
\new Voice = "SI" { \voiceOne \SopranoVoiceI }
\new Voice = "SII" { \voiceTwo \SopranoVoiceII }
  >>
  \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }
>>

Now the outer << >> brackets bundle the lyrics together with the
Staff, which contains notes, so LP has no problem setting them.

Similarly, the example that surprised you, above, has the Voices
and Lyrics bracketed together, so no problem.

¹ The marginal indentation is for clarity, but all these examples
  are top-level and would be pushed leftwards.

² I have "corrected" the OP's indentation. Originally, this line was
  indented by two spaces, making it look as if it was inside
  something, whereas it's really just the end of the \new Staff's
  definition.

³ 2.18.2 understands \new Voice { … } \addlyrics { … }

  2.20   understands \new Voice { … } \addlyrics { … }
and also \new Staff { … } \addlyrics { … }

Cheers,
David.



Re: Strange error from \new Voice

2020-04-10 Thread David Wright
On Thu 09 Apr 2020 at 18:41:40 (+0200), Noeck wrote:
> Am 09.04.20 um 18:18 schrieb Bernhard Kleine:
> > This would be worth mentioning in the manual!
> 
> glad it works. What exactly would you mention in the manual?
> 
> 1) How to use the \lyricsto construct? It is explained here:
> 
> https://lilypond.org/doc/v2.20/Documentation/notation/common-notation-for-vocal-music.html#aligning-lyrics-to-a-melody
> 
> 2) That you have to use the correct characters ("" instead of „“)?
>Well, that’s trivial, isn’t it? I mean you cannot use a ` for a '
>or a { for a (.
> 
> 3) That \addlyrics can fail in some cases and \lyricsto is more robust?
>There is a small sentence saying
> 
> > The command \addlyrics cannot handle polyphonic settings. … For these cases 
> > one should use \lyricsto.

Yes, this warning comes twice, firstly on p267, quoted here, and later
on p292, "The \addlyrics function only works with Voice lyrics and so
cannot be used with NullVoice."

But what doesn't appear to be well explained is this recent construct:

  \new Staff <<
\new Voice { \voiceOne \soprano }
\new Voice { \voiceTwo \alto }
  >>
  \addlyrics { \textj }

An example of two different methods is attached.

Cheers,
David.
\version "2.19.44"
\language english

\paper {
  #(set-paper-size "a5landscape")
  systems-per-page = 2
  ragged-right = ##f
  ragged-last-bottom = ##t
  indent = 0
}

global = {
  \key g \major
  \time 4/4
  s1 * 4
  \bar "||"
}

align = \relative {
  b'4 g d d d g8~ g g4 fs g4 b e,8 fs g~ g c4 b b( a)
}

soprano = \relative {
  b'4 g d d d g g fs g b e,8 fs g4 c b b( a)
}

alto = \relative {
  d'4 b c c b b8 cs d4 d d b e d8 e fs4 g g( fs)
}

texti = \lyricmode {
  \set stanza = "1."
  Come, thou long -- ex -- pec -- ted __ Jes -- us,
  Born to set __ _ thy __ peo -- ple free; __
}

textj = \lyricmode {
  \set stanza = "1."
  Come, thou long -- ex -- pec -- ted __ _ Jes -- us,
  Born to set __ _ thy __ _ peo -- ple free; __ _
}

\new Staff <<
  \clef treble \global
  \new Voice { \voiceOne \soprano }
  \new Voice { \voiceTwo \alto }
  \new NullVoice = valign { \voiceOne \align }
  \new Lyrics \lyricsto valign { \texti }
>>
\layout { }

\new Staff <<
  \clef treble \global
  \new Voice { \voiceOne \soprano }
  \new Voice { \voiceTwo \alto }
>>
\addlyrics { \textj }
\layout { }


staff-align.pdf
Description: Adobe PDF document


Re: Strange error from \new Voice

2020-04-10 Thread Michael Gerdau
> When working with addlyrics it was outside the \new staff construct like
> here:
> 
> tenorVoicePart = \new Staff \with {
>   instrumentName = "Tenor"
>   midiInstrument = "choir aahs"
> } { \clef "treble_8" \tenorVoice }
> \addlyrics { \verseVoice }
> 
> Now, it is within
> 
> Soprano = \new Staff \with {
>   instrumentName = "Sopran"
> } <<
>   \new Voice = "SI" { \voiceOne \SopranoVoiceI }
>   \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
>   \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }
>>>
> 
> That should be mentioned.

I'm surprised that works. I always do it like this:
Soprano = <<
  \new Staff \with {
instrumentName = "Sopran"
  } <<
\new Voice = "SI" { \voiceOne \SopranoVoiceI }
\new Voice = "SII" { \voiceTwo \SopranoVoiceII }
  >>
  \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }
>>

That's what's documented under the link that Joram already provided.

Kind regards,
Michael
-- 
 Michael Gerdau   email: m...@qata.de
 GPG-keys available on request or at public keyserver



signature.asc
Description: OpenPGP digital signature


Re: Strange error from \new Voice

2020-04-09 Thread Bernhard Kleine
When working with addlyrics it was outside the \new staff construct like
here:

tenorVoicePart = \new Staff \with {
  instrumentName = "Tenor"
  midiInstrument = "choir aahs"
} { \clef "treble_8" \tenorVoice }
\addlyrics { \verseVoice }

Now, it is within

Soprano = \new Staff \with {
  instrumentName = "Sopran"
} <<
  \new Voice = "SI" { \voiceOne \SopranoVoiceI }
  \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
  \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }
>>
 

That should be mentioned.

Am 09.04.2020 um 18:41 schrieb Noeck:
>
> Am 09.04.20 um 18:18 schrieb Bernhard Kleine:
>> This would be worth mentioning in the manual!
> Hi Bernhard,
>
> glad it works. What exactly would you mention in the manual?
>
> 1) How to use the \lyricsto construct? It is explained here:
>
> https://lilypond.org/doc/v2.20/Documentation/notation/common-notation-for-vocal-music.html#aligning-lyrics-to-a-melody
>
> 2) That you have to use the correct characters ("" instead of „“)?
>Well, that’s trivial, isn’t it? I mean you cannot use a ` for a '
>or a { for a (.
>
> 3) That \addlyrics can fail in some cases and \lyricsto is more robust?
>There is a small sentence saying
>
>> The command \addlyrics cannot handle polyphonic settings. … For these cases 
>> one should use \lyricsto.
> Best,
> Joram
>
-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen 
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09




signature.asc
Description: OpenPGP digital signature


Re: Strange error from \new Voice

2020-04-09 Thread Noeck



Am 09.04.20 um 18:18 schrieb Bernhard Kleine:
> This would be worth mentioning in the manual!

Hi Bernhard,

glad it works. What exactly would you mention in the manual?

1) How to use the \lyricsto construct? It is explained here:

https://lilypond.org/doc/v2.20/Documentation/notation/common-notation-for-vocal-music.html#aligning-lyrics-to-a-melody

2) That you have to use the correct characters ("" instead of „“)?
   Well, that’s trivial, isn’t it? I mean you cannot use a ` for a '
   or a { for a (.

3) That \addlyrics can fail in some cases and \lyricsto is more robust?
   There is a small sentence saying

> The command \addlyrics cannot handle polyphonic settings. … For these cases 
> one should use \lyricsto.

Best,
Joram



Re: Strange error from \new Voice

2020-04-09 Thread Bernhard Kleine

Am 09.04.2020 um 17:18 schrieb Noeck:
>
> Am 09.04.20 um 17:04 schrieb Bernhard Kleine:
>> \new Lyrics \lyricsto „SI“
> Did you copy that verbatim or use the correct "normal quotes":
>
> \new Lyrics \lyricsto "SI"
>
> Just to rule out that simple problem.
>
> Joram

This is what is there :

Soprano = \new Staff \with {
  instrumentName = "Sopran"
} <<
  \new Voice = "SI" { \voiceOne \SopranoVoiceI }
  \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
  >>
  \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }

I tested also 

Soprano = \new Staff \with {
  instrumentName = "Sopran"
} <<
  \new Voice = "SI" { \voiceOne \SopranoVoiceI }
  \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
  \new Lyrics \lyricsto "SI" { \VerseSopranoVoiceI }
>>

And this worked! This would be worth mentioning in the manual!


-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen 
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09




signature.asc
Description: OpenPGP digital signature


Re: Strange error from \new Voice

2020-04-09 Thread Noeck



Am 09.04.20 um 17:04 schrieb Bernhard Kleine:
> \new Lyrics \lyricsto „SI“

Did you copy that verbatim or use the correct "normal quotes":

\new Lyrics \lyricsto "SI"

Just to rule out that simple problem.

Joram



Re: Strange error from \new Voice

2020-04-09 Thread Bernhard Kleine
this results in an error: the output is in the appendix.

Preprocessing graphical objects...

programming error: No spring between column 0 and next one

continuing, cross fingers

programming error: No spring between column 0 and next one

continuing, cross fingers

programming error: didn't find a vertical alignment in this system

continuing, cross fingers

programming error: No spring between column 0 and next one

continuing, cross fingers



Am 09.04.2020 um 15:10 schrieb Michael Gerdau:
> \new Lyrics \lyricsto „SI“

--
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen
(Infos bei mir)
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09



testMendelssohn.pdf
Description: Adobe PDF document


Re: Strange error from \new Voice

2020-04-09 Thread Michael Gerdau
Replace \addlyrics... by \new Lyrics \lyricsto „SI“...

Kind regards,
Michael 

Mobil gesendet

> Am 09.04.2020 um 15:03 schrieb Bernhard Kleine :
> 
> I have the following extract from Mendelssohn Bartholdy. I noticed that
> the parentheses in measure seven were not respected and the text was
> wrongly applied. When eleminating the line "  \new Voice = "SII" {
> \voiceTwo \SopranoVoiceII }" the text was correct. Please can you
> explain and propose a remedy?
> 
> Thank you!
> 
> \version "2.20.0"
> \language "deutsch"
> \header {
>   title = "Der 100. Psalm"
>   tagline = "Bermhard Kleine 2020"
> }
> \paper {
>   #(set-paper-size "a4")
> }
> \layout {
>   \context {
> \Voice
> \consists "Melody_engraver"
> \override Stem #'neutral-direction = #'()
>   }
>  }
> global = {
>   \key c \major
>   \time 4/4
>   \autoBeamOff
> }
> SopranoVoiceI = \relative c'' {
>   \global
>   \dynamicUp
>   g2\f g4 g | c2 c4 d | e1\fermata g,4 g8 g a4 g | f2 e |
>   c'4 c8 c c4 c | c (d) e c | h a g h | e2. (d4~| d ) c2 c4 | c1 |
> h2.\fermata
> }
> VerseSopranoVoiceI = \lyricmode {
>   Jauch -- zet dem Herrn al -- le Welt! Die -- net dem Herrn mit Freu --
> den.
>   Die -- net dem Herrn mit Freu -- den, kommt vor sein An -- ge -- sicht
> mit Froh -- lok -- ken.
>   Er -- ken -- net,
> }
> SopranoVoiceII = \relative c'' {
>   \global
>   \dynamicUp
>   % Die Noten folgen hier.
>   s1*11
> }
> Soprano = \new Staff \with {
>   instrumentName = "Sopran"
> } <<
>   \new Voice = "SI" { \voiceOne \SopranoVoiceI }
>   \new Voice = "SII" { \voiceTwo \SopranoVoiceII }
>   >>
>   \addlyrics { \VerseSopranoVoiceI }
> \score {
>   <<
> \Soprano
>   >>
>   \layout { }
> }
> 
> -- 
> spitzhalde9
> D-79853 lenzkirch
> bernhard.kle...@gmx.net
> www.b-kleine.com, www.urseetal.net
> Ich darf auch auf mein neues Buch "Falter in Lenzkirch" aufmerksam machen 
> (Infos bei mir)
> -
> thunderbird mit enigmail
> GPG schlüssel: D5257409
> fingerprint:
> 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
> 
>