lilypond-devel
[Top][All Lists]
Advanced

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

Re: Naming _another_ lacking puzzle piece


From: David Kastrup
Subject: Re: Naming _another_ lacking puzzle piece
Date: Sat, 13 Oct 2012 12:25:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

"Trevor Daniels" <address@hidden> writes:

> David Kastrup wrote Saturday, October 13, 2012 1:01 AM
>> 
>> In ly/music-functions-init.ly I see code like the following:
>> 
>> crossStaff =
>> #(define-music-function (parser location notes) (ly:music?)
>>  (_i "Create cross-staff stems")
>>  #{
>>  \override Stem #'cross-staff = #cross-staff-connect
>>  \override Flag #'style = #'no-flag
>>  $notes
>>  \revert Stem #'cross-staff
>>  \revert Flag #'style
>> #})
>> 
>> There is a problem with that: in terms of stack operations, \override
>> and \revert are not opposing pairs: \override is pop+push (so that
>> multiple overrides in a row don't accrue cruft), \revert is pop.  So the
>> net effect of this sequence is "pop", while it should be neutral.
>
> What would be the effect of this?  The implication is that something
> goes wrong, but bugs in this area have never been reported, AFAIK.
>
> I understand stacks, pop and push, but I'm clearly missing something 
> here.  Perhaps it's due to my unfamiliarity with the structure of the 
> stack(s). 

Each context has its own stack, so popping too much only makes a
difference if the stack actually was non-empty to start with.

Check out

\new Staff \with { autoBeaming = ##f }
{ \override Flag #'style = #'mensural c8 c \crossStaff c c c c c c }

After the crossStaff, the flag style has reverted to normal again rather
than mensural.

-- 
David Kastrup



reply via email to

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