lilypond-devel
[Top][All Lists]
Advanced

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

Re: music function semantics


From: Reinhold Kainhofer
Subject: Re: music function semantics
Date: Sat, 30 Jul 2011 19:15:04 +0200
User-agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; i686; ; )

Am Samstag, 30. Juli 2011, 18:18:49 schrieb Carl Sorensen:
> On 7/30/11 9:33 AM, "Jan Warchoł" <address@hidden> wrote:
> > I see...
> > The more i think about it, the more i feel it would be good to merge
> > \set, \override and \tweak into one thingy.  Doing so would make music
> > functions like above one quite simpler.
> 
> While I could see that perhaps we could combine \set and \override, we
> cannot combine \tweak.
> 
> \override and \set modify everything at the current moment.

Exactly. While \override changes the value of a grob property, \set changes a 
context property. However, the syntax is sufficiently different (\override 
needs a [Context.]grob and a property, \set only a [Context.]property) to 
distinguish them even if we use the same command name.
(To be honest, I think David's very first lilypond proposal of merging them to 
one single command was not so bad after all...)
The largest different is that \revert and \unset work completely different.

> \tweak modifies only a single grob.

Yes, and it is meant to be used in places where you can't use \override or 
\set. 
Or put differently, \set and \override change the global defaults before 
things are created, while \tweaks works on one particular graphical object 
that was already created.

> The distinction between \override and \tweak needs to stay because it is a
> semantic distinction.

Yes, I fully agree with all your points.

Cheers,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org



reply via email to

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