Can't make my crescendo end were I want it to with Lilypond
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 :
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?
2 Comments
Sorted by latest first Latest Oldest Best
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:
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: 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: lilypond.org/doc/v2.20/Documentation/notation/writing-rhythms#scaling-durations
Terms of Use Privacy policy Contact About Cancellation policy © freshhoot.com2025 All Rights reserved.