lilypond-user
[Top][All Lists]
Advanced

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

Re: \set vs \override


From: Ian Hulin
Subject: Re: \set vs \override
Date: Mon, 23 Nov 2009 17:48:50 +0000
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Hi David,
David Kastrup wrote:
Han-Wen Nienhuys <address@hidden> writes:

On Mon, Nov 23, 2009 at 3:56 AM, David Kastrup <address@hidden> wrote:

Right now I don't have the necessary clue level.  Merely a gut hunch.
Why dont you invest some time to find out how it really works,

What do you think I am doing?  Reading documentation, getting nowhere,
reading code, getting nowhere, asking on the list, getting pointed do
documentation, getting nowhere...

Seems like I need to find a capable investment banker for my time.  My
own choices of investment don't show promising returns.

and then improve the documentation?  That would help many more people
than just you.

I will not doctor the documentation before I consider myself having a
clue.  And I am nowhere near that yet.

From the bread-crumb trail of your posts on the various lists, it looks like you're exploring a similar set of avenues I was going down earlier this year.

I wanted to add some properties for things at either \book block level or the implicit \book level (i.e. a file where a \score or \relative has no enclosing \book block). I notice you have just posted some questions re top-level on one of the other lists.

I was nearly able to add some score-level contexts for what I wanted to do but as my properties related to the output file-names for generating the back-end files it was felt contexts were not appropriate for the job.

I had a look at the context*.cc /.hh files and it looked like this was the distinction
\set simply assigns a value to the property
\unset - clear any value previous value given to this property by a prior \set. \override - set the property to the new value and push the old value onto an internal stack \revert - pop any previously saved value from the internal stack and assign it to the property

If there are bells and whistles depending on whether its a grob or a music translation property being manipulated, maybe do something like

property-statement :==
 '\' property-verb property-keyword property-set-or-unset-clause

property-verb :== 'set' | 'unset' | 'override' | 'revert'
propert-keyword :== 'grob' | 'music' (maybe choose better keywords)
property-set-or-unset-clause :==
   property-specifier | property-specifier '=' property-value
so you'd get something like
\set music Autobeaming = #t or \set music Voice.Autobeaming = #t
\set music Staff.ADueText = \markup { \italic "à 2"}
\override grob Stem #'(details beamed-lengths) = #'(4 4 3)
\revert grob Stem #'(details beamed-lengths)

Anyhow, at this point by brain began to overheat with trying to juggle too many new concepts at once and I decided to go for the simple approach and do what I wanted using functions.

It looks like you're made of sterner stuff than me, so if you do keep at it and get a handle on the concepts, let us know what you've worked out on the Frogs list, please, so we can get all these bells and whistles recorded in the documentation.

Cheers,
Ian Hulin
(a Frog - still swimming in the shallow end of the Lilypond)







reply via email to

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