lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Solution to have repeats with upbeat and different alternatives??


From: Aaron Hill
Subject: Re: Solution to have repeats with upbeat and different alternatives??
Date: Thu, 17 May 2018 14:09:49 -0700
User-agent: Roundcube Webmail/1.3.6

On 2018-05-17 10:22, address@hidden wrote:
        I posted a piece of simplified code to illustrate. This is what
the default does
isnt 'it??

https://ln.sync.com/dl/2d42a9350/ukfaa7s8-rpenm7ne-xqxv7mpk-x99vbzbw

[ . . . ]

the code below prints an extraneous bar in the second alternative at
the end.

[ . . . ]

****************test.ly ***********

 \version "2.18.2"

music = \relative c''
{
    \time 3/4

    \partial 4 a8 a |
    a4 a a |

    \repeat volta2
    {
      b4 b b | b4 b b |
    }
    \alternative {
    { b4 b b | }
    { c4 c }
    }

    \repeat volta 2
    {
     d8 d | d4 d d |
    }
    \alternative {
    { d4 d }
    { e4 e4 e4 }
    }
}

\score { \music }

Using the snippet you provided and running against 2.19.81, I do not see the barline you are seeing. (See attachment: upbeat-repeat.preview.png)

It would seem that the newer version handles implicit partial measures automatically.

One option is to use \partial explicitly, however LilyPond 2.18.2 warns about this practice. 2.19.81 does not:

%%%%
  \repeat volta 2 { d8 d | d4 d d | }
  \alternative {
    { \partial 2 d4 d }
    { e4 e4 e4 | }
  }
%%%%

You could also simply change time signatures secretly:

%%%%
  \repeat volta 2 { d8 d | d4 d d | }
  \alternative {
    { \omit Score.TimeSignature \time 2/4 d4 d }
    { \time 3/4 e4 e4 e4 | }
  }
  \undo \omit Score.TimeSignature
%%%%

That option seems to work in both 2.18.2 and 2.19.81 without any warnings.

-- Aaron Hill

Attachment: upbeat-repeat.preview.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]