lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange behaviour (bug?) with multiple overlapping


From: David Kastrup
Subject: Re: Strange behaviour (bug?) with multiple overlapping
Date: Mon, 10 Jun 2013 20:23:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

"Jan Rosseel" <address@hidden> writes:

>> From: David Kastrup <address@hidden> "Jan Rosseel" <address@hidden> writes:
>>
>> Thanks David, 
>>
>>> > The code below results in having four stacked dynamic texts under the 
>>> > third note. Maybe not exactly what is expected (I'd expect Lilypond to 
>>> > detect the overlapping dynamics), but I can live with that.
>>
>>> The overlapping dynamics would be detected if they were in the same voice.
>>
>>> You are getting a new implicit Voice started for each skip parallelly
>>> in a Staff, while the override is established in an existing voice which
>>> is then continued to be used.
>>
>> That's the thing that surprised me. I was under the assumption that
>> << without the \\ was not starting implicit voices.

It doesn't.  The implicit voices are started _within_ the << >> as you
are still in Staff context when inside of the << >>.

>> Surrounding the << >> construct inside a \new Voice { } fixed the main
>> issue. Only one dynamic left (instead of three or four) and the
>> fingerings no longer overlapped the bow marks. And it is predictable
>> which one of the dynamic texts will actually be printed (the first
>> one...). Cool. But: there's a new (small) problem. 
>>
>> The \new Voice {} neatly pushes everything inside one voice. This of
>> course means I can no longer have a global \override DynamicText
>> #'color = #red/green/blue in the different edit tracks.

What do you mean with "no longer"?  \override DynamicText only applies
to a single Voice.

>> So I switched to \once\override.

Huh?  That does not apply in a manner differing from plain \override.

>> And that shows another interesting effect.
>>
>> Try the following:
>>
>> \version "2.16.1"
>>
>> melody = \relative c'' {
>>   \time 4.4
>> c4 d e\p f }
>>
>> editOne = { s4 s4 \once\override DynamicText #'color = #blue s4\mp s4 }
>>
>> editTwo = { s4\upbow s4\downbow \once\override DynamicText #'color =
>> #green s4\mf s4 }
>>
>> editThree = { \override Fingering #'color = #red s4-1  s4-2
>> \once\override DynamicText #'color = #red s4\f s4 }
>>
>> \score {
>>   <<
>>     \new Staff { 
>>       \new Voice {
>>         <<
>>           \editThree
>>           \editTwo
>>           \editOne
>>           \melody 
>>         >>
>>       }
>>     }
>>   >>
>> }
>>
>> The \f of the editThree music construct "wins". However, the dynamic
>> mark is not red, but blue. So while Lilypond takes the \f construct
>> from editThree, it takes the color override from editOne.

You are apparently unaware of what \override (or \once \override) does.
It sets a template in the current context from which all graphical
elements of the named type are created.  \once\override just differs in
that it reverts to the previous setting after the current timestep.

But at any timestep, only one \override can be active in a given
context.  So what you want to be working with in order to be able to
have independent "edits" on the same kind of graphical element all
within the same Voice/context at the same point of time is \tweak rather
than \override.

\tweak applies only to one element.  Its information travels through the
tweaked music event rather than through properties of a context, so you
can have different settings at the same point of time.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]