[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Repeats in \parallelMusic
From: |
Jacques Menu |
Subject: |
Re: Repeats in \parallelMusic |
Date: |
Wed, 26 Aug 2015 17:12:07 +0200 |
Hello David,
Wouldn’t all that be much simpler without \parallelMusic, with just one
variable per staff contents?
JM
> Le 26 août 2015 à 16:02, David Sumbler <address@hidden> a écrit :
>
> On Wed, 2015-08-26 at 14:10 +0200, David Kastrup wrote:
>> David Sumbler <address@hidden> writes:
>>
>>> is it
>>> possible to have repeats starting and ending within a bar when using
>>> \parallelMusic?
>>>
>>> \version "2.18.0"
>>>
>>> \parallelMusic #'(Vone Vtwo) {
>>> %bar 1
>>> \repeat volta 2 {
>>> d''2 d'' |
>>> f'2 f' |
>>> %bar 2
>>> c''2 c'' |
>>> e'2 e' |
>>> }
>>> %bar 3
>>> g''1 |
>>> c''1 |
>>> }
>>>
>>> \score { <<
>>> \new Staff { \Vone }
>>> \new Staff { \Vtwo }
>>>>> }
>>>
>>> That, of course, works fine.
>>>
>>> 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"
>
> \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.
>
> David
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user