[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hairpin direction
From: |
Thomas Morley |
Subject: |
Re: Hairpin direction |
Date: |
Sat, 5 Oct 2013 22:18:13 +0200 |
2013/10/5 Kieren MacMillan <address@hidden>:
> Hi all,
>
> In a piece I'm engraving, the manuscript — which I want to copy (or at least
> *be able* to copy) exactly — has the cello dynamics below the staff
> (expected), but the hairpins above (unexpected).
>
> Is there a simple setting I can apply to have all Hairpins engraved above the
> staff, without affecting the other dynamic items?
> I tried Hairpin.direction, but it didn't do anything.
>
> Thanks,
> Kieren.
Hi Kieran,
I tried the following
\version "2.17.27"
customDynamics =
#(define-music-function (parser location music)(ly:music?)
(music-map
(lambda (m)
(if (music-is-of-type? m 'note-event)
(let ((art (ly:music-property m 'articulations)))
(for-each
(lambda (n)
(cond ((music-is-of-type? n 'absolute-dynamic-event)
(ly:music-set-property! n 'direction -1))
((or (music-is-of-type? n 'decrescendo-event)
(music-is-of-type? n 'crescendo-event))
(ly:music-set-property! n 'direction 1))
(else n)))
art)
m)
m))
music))
\customDynamics
\relative c' {
\mark "Hairpin is shortened by DynamicText"
c1\f\> cis2 d\p\!
\repeat volta 2 {
c1\mf\> cis2 d\mp\!
}
\alternative {
{ c1\pp\< cis2 d\ff\! }
{ c1\ppp\< cis2 d\fff\! }
}
}
\relative c' {
\mark "Default Hairpin, without DynamicText"
\override DynamicLineSpanner #'direction = #UP
c1\> cis2 d\!
\repeat volta 2 {
c1\> cis2 d\!
}
\alternative {
{ c1\< cis2 d\! }
{ c1\< cis2 d\! }
}
}
\layout { \override Score.RehearsalMark.self-alignment-X = #LEFT }
Though, you'll notice that the Hairpins are shortened by the DynamicText.
Til now I've found no way around it.
AFAIK, David is working on a related patch.
Cheers,
Harm
- Hairpin direction, Kieren MacMillan, 2013/10/05
- Re: Hairpin direction,
Thomas Morley <=