|
From: | Flaming Hakama by Elaine |
Subject: | Re:DynamicLineSpanner.staff-padding in temporary polyphony |
Date: | Wed, 4 Apr 2018 18:41:34 -0700 |
---------- Forwarded message ----------
From: Thomas Morley <address@hidden>
Subject: Re: DynamicLineSpanner.staff-padding in temporary polyphony
2018-04-04 7:30 GMT+02:00 Flaming Hakama by Elaine <address@hidden>:
>
>>
>> I am not top posting
>
>
>
> HI.
>
> Please let me know if you can answer this question.
>
> I am using temporary voices to set horizontal dynamic spacing. Which works
> fine.
> But the side effect is that the dynamics in the second voice don't obey
> DynamicLineSpanner.staff-padding
>
> How can I get the dynamics on the second voice to obey the staff padding?
>
> \version "2.19.15"
>
> \new Staff {
> \override DynamicLineSpanner.staff-padding = #3.0
> \relative c' {
> f1\p
> <<
> \relative c' { f1 } \\
>
> % How do I get this voice to obey the DynamicLineSpanner.staff-padding
> ?
> { s1\p }
> >>
> }
> }
>
>
> (The actual version I'm running is 2.19.81)
>
>
> Thanks,
>
> David Elaine Alt
\version "2.19.81"
% The << \\ >> construct creates two new Voices named "1" and "2".
% The override before is in an unnamed Voices and only working in this Voice.
% I'll demonstrate with colors:
%% Default
{
\override DynamicText.color = #red
f'1\p
<<
f'1
\\
s\p
>>
}
%% Apply to new Voice as well
{
\override DynamicText.color = #red
f'1\p
<<
f'1
\\
{ \override DynamicText.color = #red s\p }
>>
}
%% Initiate \new Voice = "2" and put the override in \with { }
%% Keep it alive
\new Staff <<
\new Voice = "2"
\with { \override DynamicText.color = #red }
s1*2
{
\override DynamicText.color = #red
f'1\p
<<
f'1
\\
s\p
>>
}
>>
%% Use named Voices and apply \voices
\new Voice = "main" {
\override DynamicText.color = #red
f'1\p
\voices 1,main
<<
f'1
\\
s\p
>>
}
%% or manually
\new Voice = "main" {
\override DynamicText.color = #red
f'1\p
<<
f'1
\\
\context Voice = "main" s\p
>>
}
%% Use \layout
\score {
{
f'1\p
<<
f'1
\\
s\p
>>
}
\layout {
%% Using \context { \Voice ... } } is actually not needed here.
%% The override is already in a Bottom-context
\context {
\Voice
\override DynamicText.color = #red
}
}
}
%% Apply the override in Staff-context via \with
\new Staff \with { \override DynamicText.color = #red }
{
f'1\p
<<
f'1
\\
s\p
>>
}
%% Probably easiest
%% Don't use << ... \\ ... >> to avoid creation of new Voices
{
\override DynamicText.color = #red
f'1\p
<<
f'1
s\p
>>
}
HTH,
Harm
[Prev in Thread] | Current Thread | [Next in Thread] |