Re: is it possible to glue two staff's together? (hymn solution)
Please let me know if this is going to be sponsored, I'd consider participating. This all has a close relation with my problem stated earlier in this list. I'd like e.g. - Tell a lyrics to offset only if it is necessary, or - Tell a lyrics to offset vertically only up to the end of the current staff, or - Declare two or more offsets, one for the current staff and others for the following ones, or - Declare an offset to be collapsable or something, or - Let all lyrics to always use the minimum required space on paper as a whole, or ... etc. Sorry I can't express it better. Of course this is not only a matter of Lilypond input syntax but surely it would require internal hacking. I know this all is somewhat explained in the difficult tweaks section in the manual, but IMO it requires too much Scheme skills. 2007/10/17, Ted Walther <[EMAIL PROTECTED]>: > Rene, thank you for that example. It works nicely, except on lines > where the refrain is by itself. On those lines, the extra space is > inserted even though it isn't needed. Here is the output PDF: > > http://hymns.reactor-core.org/lilypond/refrain-rene.pdf > > I changed the value 7.4 to 8 to get the refrain nicely centered. > > Han-Wen hasn't posted anything in a while; is he on vacation? I guess > at this point I should ask, what would be involved in a coding fix, and > how much would it take to sponsor it? > > I am thinking of two options right now. > > Either a \new GlueStaff, which "glues" staves together inside it. > > Or a new option to the Lyrics context so that its vertical alignment > ignores any other Lyrics contexts which don't overlap the Lyrics in the > horizontal direction. > > Either of those options would be most satisfactory. I regret I don't > know lilypond internals any better, so I could suggest something easier > to implement. > > Ted > > On Tue, Oct 16, 2007 at 12:04:04PM +0200, Ren? Brandenburger wrote: > >Hi Ted, > > > >yesterday I had some time to look at your issue again, > > > >here is a snippet, which works fine, the only caveat is that the refrain > >also takes up the same amount of space in e new line. > > > >\version "2.11.19" > >\header { > > title = "Wir feiern heut ein Fest" > >} > >\include "italiano.ly" > >verseun = \lyricmode { \set stanza = "1. " > > Wir fei -- ern heut ein Fest, > > und kom -- men hier zu -- sam -- men. > > Wir fei -- ern heut ein Fest, > > weil Gott uns al -- le liebt > >} > >versedeux = \lyricmode { \set stanza = "2. " > > Wir fei -- ern heut ein Fest, > > und sin -- gen mit -- ein -- an -- der. > > Wir fei -- ern heut ein Fest, > > weil Gott uns al -- le liebt > >} > >versetrois = \lyricmode { \set stanza = "3. " > > Wir fei -- ern heut ein Fest, > > und dan -- ken f??r die Ga -- ben > > Wir fei -- ern heut ein Fest, > > weil Gott uns al -- le liebt > >} > >verserefrain = \lyricmode { \set stanza = "Refrain: " > > Her -- ein, her -- ein! > > Wir la -- den al -- le ein. > > Her -- ein, her -- ein! > > Wir la -- den al -- le ein. > >} > >staffSoprano = \new Staff { > > \time 4/4 > > \tempo 4 = 96 > > \set Staff.midiInstrument="voice aahs" > > \key sol \major > > \clef treble > > \relative do' { > > \context Voice = "melodySop" { > > \partial 8 *1 > > re8 | > > si'16 si8. sol8 fad mi4 r8 sol8 | > > fad16 fad8. sol8 la si sol r8 re8 | > > si'16 si8. sol8 fad mi4 r8 sol8 | > > fad8 fad sol16 la sol8 ~ sol4 r8 > > } > > \context Voice = "repeatSop" { > > \repeat volta 2 { > > \partial 8 * 1 > > re8 | > > si'4 re8 do4. r8 si8 | > > la8 la si16 do si8 ~ si4 r8 re,8 | > > si'4 re8 do4. r8 si8 | > > la8 la sol16 fad sol8 ~ sol4 r8 > > } > > } > > %\bar "|." > > } > >} > >\score { > > << > > \staffSoprano > > \context Lyrics = "verseUn" \lyricmode { \lyricsto "melodySop" > >\verseun } > > \context Lyrics = "verseDeux" \lyricmode { \lyricsto "melodySop" > >\versedeux } > > > > %% refrain %% > > \context Lyrics = "verseRefrain" \lyricmode { > > %% move down, you probably have to play with the 7.4 to get > > it aligned > >the way you want > > \override VerticalAxisGroup #'minimum-Y-extent = #'(-0 . 7.4) > > \lyricsto "repeatSop" \verserefrain > > } > > > > \context Lyrics = "verseTrois" \lyricmode { \lyricsto "melodySop" > >\versetrois } > > \context Lyrics = "versetrois" \lyricmode { \lyricsto "melodySop" > >\versetrois } > > > > >> > >
Re: is it possible to glue two staff's together? (hymn solution)
Rene, thank you for that example. It works nicely, except on lines where the refrain is by itself. On those lines, the extra space is inserted even though it isn't needed. Here is the output PDF: http://hymns.reactor-core.org/lilypond/refrain-rene.pdf I changed the value 7.4 to 8 to get the refrain nicely centered. Han-Wen hasn't posted anything in a while; is he on vacation? I guess at this point I should ask, what would be involved in a coding fix, and how much would it take to sponsor it? I am thinking of two options right now. Either a \new GlueStaff, which "glues" staves together inside it. Or a new option to the Lyrics context so that its vertical alignment ignores any other Lyrics contexts which don't overlap the Lyrics in the horizontal direction. Either of those options would be most satisfactory. I regret I don't know lilypond internals any better, so I could suggest something easier to implement. Ted On Tue, Oct 16, 2007 at 12:04:04PM +0200, Ren? Brandenburger wrote: Hi Ted, yesterday I had some time to look at your issue again, here is a snippet, which works fine, the only caveat is that the refrain also takes up the same amount of space in e new line. \version "2.11.19" \header { title = "Wir feiern heut ein Fest" } \include "italiano.ly" verseun = \lyricmode { \set stanza = "1. " Wir fei -- ern heut ein Fest, und kom -- men hier zu -- sam -- men. Wir fei -- ern heut ein Fest, weil Gott uns al -- le liebt } versedeux = \lyricmode { \set stanza = "2. " Wir fei -- ern heut ein Fest, und sin -- gen mit -- ein -- an -- der. Wir fei -- ern heut ein Fest, weil Gott uns al -- le liebt } versetrois = \lyricmode { \set stanza = "3. " Wir fei -- ern heut ein Fest, und dan -- ken f??r die Ga -- ben Wir fei -- ern heut ein Fest, weil Gott uns al -- le liebt } verserefrain = \lyricmode { \set stanza = "Refrain: " Her -- ein, her -- ein! Wir la -- den al -- le ein. Her -- ein, her -- ein! Wir la -- den al -- le ein. } staffSoprano = \new Staff { \time 4/4 \tempo 4 = 96 \set Staff.midiInstrument="voice aahs" \key sol \major \clef treble \relative do' { \context Voice = "melodySop" { \partial 8 *1 re8 | si'16 si8. sol8 fad mi4 r8 sol8 | fad16 fad8. sol8 la si sol r8 re8 | si'16 si8. sol8 fad mi4 r8 sol8 | fad8 fad sol16 la sol8 ~ sol4 r8 } \context Voice = "repeatSop" { \repeat volta 2 { \partial 8 * 1 re8 | si'4 re8 do4. r8 si8 | la8 la si16 do si8 ~ si4 r8 re,8 | si'4 re8 do4. r8 si8 | la8 la sol16 fad sol8 ~ sol4 r8 } } %\bar "|." } } \score { << \staffSoprano \context Lyrics = "verseUn" \lyricmode { \lyricsto "melodySop" \verseun } \context Lyrics = "verseDeux" \lyricmode { \lyricsto "melodySop" \versedeux } %% refrain %% \context Lyrics = "verseRefrain" \lyricmode { %% move down, you probably have to play with the 7.4 to get it aligned the way you want \override VerticalAxisGroup #'minimum-Y-extent = #'(-0 . 7.4) \lyricsto "repeatSop" \verserefrain } \context Lyrics = "verseTrois" \lyricmode { \lyricsto "melodySop" \versetrois } \context Lyrics = "versetrois" \lyricmode { \lyricsto "melodySop" \versetrois } >> \layout { \context { \Lyrics \override LyricSpace #'minimum-distance = #0.6 \override LyricText #'font-size = #-1 } } } \score { \unfoldRepeats \staffSoprano \midi { } } \paper { } -- There's a party in your skull. And you're invited! Name:Ted Walther Phone: 778-320-0644 Email: [EMAIL PROTECTED] Skype: tederific Address: 3422 Euclid Ave, Vancouver, BC V5R4G4 (Canada) ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: is it possible to glue two staff's together? (hymn solution)
Hi Ted, yesterday I had some time to look at your issue again, here is a snippet, which works fine, the only caveat is that the refrain also takes up the same amount of space in e new line. \version "2.11.19" \header { title = "Wir feiern heut ein Fest" } \include "italiano.ly" verseun = \lyricmode { \set stanza = "1. " Wir fei -- ern heut ein Fest, und kom -- men hier zu -- sam -- men. Wir fei -- ern heut ein Fest, weil Gott uns al -- le liebt } versedeux = \lyricmode { \set stanza = "2. " Wir fei -- ern heut ein Fest, und sin -- gen mit -- ein -- an -- der. Wir fei -- ern heut ein Fest, weil Gott uns al -- le liebt } versetrois = \lyricmode { \set stanza = "3. " Wir fei -- ern heut ein Fest, und dan -- ken für die Ga -- ben Wir fei -- ern heut ein Fest, weil Gott uns al -- le liebt } verserefrain = \lyricmode { \set stanza = "Refrain: " Her -- ein, her -- ein! Wir la -- den al -- le ein. Her -- ein, her -- ein! Wir la -- den al -- le ein. } staffSoprano = \new Staff { \time 4/4 \tempo 4 = 96 \set Staff.midiInstrument="voice aahs" \key sol \major \clef treble \relative do' { \context Voice = "melodySop" { \partial 8 *1 re8 | si'16 si8. sol8 fad mi4 r8 sol8 | fad16 fad8. sol8 la si sol r8 re8 | si'16 si8. sol8 fad mi4 r8 sol8 | fad8 fad sol16 la sol8 ~ sol4 r8 } \context Voice = "repeatSop" { \repeat volta 2 { \partial 8 * 1 re8 | si'4 re8 do4. r8 si8 | la8 la si16 do si8 ~ si4 r8 re,8 | si'4 re8 do4. r8 si8 | la8 la sol16 fad sol8 ~ sol4 r8 } } %\bar "|." } } \score { << \staffSoprano \context Lyrics = "verseUn" \lyricmode { \lyricsto "melodySop" \verseun } \context Lyrics = "verseDeux" \lyricmode { \lyricsto "melodySop" \versedeux } %% refrain %% \context Lyrics = "verseRefrain" \lyricmode { %% move down, you probably have to play with the 7.4 to get it aligned the way you want \override VerticalAxisGroup #'minimum-Y-extent = #'(-0 . 7.4) \lyricsto "repeatSop" \verserefrain } \context Lyrics = "verseTrois" \lyricmode { \lyricsto "melodySop" \versetrois } \context Lyrics = "versetrois" \lyricmode { \lyricsto "melodySop" \versetrois } >> \layout { \context { \Lyrics \override LyricSpace #'minimum-distance = #0.6 \override LyricText #'font-size = #-1 } } } \score { \unfoldRepeats \staffSoprano \midi { } } \paper { } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: is it possible to glue two staff's together? (hymn solution)
Rene, thanks for continuing to look into this. If there is a way to "close the gap", this will work. But it does seem more clear conceptually to start up a new staff and do what I need to in the new staff. Then we would just need to glue the staves together, as one car in a train follows another. Ted On Wed, Oct 10, 2007 at 11:31:49AM +0200, Ren? Brandenburger wrote: Hi Ted, there you could try to create an own context c inbetween context a and b and try to get it take up no space between the two other context, but I'm not sure about the property to tweak there, perhaps one of the lilypond gurus can help there . I played around with maximum-Y-extent and minimum-Y-extent, but only managed to get more space, not less though. you should have something like this lyrics: {context a { attached to melody }} {context c { tweaked to take no space }{ attached to refrain } } {context b { attached to melody }} Am Montag, den 08.10.2007, 14:51 -0700 schrieb Ted Walther: Thanks Rene. I was hoping for something free-floating; for instance, if I have 3 verses, and in the refrain there are two vocal parts, I'd like it to look like this, but without the gap: notes: {context melody ..}{context refrain ...} lyrics: {context a { attached to melody }} {context ? { attached to refrain } } {context b { attached to melody }} {context ? { attached to refrain } } {context c { attached to melody }} Your technique does work very nicely for attaching the refrain separately. How about when there are an even number of verses? lyrics: {context a { attached to melody }} {context ? { attached to refrain } } {context b { attached to melody }} Ted On Mon, Oct 08, 2007 at 02:02:32PM +0200, Ren? Brandenburger wrote: >Hi Ted, > >i had a look at our file, in line 97, you create a new Lyrics context to >take the refrain, if you change it to > >\lyricsto "refrain" \context Lyrics = b { > >as you want the refrain to show up in the same line as the words of the >second stanza. > >what you actually get is the following: > > > >notes: {context melody ..}{context refrain ...} >lyrics: {context a { attached to melody }} >{context b { attached to melody }{ attached to refrain } } >{context c { attached to melody }} > > > >hope this helps > >best regard > >rene > > >Am Montag, den 08.10.2007, 03:27 -0700 schrieb Ted Walther: >> Rene, thanks for the suggestion. You've really done a tremendous job >> with Allouette. It looked like it should work, and it almost did work. >> Here is the lilypond file, and the resulting PDF: >> >> http://hymns.reactor-core.org/lilypond/refrain2.ly >> http://hymns.reactor-core.org/lilypond/refrain2.pdf >> >> Did I make some mistake? >> >> Ted >> >> On Sun, Oct 07, 2007 at 05:31:43PM +0200, Ren? Brandenburger wrote: >> >Hi, >> > >> >perhaps the attached snippets helps, it's the way i managed to get >> >something similiar working, it spits out a few warnings, but the result >> >looks ok for me. >> >(see attached pdf) >> > >> >regards >> > >> >rene brandenburger >> > > -- There's a party in your skull. And you're invited! Name:Ted Walther Phone: 778-320-0644 Email: [EMAIL PROTECTED] Skype: tederific Address: 3422 Euclid Ave, Vancouver, BC V5R4G4 (Canada) ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: is it possible to glue two staff's together? (hymn solution)
Hi Ted, there you could try to create an own context c inbetween context a and b and try to get it take up no space between the two other context, but I'm not sure about the property to tweak there, perhaps one of the lilypond gurus can help there . I played around with maximum-Y-extent and minimum-Y-extent, but only managed to get more space, not less though. you should have something like this lyrics: {context a { attached to melody }} {context c { tweaked to take no space }{ attached to refrain } } {context b { attached to melody }} Am Montag, den 08.10.2007, 14:51 -0700 schrieb Ted Walther: > Thanks Rene. I was hoping for something free-floating; for instance, if > I have 3 verses, and in the refrain there are two vocal parts, I'd like > it to look like this, but without the gap: > > notes: {context melody ..}{context refrain ...} > lyrics: {context a { attached to melody }} > {context ? { attached to refrain } } > {context b { attached to melody }} > {context ? { attached to refrain } } > {context c { attached to melody }} > > Your technique does work very nicely for attaching the refrain > separately. How about when there are an even number of verses? > > lyrics: {context a { attached to melody }} > {context ? { attached to refrain } } > {context b { attached to melody }} > > Ted > > On Mon, Oct 08, 2007 at 02:02:32PM +0200, Ren? Brandenburger wrote: > >Hi Ted, > > > >i had a look at our file, in line 97, you create a new Lyrics context to > >take the refrain, if you change it to > > > >\lyricsto "refrain" \context Lyrics = b { > > > >as you want the refrain to show up in the same line as the words of the > >second stanza. > > > >what you actually get is the following: > > > > > > > >notes: {context melody ..}{context refrain ...} > >lyrics: {context a { attached to melody }} > >{context b { attached to melody }{ attached to refrain } } > >{context c { attached to melody }} > > > > > > > >hope this helps > > > >best regard > > > >rene > > > > > >Am Montag, den 08.10.2007, 03:27 -0700 schrieb Ted Walther: > >> Rene, thanks for the suggestion. You've really done a tremendous job > >> with Allouette. It looked like it should work, and it almost did work. > >> Here is the lilypond file, and the resulting PDF: > >> > >> http://hymns.reactor-core.org/lilypond/refrain2.ly > >> http://hymns.reactor-core.org/lilypond/refrain2.pdf > >> > >> Did I make some mistake? > >> > >> Ted > >> > >> On Sun, Oct 07, 2007 at 05:31:43PM +0200, Ren? Brandenburger wrote: > >> >Hi, > >> > > >> >perhaps the attached snippets helps, it's the way i managed to get > >> >something similiar working, it spits out a few warnings, but the result > >> >looks ok for me. > >> >(see attached pdf) > >> > > >> >regards > >> > > >> >rene brandenburger > >> > > > > ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: is it possible to glue two staff's together? (hymn solution)
Hi Ted, i had a look at our file, in line 97, you create a new Lyrics context to take the refrain, if you change it to \lyricsto "refrain" \context Lyrics = b { as you want the refrain to show up in the same line as the words of the second stanza. what you actually get is the following: notes: {context melody ..}{context refrain ...} lyrics: {context a { attached to melody }} {context b { attached to melody }{ attached to refrain } } {context c { attached to melody }} hope this helps best regard rene Am Montag, den 08.10.2007, 03:27 -0700 schrieb Ted Walther: > Rene, thanks for the suggestion. You've really done a tremendous job > with Allouette. It looked like it should work, and it almost did work. > Here is the lilypond file, and the resulting PDF: > > http://hymns.reactor-core.org/lilypond/refrain2.ly > http://hymns.reactor-core.org/lilypond/refrain2.pdf > > Did I make some mistake? > > Ted > > On Sun, Oct 07, 2007 at 05:31:43PM +0200, Ren? Brandenburger wrote: > >Hi, > > > >perhaps the attached snippets helps, it's the way i managed to get > >something similiar working, it spits out a few warnings, but the result > >looks ok for me. > >(see attached pdf) > > > >regards > > > >rene brandenburger > > ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: is it possible to glue two staff's together? (hymn solution)
Wilbert, thanks for the suggestion. I tried that just now, and it doesn't work very well. Here is an example PDF: http://hymns.reactor-core.org/lilypond/refrain1.pdf The result is, on the first line, the gap does get closed. But when it gets down to the line where the refrain is, sharing the line with the main portion, there is an ugly gap between lines 2 and 3. Also, for doing hymn refrains, often there will be a second, and sometimes even a third or fourth part, where it goes all four-part harmony on you, with the bass, alto, tenor, and soprano singing the same part at different rhythms. For the main part of the verse, the soprano takes the melody, but in the refrain there is much more variety. It would be nice to be able to do the main part and the refrain on different staves, but to "paste" them together so they seem like a seamless whole. I suppose if the gap thing was fixed, I could make do. But I'd like to avoid typing in a whole bunch of _ for every refrain. Ted On Fri, Oct 05, 2007 at 08:37:30AM +0200, Wilbert Berendsen wrote: Op donderdag 4 oktober 2007, schreef Ted Walther: In hymn typesetting, the refrain is nicely centered between the bass and treble clefs. If it were possible to "glue" two staffs together, end to end, that would solve the problem. I could attach the refrain lyrics to the second staff, and put the verses of the hymn into the first staff. Maybe the new spacing techniques in 2.11 could allow for lyrics to be centered between staffs? e.g: have 5 Lyrics contexts: verse 1 verse 2 refrain verse 3 verse 4 and have verse 2 and 3 just close to each other because there is are only skips in the refrain lyrics. I didn't try. when there is an odd number of verses, the refrain lyrics could be added to the middle verse. with best regards, Wilbert Berendsen -- http://www.wilbertberendsen.nl/ "You must be the change you wish to see in the world." -- Mahatma Gandi ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user -- There's a party in your skull. And you're invited! Name:Ted Walther Phone: 778-320-0644 Email: [EMAIL PROTECTED] Skype: tederific Address: 3422 Euclid Ave, Vancouver, BC V5R4G4 (Canada) ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: is it possible to glue two staff's together? (hymn solution)
Op donderdag 4 oktober 2007, schreef Ted Walther: > In hymn typesetting, the refrain is nicely centered between the bass and > treble clefs. > > If it were possible to "glue" two staffs together, end to end, that > would solve the problem. I could attach the refrain lyrics to the > second staff, and put the verses of the hymn into the first staff. Maybe the new spacing techniques in 2.11 could allow for lyrics to be centered between staffs? e.g: have 5 Lyrics contexts: verse 1 verse 2 refrain verse 3 verse 4 and have verse 2 and 3 just close to each other because there is are only skips in the refrain lyrics. I didn't try. when there is an odd number of verses, the refrain lyrics could be added to the middle verse. with best regards, Wilbert Berendsen -- http://www.wilbertberendsen.nl/ "You must be the change you wish to see in the world." -- Mahatma Gandi ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
is it possible to glue two staff's together? (hymn solution)
For the longest time, there has been a problem in Lilypond that affects the typesetting of hymns. In a hymn, there will be all the verses. And then quite often there is a "refrain". In hymn typesetting, the refrain is nicely centered between the bass and treble clefs. If it were possible to "glue" two staffs together, end to end, that would solve the problem. I could attach the refrain lyrics to the second staff, and put the verses of the hymn into the first staff. So, is this already possible somehow? The only alternative right now, which is icky, is to make the refrain start on a new line, all the time. This is wasteful of space. Ted -- There's a party in your skull. And you're invited! Name:Ted Walther Phone: 778-320-0644 Email: [EMAIL PROTECTED] Skype: tederific Address: 3422 Euclid Ave, Vancouver, BC V5R4G4 (Canada) ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user