Re: Is it right how oneVoice reverts direction settings?

2018-04-11 Thread David Kastrup
Simon Albrecht  writes:

> On 11.04.2018 09:14, David Kastrup wrote:
>> Why would you use a \Voice context if you want to "globally override"?
>> Do it in Score context.
>>
>> Then you'll get no interference from Voice-level reverts.
>
> Astounding subtlety.

Now that's a rare compliment for me to be hearing.

> Thanks very much!  Best, Simon

Hope this helped.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Is it right how oneVoice reverts direction settings?

2018-04-11 Thread Simon Albrecht

On 11.04.2018 09:14, David Kastrup wrote:

Why would you use a \Voice context if you want to "globally override"?
Do it in Score context.

Then you'll get no interference from Voice-level reverts.


Astounding subtlety. Thanks very much!
Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Is it right how oneVoice reverts direction settings?

2018-04-11 Thread Simon Albrecht

On 11.04.2018 00:20, Thomas Morley wrote:

All other
settings are overrides, so probably below may work.
Please be aware it's not tested beyond the given example!


Thanks for that! I might prefer David’s solution, because it doesn’t 
require redefining commands, but it’s good to have that up the sleeve.


Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Is it right how oneVoice reverts direction settings?

2018-04-11 Thread David Kastrup
Simon Albrecht  writes:

> Hello everybody,
>
> suppose I want to globally override the direction of slurs, as far as
> neutral voices go. If I do this:
>
> %%% \version "2.19.80" \layout {   \context {     \Voice
>     \override Slur.direction = #UP   } } music = { c'( d' e' f') } {  
> \music   \voiceTwo   \music   \oneVoice   \music } 

Why would you use a \Voice context if you want to "globally override"?
Do it in Score context.

Then you'll get no interference from Voice-level reverts.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Is it right how oneVoice reverts direction settings?

2018-04-10 Thread Thomas Morley
2018-04-10 22:45 GMT+02:00 Simon Albrecht :
> Hello everybody,
>
> suppose I want to globally override the direction of slurs, as far as
> neutral voices go. If I do this:
>
> %%% \version "2.19.80" \layout {   \context { \Voice
> \override Slur.direction = #UP   } } music = { c'( d' e' f') } {   \music
> \voiceTwo   \music   \oneVoice   \music } 
>
> then in bar 3 the slur will go below the notes, i.e. \oneVoice reverted the
> direction without knowing that an override was in effect.
>
> I’d love to be able to redefine \voiceTwo & Co. such as to imply \temporary,
> but that’s not currently possible:
>
> warning: Cannot make PropertySet revertible.
>
> Does anybody have an idea for another solution?
>
> Best, Simon


\voiceXxx contain
\set Voice.graceSettings = ...

Setting a context-property revertible is not yet possible. All other
settings are overrides, so probably below may work.
Please be aware it's not tested beyond the given example!

foo =
#(define-music-function (mus)(ly:music?)
 (music-map
   (lambda (m)
 (if (music-is-of-type? m 'override-property-event)
 (begin
   (ly:music-set-property! m 'pop-first '())
   m)
 m))
   mus))

myVoiceOne = \foo \voiceOne
myVoiceTwo = \foo \voiceTwo
myVoiceThree = \foo \voiceThree
myVoiceFour = \foo \voiceFour

music = { c'4(-^ d'-1\startTrillSpan e' f'\stopTrillSpan) }


\markup \box \fill-line { "DEFAULT \\voiceXxx" }
{
  \music
  \voiceTwo
  \music
  \oneVoice
  \music
}

\markup \box \fill-line { "Custom \\voiceXxx" }

{
  \music
  \myVoiceTwo
  \music
  \oneVoice
  \music
}


Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Is it right how oneVoice reverts direction settings?

2018-04-10 Thread Simon Albrecht

Hello everybody,

suppose I want to globally override the direction of slurs, as far as 
neutral voices go. If I do this:


%%% \version "2.19.80" \layout {   \context {     \Voice     
\override Slur.direction = #UP   } } music = { c'( d' e' f') } {   
\music   \voiceTwo   \music   \oneVoice   \music } 


then in bar 3 the slur will go below the notes, i.e. \oneVoice reverted 
the direction without knowing that an override was in effect.


I’d love to be able to redefine \voiceTwo & Co. such as to imply 
\temporary, but that’s not currently possible:


warning: Cannot make PropertySet revertible.

Does anybody have an idea for another solution?

Best, Simon


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user