[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Repeats in \parallelMusic
From: |
David Sumbler |
Subject: |
Re: Repeats in \parallelMusic |
Date: |
Thu, 27 Aug 2015 14:58:01 +0100 |
Thank you for this reply. Yes, it looks as if things are a lot simpler
in the latest development version of Lilypond. Still, as I do not
actually need repeats starting and ending during a bar for the piece I
am currently setting, I shall defer upgrading (and perhaps wait for
stable version 2.20).
As for Jacques suggestion
> Wouldn’t all that be much simpler without \parallelMusic, with just
> one variable per staff contents?
Yes, it would, but then my reasons for using \parallelMusic (for a
string quartet) are that it has other advantages in the editing, at
least from my point of view.
David
On Wed, 2015-08-26 at 17:12 +0200, David Kastrup wrote:
> David Sumbler <address@hidden> writes:
>
> > On Wed, 2015-08-26 at 14:10 +0200, David Kastrup wrote:
> >> David Sumbler <address@hidden> writes:
>
> >> > But suppose that the repeat should start in the middle of bar 1 and end
> >> > in the middle of bar 2. This is easily done when setting the parts
> >> > separately; but can it be done within a \parallelMusic structure? On
> >> > the face of it, the answer would seem to be "no".
> >> >
> >> > Or is it?
> >>
> >> Any reason you neither try it out nor add any template to demonstrate
> >> on? A user list is primarily a knowledge resource: making use of the
> >> different knowledge and skill levels of the participants for overcoming
> >> hurdles, not for running the whole track.
> >>
> >> It should be easy enough for yourself to modify the example such that
> >> the repeats are on partial measure positions.
> >
> > With respect, I could see no obvious way in which it could be done,
> > which is why I asked. I suppose it was the proverbial "stupid
> > question".
> >
> > Anyway, after trying several more (im)possibilities, I found a method
> > that worked but produced error messages. Then I remembered Stephen
> > MacNeil's helpful suggestion a few months ago regarding incomplete final
> > bars. An example is:
> >
> > \version "2.18.0"
>
> Ugh. It's likely better to return to the method that worked but
> produced error messages. Possibly even to one that didn't.
>
> There has been
>
> Issue 4426: Remove bar checks at the end of \parallelMusic passages
>
> This allows ending \parallelMusic at non-bar boundaries.
>
> in version 2.19.22. There has also been
>
> Issue 3984: Let \parallelMusic cope with \repeat .. \alternative
>
> \parallelMusic's recursive decent only worked for comparatively simple
> cases. It now should be able to deal with complex constructs
> gracefully.
>
> in version 2.19.10 so I am surprised that my example presumably even
> works in 2.18.0.
>
> The contraptions you have been using, in contrast, are fairly noisome.
>
> >
> >
> > \parallelMusic #'(Vone Vtwo) {
> > %bar 1
> > \set Score.measureLength = #(ly:make-moment 3/4) c''2. |
> > \set Score.measureLength = #(ly:make-moment 3/4) e'2. |
> > \repeat volta 2 {
> > \set Score.measureLength = #(ly:make-moment 1/4) d''4 |
> > \set Score.measureLength = #(ly:make-moment 1/4) f'4 |
> > %bar 2
> > \set Score.measureLength = #(ly:make-moment 4/4) e''1 |
> > \set Score.measureLength = #(ly:make-moment 4/4) g'1 |
> > %bar 3
> > d''1 |
> > f'1 |
> > %bar 4
> > \set Score.measureLength = #(ly:make-moment 3/4) c''2. |
> > \set Score.measureLength = #(ly:make-moment 3/4) e'2. |
> > }
> > \set Score.measureLength = #(ly:make-moment 1/4) b'4 |
> > \set Score.measureLength = #(ly:make-moment 1/4) d'4 |
> > %bar 5
> > \set Score.measureLength = #(ly:make-moment 4/4) c''1 |
> > \set Score.measureLength = #(ly:make-moment 4/4) e'1 |
> > }
> >
> > \score {
> > <<
> > \new Staff { \Vone }
> > \new Staff { \Vtwo }
> > >>
> > }
> >
> > Not exactly succinct, but it works. I am sending this to the list (a)
> > so that I can find it again when I actually need it (b) in case somebody
> > knows a neater solution to the problem.
>
> Well, upgrading. Then the following will work just fine:
>
> Lilypond music sheet attachment (sumb.ly)
> \version "2.19.22"
>
> \parallelMusic #'(Vone Vtwo) {
> %bar 1
> { c''2. |
> e'2. | }
> \repeat volta 2 {
> d''4 |
> f'4 |
> %bar 2
> e''1 |
> g'1 |
> %bar 3
> d''1 |
> f'1 |
> %bar 4
> c''2. |
> e'2. |
> }
> b'4 |
> d'4 |
> %bar 5
> c''1 |
> e'1 |
> }
>
> \score {
> \displayLilyMusic
> <<
> \new Staff { \Vone }
> \new Staff { \Vtwo }
> >>
> }
> There is, indeed, a slight complication over the most simple version,
> namely the additional { ... } pair before the \repeat. The reason for
> that is obvious when looking at the output of the \displayLilyMusic:
>
> GNU LilyPond 2.19.26
> Processing `sumb.ly'
> Parsing...
> << \new Staff { { { c''2. } \repeat volta 2 {
> d''4 |
> e''1 |
> d''1 |
> c''2.
> } b'4 |
> c''1 } } \new Staff { { { e'2. } \repeat volta 2 {
> f'4 |
> g'1 |
> f'1 |
> e'2.
> } d'4 |
> e'1 } } >>
>
> One can see that _most_ | events are preserved, but those at the end of
> some music list are removed. This caters fine for the _end_ of the
> repeats but it doesn't help before they start. So while the code
> doesn't special-case this situation as well, one can employ this extra
> brace pair to fix it. Maybe the code _should_ meddle there as well.
>