Re: Line spacing (leading) of verses in a hymn
Hello Aaron, This is clear now. Many thanks! And works really well. mattfong On Fri, Nov 27, 2020 at 5:10 PM Aaron Hill wrote: > On 2020-11-27 4:28 pm, Matthew Fong wrote: > > Hello Aaron, > > > > With respect to the scale factor of 5 that you are using. Is that > > depending > > on staff size? > > > > I'm using #(layout-set-staff-size 18) at the moment. > > Yes, my comment mentioned the default staff space as 5pt. That is a > 20pt staff size divided by 4 based on the standard 5-line staff symbol. > > If you know you have a fixed staff size of 18pt, you could just > calculate the distance by hand. 24/9 should be it, unless I flubbed my > math. But if you don't feel like doing any manual computation... > > >\override VerticalAxisGroup.nonstaff-nonstaff-spacing = > #(lambda (grob) >(define (pt n) > (* n (ly:output-def-lookup (ly:grob-layout grob) 'pt))) >`((basic-distance . ,(pt 12)) > (minimum-distance . ,(pt 12)) > (padding . 0) (stretchability . 0))) > > > > -- Aaron Hill >
Re: Line spacing (leading) of verses in a hymn
On 2020-11-27 4:28 pm, Matthew Fong wrote: Hello Aaron, With respect to the scale factor of 5 that you are using. Is that depending on staff size? I'm using #(layout-set-staff-size 18) at the moment. Yes, my comment mentioned the default staff space as 5pt. That is a 20pt staff size divided by 4 based on the standard 5-line staff symbol. If you know you have a fixed staff size of 18pt, you could just calculate the distance by hand. 24/9 should be it, unless I flubbed my math. But if you don't feel like doing any manual computation... \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #(lambda (grob) (define (pt n) (* n (ly:output-def-lookup (ly:grob-layout grob) 'pt))) `((basic-distance . ,(pt 12)) (minimum-distance . ,(pt 12)) (padding . 0) (stretchability . 0))) -- Aaron Hill
Re: Line spacing (leading) of verses in a hymn
Hello Aaron, With respect to the scale factor of 5 that you are using. Is that depending on staff size? I'm using #(layout-set-staff-size 18) at the moment. Many thanks, mattfong On Fri, Nov 27, 2020 at 4:11 PM Matthew Fong wrote: > Hello Aaron, > > That did the trick, setting the minimum-distance. I haven't been using > these settings, but clearly they interact. Will play around some more. > > > Many thanks, > mattfong > > On Fri, Nov 27, 2020 at 3:09 PM Aaron Hill > wrote: > >> On 2020-11-27 2:56 pm, Matthew Fong wrote: >> > Hello Aaron, >> > >> > Ah, I didn't dig deeply enough! >> > >> https://lilypond.org/doc/v2.20/Documentation/notation/flexible-vertical-spacing-within-systems#within_002dsystem-spacing-properties >> > >> https://lilypond.org/doc/v2.20/Documentation/notation/flexible-vertical-spacing-within-systems#spacing-of-non_002dstaff-lines >> > >> > Your example and the documentation are in perfect accord. And I played >> > around with it. However, when I plug it into my LilyPond file, it >> > *compresses* considerably (!) Please see attached picture. I put all my >> > Lyrics settings into your example and it still works as expected. >> >> That would be my mistake. I forgot to also set minimum-distance so that >> it does not compress. My example works only because there is no >> pressure to reduce spacing. >> >> Use the same value for basic-distance and minimum-distance, and it >> should work. >> >> >> -- Aaron Hill >> >
Re: Line spacing (leading) of verses in a hymn
Hello Aaron, That did the trick, setting the minimum-distance. I haven't been using these settings, but clearly they interact. Will play around some more. Many thanks, mattfong On Fri, Nov 27, 2020 at 3:09 PM Aaron Hill wrote: > On 2020-11-27 2:56 pm, Matthew Fong wrote: > > Hello Aaron, > > > > Ah, I didn't dig deeply enough! > > > https://lilypond.org/doc/v2.20/Documentation/notation/flexible-vertical-spacing-within-systems#within_002dsystem-spacing-properties > > > https://lilypond.org/doc/v2.20/Documentation/notation/flexible-vertical-spacing-within-systems#spacing-of-non_002dstaff-lines > > > > Your example and the documentation are in perfect accord. And I played > > around with it. However, when I plug it into my LilyPond file, it > > *compresses* considerably (!) Please see attached picture. I put all my > > Lyrics settings into your example and it still works as expected. > > That would be my mistake. I forgot to also set minimum-distance so that > it does not compress. My example works only because there is no > pressure to reduce spacing. > > Use the same value for basic-distance and minimum-distance, and it > should work. > > > -- Aaron Hill >
Re: Line spacing (leading) of verses in a hymn
On 2020-11-27 2:56 pm, Matthew Fong wrote: Hello Aaron, Ah, I didn't dig deeply enough! https://lilypond.org/doc/v2.20/Documentation/notation/flexible-vertical-spacing-within-systems#within_002dsystem-spacing-properties https://lilypond.org/doc/v2.20/Documentation/notation/flexible-vertical-spacing-within-systems#spacing-of-non_002dstaff-lines Your example and the documentation are in perfect accord. And I played around with it. However, when I plug it into my LilyPond file, it *compresses* considerably (!) Please see attached picture. I put all my Lyrics settings into your example and it still works as expected. That would be my mistake. I forgot to also set minimum-distance so that it does not compress. My example works only because there is no pressure to reduce spacing. Use the same value for basic-distance and minimum-distance, and it should work. -- Aaron Hill
Re: Line spacing (leading) of verses in a hymn
On 2020-11-27 1:32 pm, Matthew Fong wrote: After some searching on the Internet, and looking at the LyricsText engraver, I was not able to find anything; VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding definitely was not it. VerticalAxisGroup definitely is it. You are just using the wrong spacing parameter. Lyrics are a "nonstaff" item, so you need to adjust nonstaff-nonstaff-spacing. Also, you do not want padding, as that is the distance between ink. You need basic-distance, which for Lyrics is measured from baseline to baseline. \version "2.20.0" \score { << \new Staff \new Voice = melody { b'8 8 g'4 a'2 } \new Lyrics \lyricsto melody { Lo -- rem ip -- sum } \new Lyrics \lyricsto melody { Lo -- rem ip -- sum } >> \layout { \context { \Lyrics \override LyricText.font-size = % Default font-size is 11pt. Scale to 10pt. #(magnification->font-size 10/11) \override VerticalAxisGroup.nonstaff-nonstaff-spacing = % Default staff space is 5pt. Scale to 12pt. #'((basic-distance . 12/5) (minimum-distance . 0) (padding . 0) (stretchability . 0)) } } } -- Aaron Hill
Line spacing (leading) of verses in a hymn
Hello everyone! I hope everyone who celebrated Thanksgiving had a wonderful time. My question is how is the line spacing (leading) controlled for the verses in a hymn? The specifications I have are a 10pt font for the lyrics, with a 12pt leading (text baseline to text baseline spacing). I've attached a picture below. After some searching on the Internet, and looking at the LyricsText engraver, I was not able to find anything; VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding definitely was not it. For lyric font size control, I'm using this gem: https://lists.gnu.org/archive/html/lilypond-user/2015-05/msg00744.html For setting the lyric text, I'm using nested parallel sections, as outlined in http://lilypond.org/doc/v2.19/Documentation/notation/techniques-specific-to-lyrics#lyrics-and-repeats And the code of interest http://lilypond.org/doc/v2.19/Documentation/39/lily-fd652fdf.ly Many thanks, mattfong