5

I'm trying to reproduce a scanned score with Lilypond. The original (the part of interest, at least), looks like this :

As you can see, there is a crescendo starting at the beginning of the 3rd bar, and ending at the end of the 4th bar.

My Lilypond code is the following (I put the crescendo in the upper staff) :

%%%%%%%%%%
%% VERSION
%%%%%%%%%%

\version "2.20.0.3"


%%%%%%%%%%%
%% PIANO UP
%%%%%%%%%%%

pianoUpper = \relative c' {
    \clef "treble"
    \time 3/4
    \key c \major

    f4-. \p a-. c-. |
    e,-. g-. c-. |
    a( \< b c) |
    <b d>2.\fermata \! \bar "||"

    \time 6/8

    <e, g>8.( \p <f a>16 <e g>8 <c e>4.) | 
}


%%%%%%%%%%%%
%% PIANO LOW
%%%%%%%%%%%%

pianoLower = \relative c {
    \clef "bass"
    \time 3/4
    \key c \major

    <f a c>2. |
    <g c> |
    <d a' c> |
    <g b>\fermata \bar "||" 

    \time 6/8

    <c, e g>4 <c e g>8 <c e g>4. |
}


%%%%%%%%
%% SCORE
%%%%%%%%

\score {
    <<
        \new PianoStaff <<
            \new Staff = "upper" \pianoUpper
            \new Staff = "lower" \pianoLower
        >>
    >>
}

And it produces the following result :

enter image description here

Which is upsetting, because I would very much like the crescendo to finish just after the accord of the 4th bar. I have tried placing the \! at different places, with no satisfying result.

Has someone an idea of how I can have the crescendo ending at the end of bar 4, like on my original scanned score?

4

The hairpin that ends on the first beat of a measure stops at the bar line. To change this, override the property to-barline to false.

...

f4-. \p a-. c-. |
e,-. g-. c-. |
\once \override Hairpin.to-barline = ##f
a( \< b c) |
<b d>2.\fermata \! \bar "||"

...

See here: http://lsr.di.unimi.it/LSR/Item?id=595

If you want the hairpin to go further than that, use a scaled duration and spacer rests to trick the hairpin to end at an invisible note at the third beat of the measure.

...

f4-. \p a-. c-. |
e,-. g-. c-. |
\once \override Hairpin.to-barline = ##f
a( \< b c) |
<b d>2.*1/3 \fermata s4 s \! \bar "||"

...

See here about scaling durations: http://lilypond.org/doc/v2.20/Documentation/notation/writing-rhythms#scaling-durations

| improve this answer | |
  • 1
    You could also let the hairpin end on a void chord using <>\!. This way, you don’t have to insert spacer rests. – Jasper Habicht Apr 19 at 7:13
  • @JasperHabicht how so? I am very new at Lilypond, so I tried finding the corresponding documentation, but no such luck. And between your suggestion and TiagoPC's solution, which one is actually better / more recommended / better practice? – JambonSama Apr 19 at 12:03
  • 1
    @JambonSama I added my comment as new answer. Actually, there is no “best“ answer to your approach. I would perhaps not necessarily scale durations because I think this is a quite hacky solution and may have some negative effects on the placement of the notes, but I guess the solution with overriding the hairpin’s to-barline property is actually one of the intended ways to solve your problem. – Jasper Habicht Apr 19 at 17:30
4

You can input an empty chord with <> and let the hairpin end on it. This way, you don’t need to input an \override or scale the duration.

\new Voice {
  \time 3/4
  \relative c' { a'4(\< b c) | <b d>2.\fermata <>\! \bar "||" }
}

The above code should render as:

enter image description here

| improve this answer | |
  • This is actually a better solution. I didn't know that. I'll add it to my repertoire. – TiagoPC Apr 21 at 7:22
  • 1
    I don’t remember where I learned this trick and could not find it in the documentation. But it is especially helpful when you deal with multiple voices. I think it works for spanners in general. – Jasper Habicht Apr 21 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.