lilypond-devel
[Top][All Lists]
Advanced

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

Re: Reverting Beat Grouping Commands


From: Trevor Daniels
Subject: Re: Reverting Beat Grouping Commands
Date: Tue, 14 Apr 2009 09:07:41 +0100

Mats

I guess this was addressed to Carl, as that's
exactly what I said.

Trevor

----- Original Message ----- From: "Mats Bengtsson" <address@hidden>
To: "Trevor Daniels" <address@hidden>
Cc: "Carl D. Sorensen" <address@hidden>; "Lily-Devel List" <address@hidden>
Sent: Tuesday, April 14, 2009 8:39 AM
Subject: Re: Reverting Beat Grouping Commands


Have you forgot about the most basic difference between a context property and a grob property? All grob property are connected to a specific graphical object, so the syntax is
\override Object #'propertyname = ...
In this case, there is no graphical object involved, right? Therefore, it's naturally a context property, to be set using \set.

   /Mats

Trevor Daniels wrote:

Carl D. Sorensen wrote Monday, April 13, 2009 1:59 PM

On 4/13/09 2:44 AM, "Trevor Daniels" <address@hidden> wrote:

Should this not be \set rather than \override, as
this is a context property?

According to LM 5.3.5, autoBeamSetting would not be a context property, because it doesn't change over time. (I think the definition of context property and grob property here is a bit confusing, and perhaps wrong).

It seems misleading, certainly.  Context properties can
change with time, but they don't have to and many do not.
The essential difference is that Context properties do not
have an associated grob.

Also, according to LM 5.3.5, the main difference between \set and \override is that \override *adds* a new value to the front of the alist, while \set *replaces* the value with the one being set. Therefore, an \override can be \reverted, but a \set cannot. To me, changes to properties that affect the layout of music should always be revertable. That's why I chose \override
rather than \set.

As I understand it:

Context properties are \set and \unset and have
camelCase names without hyphens.  No grob is
involved, so no grob name is taken by \set and
\unset - just the Context name.  They have only
one value and previously set values cannot be
recovered.

Grob properties are \override-n and \revert-ed and
have hyphenated names with no capitals.  The
\override and \revert commands must always have a
grob specified, since the property is attached to
a specific type of grob.  \revert recovers the
previous value.

The existing auto-beaming rules are context
properties, but have a special function defined
for setting them due to the complex argument list
and the need (as you say) to modify a list rather
than replacing it.

You're right that \set won't add to a list, but I
don't think \override will work either, as there
is no associated grob, unless I've misunderstood
something.  Maybe a new type of grob, a bit like
NoteCollision, needs to be defined to hold the
list?  But I'm getting out of my depth here.

 \set #'autoBeamSetting #'(lengths 7 8) =
  \makeAutoBeamSetting '(* . ( 1 3 3 ))

I originally thought about this syntax, but elected not to use it because it would be difficult to capture the default behavior of 2 2, which is to break
beams at the 1/4 note positions.

\override #'autoBeamSetting #'(end 2 2) =
 \makeAutoBeamSetting '(* . ((1 . 4) (2 . 4) (3 . 4) (4 . 4))

I didn't think of this particular example, but came
to the same conclusion.

I suppose it would be possible to write

\override #'autoBeamSetting #'(end 2 2) =
 \makeAutoBeamSetting '(* . ( 0.5 0.5 0.5 0.5))

using the grouping notation.

No, I think using decimal fractions is quite wrong,
and goes against everything else that Lily does with
moments.  You'll have problems with rounding, and in
compound times you'll need to specify thirds.

Trevor


_______________________________________________
lilypond-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-devel

--
=============================================
Mats Bengtsson
Signal Processing
School of Electrical Engineering
Royal Institute of Technology (KTH)
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 Fax:   (+46) 8 790 7260
Email: address@hidden
WWW: http://www.s3.kth.se/~mabe
=============================================







reply via email to

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