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 08:18:38 +0100


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




reply via email to

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