bug-lilypond
[Top][All Lists]
Advanced

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

Re: Inherency of object properties


From: Nick Busigin
Subject: Re: Inherency of object properties
Date: Fri, 23 Jan 2004 15:13:24 -0500 (EST)

On Fri, 23 Jan 2004, Mats Bengtsson wrote:

> There's one intricate feature of LilyPond that occasionally
> causes trouble (I've seen questions related to it once or twice
> a month) and that I find difficult to explain.
> 
> For example, why does the first setting of style work but not
> the second one in the following example:
> 
> \score{\notes\relative c'{
> \property Staff.NoteHead \override #'style = #'slash
> c d e f
> %\once \property Voice.NoteHead \override #'transparent = ##t
> c d e f
> \property Staff.NoteHead \override #'style = #'cross
> c d e f
> }}

Thanks for the example Mats and also for the following:

> Finally, it's even more impossible to circumvent for a user
> that uses predefined identifiers such as \hideNotes.

That hint prompted me to go looking for the file where the macros are
defined to see what I need to do to fix the problem in my lily source
file. 

Having the predefined macros is a great idea, but perhaps there should
be a section in the manual that warns people that they should check the
macro definitions to be sure that other tweaks they implement do not
cause unwanted side-effects when used with predefined macros.  Perhaps
some examples like the one you show above or the one I encountered could
be used to illustrate the potential problem of using the predefined
macros. 

> However, it's much harder to explain it to a non-programmer.
> Also, this is an example of a hidden (and un-documented)
> side-effect that's considered no-no in most methods for
> structured programming.
>
> I consider this "feature" a bug.
> 
> It's great to have the possibility to specify the granularity
> of a property setting, letting it apply to the full score or just
> a single thread, but then this should work in the full piece, not
> just at the beginning of the piece.

Agreed - it can be a feature if it's documented, a bug otherwise. 

One other idea:  perhaps the names of the macros should reflect the
scope at which they operate.  So, hideNotes would become VoiceHideNotes. 

It would also be nice if you could surround the block or expression that
you want the macro to operate on by braces and limit its scope to just
that block or expression.  Anything to make the behavior and scope more
explicitly predictable and visible would be a good thing.

                               Nick

==============------- www.SongBirdofSwing.com -------==================
Nick Busigin                                             address@hidden
            Visit Our Indie Jazz CD Construction Project!

==============------- www.SongBirdofSwing.com -------==================






reply via email to

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