[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic marks above lyrics in markup
From: |
Thomas Morley |
Subject: |
Re: Dynamic marks above lyrics in markup |
Date: |
Wed, 5 Aug 2015 23:01:01 +0200 |
2015-08-05 16:03 GMT+02:00 jonathan.scholbach <address@hidden>:
> Thanks, that does work with the dynamic marks \p, \f, \mf etc. But I am still
> wondering how I can add a cresc./decresc. hairpin.
You could use
\italic "cresc"
like
\dynamic f
If you really need the Hairpin here two possibilities;
\version "2.19.24"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Using markup-list-command \score-lines in a scheme-function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dynamicStanzaText =
#(define-scheme-function (txt dyn)(ly:music? ly:music?)
#{
\markuplist
\override-lines #'(baseline-skip . 3)
\column-lines {
\score-lines {
<<
\new Dynamics
\with {
fontSize = #-4
\override DynamicLineSpanner.Y-offset = #-1.5
\override VerticalAxisGroup.staff-affinity = #UP
\override VerticalAxisGroup.nonstaff-nonstaff-spacing =
#'((basic-distance . -2)
(minimum-distance . -2)
(padding . -2)
(stretchability . 0))
}
$dyn
\addlyrics $txt
>>
\layout {
indent = -1
short-indent = -1
ragged-right = ##t
\override Hairpin.to-barline = ##f
\override Lyrics.LyricText.self-alignment-X = #LEFT
\override Lyrics.LyricText.font-size = 0
\override Dynamics.DynamicText.self-alignment-X = #LEFT
}
}
}
#})
stanzaIItext =
\lyricmode {
my text of second stanza,
and it continues on a new line
}
dynamicIISigns = {
c4\f\> c c c c\p
\bar "" \break
c\mf\< c c c c c c\ff
}
\markup
\column {
\fontsize #3 \bold "Other stanzas"
\vspace #1
\bold "Second stanza: "
}
\dynamicStanzaText \stanzaIItext \dynamicIISigns
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Using new defined markup--commands \cresc and \decresc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(define-markup-command (cresc layout props dest)(number?)
#:properties ((thickness 0.1)
(direction 1))
(interpret-markup layout props
#{
\markup
\rotate #(if (not (= 1 direction)) 180 0)
\path
#thickness
#`((moveto ,dest -0.5)
(lineto 0 0)
(lineto ,dest 0.5))
#}))
#(define-markup-command (decresc layout props dest)(number?)
#:properties ((thickness 0.1))
(interpret-markup layout (prepend-alist-chain 'direction -1 props)
#{
\markup \cresc #dest
#}))
\markup
\column {
\vspace #3
\fontsize #3 \bold "Other stanzas"
\vspace #1
\bold "Second stanza: "
\vspace #1
}
\markup
\column {
\override #'(direction . 1) {
\dir-column {
\line { my text of second stanza, }
\line {
\fontsize #-4 \dynamic f \decresc #16.2 \fontsize #-4 \dynamic p
}
}
}
\vspace #1
\override #'(direction . 1) {
\dir-column {
\line { and it continues on a new line }
\line {
\fontsize #-4 \dynamic mf \cresc #24 \fontsize #-4 \dynamic ff
}
}
}
}
HTH,
Harm