Re: Crescendo hairpin colliding with repeat bar line
Yoshiaki Onishi <[email protected]>
| Newsgroups | gmane.comp.gnu.lilypond.general |
|---|---|
| Message-ID | <[email protected]> |
Dear Krisztián,
> Can anyone suggest a simple solution that stops the crescendo (and decrescendo) haipins before the repeat bar line and works globally? (I can manually adjust each hairpin, but I hope there is some simpler solution).
I don’t know if there is a global solution in this case (though experienced developers on this forum may have ideas otherwise). My solution is to create a variable with a small but memorable name, and use them as you go. The following is an example that would allow you to type less to adjust the hairpin:
HPleftshort = #(define-scheme-function (x) (number?)
#{
\once \override Hairpin.shorten-pair = #(cons 0 x)
#})
HPleftshortfix = \once \override Hairpin.shorten-pair = #'(0 . 1.2)
PianoRight = \relative c' {
c2\p\< c
\HPleftshort #1.2 c2\mf\< c
\repeat volta 2 { c2\f c }
}
If you find that you have to tweak the amount of shortening in every instance of the hairpin, you can use \HPleftshort #value, but if you find that you can just set the .shorten-pair setting to a fixed value, you can use \HPleftshortfix.
Obviously, you might even come up with even shorter name for the variables.
I hope this helps you continue your work!
Yoshi
-- -- --
Yoshiaki Onishi
https://github.com/yoshiakionishi/lilypond-snippets