Hello,
I am using centered dynamics for some scores (id=357). Now I need to use
a text for a dynamic change spread over several measures. I found an
appropriate snippet in LSR (id=456).
But I failed to combine both snippets. The hairpin is not replaced by
the text. What's going wrong here?
I attach a minimal example that can be compiled directly.
Regards,
Helge
#(ly:set-option 'delete-intermediate-files #t)
#(ly:set-option 'point-and-click #f)
\version "2.13.0"
voiceOne = \relative c' {
\clef treble \time 3/4
g4 g g | g g g | g g g
}
voiceTwo = \relative c {
\clef bass \time 3/4
f4 f f | f f f | f f f
}
dynamicsOne = {
\set Voice.crescendoText = \markup { \italic { poco a poco di - mi - nu - en - do - - - - } }
\set Voice.crescendoSpanner = #'text
\override DynamicTextSpanner #'style = #'dotted-line
s2.\> s2. s2 s8\!
}
\book {
\score {
<<
\new StaffGroup
<<
\new Staff \voiceOne
\new Dynamics = "Dynamics" \dynamicsOne
\new Staff \voiceTwo
>>
>>
\layout {
% define dynamics context like http://lsr.dsi.unimi.it/LSR/Item?id=357
% to re-use it, put it in file to #include
\include "dynamicsContext.ly"
\context {
\StaffGroup
\accepts Dynamics
}
}
}
%% LSI snippet: http://lsr.dsi.unimi.it/LSR/Item?id=456
\score {
\relative c'' {
\set crescendoText = \markup { \italic { cresc. poco } }
\set crescendoSpanner = #'text
\override DynamicTextSpanner #'style = #'dotted-line
a2\< a
a2 a
a2 a
a2 a\mf
}
}
}
% define Dynamics context
%dynamicsContext =
\context
{
\type "Engraver_group"
\name Dynamics
\alias Voice
\consists "Output_property_engraver"
\consists "Piano_pedal_engraver"
\consists "Script_engraver"
\consists "New_dynamic_engraver"
\consists "Dynamic_align_engraver"
\consists "Text_engraver"
\consists "Skip_event_swallow_translator"
\consists "Axis_group_engraver"
pedalSustainStrings = #'("Ped." "*Ped." "*")
pedalUnaCordaStrings = #'("una corda" "" "tre corde")
\override DynamicLineSpanner #'Y-offset = #0
\override TextScript #'font-size = #2
\override TextScript #'font-shape = #'italic
\override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user