Re: \addlyrics in ossia staff

2021-09-20 Thread Lukas-Fabian Moser

Thanks David,


Lukas-Fabian got there first!

You'd think so, but I staked my claim years ago:

commit e6895cdbcf30f3683a8c1b1c50dbb1b154ca6bdb
Author: David Kastrup 
Date:   Mon Aug 3 09:23:40 2015 +0200


:-)

I think it's quite hard to produce an example of easy and convenient 
modern-day LilyPond code which you haven't been responsible for in some 
way or another.


That reminds me of the anecdote from Salzburg: 
https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00269.html - 
unfortunately, I wasn't around at that moment.


Lukas




Re: \addlyrics in ossia staff

2021-09-20 Thread David Kastrup
Peter Toye  writes:

> Thanks David,
>
>
> Lukas-Fabian got there first!

You'd think so, but I staked my claim years ago:

commit e6895cdbcf30f3683a8c1b1c50dbb1b154ca6bdb
Author: David Kastrup 
Date:   Mon Aug 3 09:23:40 2015 +0200

Issue 4537/1: Let \addlyrics accept an optional context mod

Since \addlyrics always creates a new Lyrics context, there seems to be
little point in not allowing it to have a \with clause.

This change allows the use of the syntax

\new Voice {...} \addlyrics \with ... {...}

in order to achieve the effect of what previously required

   << \new Voice = "name" {...}
  \new Lyrics \with ... \lyricsto "name" {...}
   >>

Incidentally, the commit message also mentions how to do this in a more
roundabout way.

-- 
David Kastrup



Re: \addlyrics in ossia staff

2021-09-19 Thread Peter Toye
Thanks David,


Lukas-Fabian got there first!

Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-
Sunday, September 19, 2021, 3:21:27 PM, David Kastrup wrote:

> Peter Toye  writes:

>> I'm trying to set a passage of vocal music with a short solo line. But
>> the example below shows that the lyric is not attached to the correct
>> staff. Any ideas how to get it right simply?

Re: \addlyrics in ossia staff

2021-09-19 Thread David Kastrup
Peter Toye  writes:

> I'm trying to set a passage of vocal music with a short solo line. But
> the example below shows that the lyric is not attached to the correct
> staff. Any ideas how to get it right simply?

\version "2.22.1"
\language "english"
{
  \new Staff = "Tutti" {
<<
  \new Voice = "TuttiVoice" {
\relative {
  c'4 d e f |
  << {
g f e d |
c d e f |
}
{
  \new Staff ="ossia" \with {
\remove "Time_signature_engraver"
firstClef = ##f
alignAboveContext = "Tutti"
  }
  \relative {
b'4 a g f |
e f g a |
  } \addlyrics \with { alignBelowContext = "ossia" } {
So -- lo so -- lo so -- lo so -- lo
  }
}
  >>
  g f e d |
}
  }
  \new Lyrics \lyricsto "TuttiVoice" {
Tut -- ti tut -- ti  tut -- ti tut -- ti
Tut -- ti tut -- ti  tut -- ti tut -- ti
  }
>>
  }
}


-- 
David Kastrup


Re: \addlyrics in ossia staff

2021-09-19 Thread Peter Toye
Hello Lukas-Fabian,


Thanks. I knew I'd missed something.
 
With regard to the quotes - I was following the latest documentation.  

Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-
Sunday, September 19, 2021, 2:28:00 PM, Lukas-Fabian Moser wrote:

> Hi Peter,

> Am 19.09.21 um 15:15 schrieb Peter Toye:
>> I'm trying to set a passage of vocal music with a short solo line. But the 
>> example below shows that the lyric is not attached to the correct staff. Any 
>> ideas how to get it right simply?
> That's a matter of naming the ossia staff and using alignBelowContext for the 
> lyrics.
> But I modified your snippet a bit: I removed a number of superfluous brace 
> pairs { }, and it's not necessary anymore to put quotes "" around context 
> names.

> \version "2.22.1"

> \language "english"

> \new Staff = tutti-staff
> <<
>   \new Voice = tutti-voice
>   \relative {
>     c'4 d e f |
>     <<
>   {
>     g f e d |
>     c d e f |
>   }
>   \new Staff = ossiastaff \with {
>     \remove "Time_signature_engraver"
>     firstClef = ##f
>     alignAboveContext = tutti-staff
>   } \relative {
>     b'4 a g f |
>     e f g a |
>   }
>   \addlyrics \with { alignBelowContext = ossiastaff } {
>     So -- lo so -- lo so -- lo so -- lo
>   }
>     >>
>     g f e d |
>   }

>   \new Lyrics \lyricsto tutti-voice {
>     Tut -- ti tut -- ti  tut -- ti tut -- ti
>     Tut -- ti tut -- ti  tut -- ti tut -- ti
>   }
>>>

> Actually, I don't think removing the Time_signature_engraver is really 
> correct for an ossia staff, because if a time signature change were to happen 
> during an ossia, it should be printed in the ossia staff. But I admit that 
> it's quite hard to design ossia staves in a "universally correct" way, and 
> it's probably best to use shortcuts like you did in music not containig 
> complications like these.

> Lukas

Re: \addlyrics in ossia staff

2021-09-19 Thread Lukas-Fabian Moser

Hi Peter,


Am 19.09.21 um 15:15 schrieb Peter Toye:
I'm trying to set a passage of vocal music with a short solo line. But 
the example below shows that the lyric is not attached to the correct 
staff. Any ideas how to get it right simply?


That's a matter of naming the ossia staff and using alignBelowContext 
for the lyrics.


But I modified your snippet a bit: I removed a number of superfluous 
brace pairs { }, and it's not necessary anymore to put quotes "" around 
context names.



\version "2.22.1"

\language "english"

\new Staff = tutti-staff
<<
  \new Voice = tutti-voice
  \relative {
    c'4 d e f |
    <<
  {
    g f e d |
    c d e f |
  }
  \new Staff = ossiastaff \with {
    \remove "Time_signature_engraver"
    firstClef = ##f
    alignAboveContext = tutti-staff
  } \relative {
    b'4 a g f |
    e f g a |
  }
  \addlyrics \with { alignBelowContext = ossiastaff } {
    So -- lo so -- lo so -- lo so -- lo
  }
    >>
    g f e d |
  }

  \new Lyrics \lyricsto tutti-voice {
    Tut -- ti tut -- ti  tut -- ti tut -- ti
    Tut -- ti tut -- ti  tut -- ti tut -- ti
  }
>>


Actually, I don't think removing the Time_signature_engraver is really 
correct for an ossia staff, because if a time signature change were to 
happen during an ossia, it should be printed in the ossia staff. But I 
admit that it's quite hard to design ossia staves in a "universally 
correct" way, and it's probably best to use shortcuts like you did in 
music not containig complications like these.



Lukas