[Top][All Lists]

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

Re: context hierachy

From: Rune Zedeler
Subject: Re: context hierachy
Date: Thu, 14 Mar 2002 18:17:20 +0100 (MET)
User-agent: IMP/PHP IMAP webmail program 2.2.6

Citat Han-Wen Nienhuys <address@hidden>:

> origin_trans_l
> will give you the path of the translators, i.e. Engraver, Thread,
> Voice, Staff (if this == Staff)

Okay, traverse upwards with daddy_trans_l until I reach the Staff, I see.
My question was more like: How do I know when I reach the staff?  I.e. Will the 
following (untested) code be too slow - testing aliasses on all levels? It has 
to be done for each and every accidental...

while ((!mytranslator.is_alias_b("Staff")) && mytranslator->daddy_trans_l_)
  mycontext = mycontext->daddy_trans_l_;

The good thing about doing so, ofcourse, would be that we could allow for the 
very nice and understandable accidental definitions a'la

\property Score.autoAccidentals = #'((measure-same-octave 0 Voice) (measure-
same-octave 0 Staff))

To typeset the union of the accidenals of the old engraver in voice context and 
the old engraver in staff context.
I think I go for it and hope that it doesn't slow down lilypond too much.


reply via email to

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