[Top][All Lists]

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

Re: Auto-beam in 2.6

From: Stephen
Subject: Re: Auto-beam in 2.6
Date: Sun, 17 Jul 2005 13:30:38 -0500

First of all, thanks just for talking more about it, this is a subject that
needs a little more hashing over just to get the brain cells stimulated.

I shouldn't really talk; I can't get any revert-auto-beam-setting to compile

which I doubt does anything.

I tried to use it many times and I suspect that 'begin' doesn't do anything.
I noticed that the documentation doesn't give an example of what it does.
This doesn't count:
#(override-auto-beam-setting '(begin * * 6 8) ...)

because it only shows how to get it past the parser, not how it affects the
output. Has anyone used it?

NOTE: this has been stuck in my outbox for nearly two weeks.


----- Original Message ----- From: "Joe Neeman" <address@hidden>
To: "Lilypond Devel" <address@hidden>
Sent: Monday, July 04, 2005 9:15 AM
Subject: Re: Auto-beam in 2.6

Stephen wrote:

I believe revert- works like every other revert and only reverts a
previous override, restoring the default, not reverting the default
itself. After all, revert means to go back to a previous state, not to
establish a state.

I think the confusing thing here (for me at least) was that, in some
cases, revert-* appears to the user to change the settings in a way that
wasn't overridden. For example, if I have
#(revert-auto-beam-setting '(end 1 16 4 4) 1 8)
a16 a a a

Then the revert-auto-beam-setting is changing the behaviour /without me
having initially overridden it/. Of course, it was initially overridden
in auto-beam.scm but that isn't obvious to the user.

The other thing that I found confusing is the use of wildcards. For
#(override-auto-beam-setting '(end * * * *) 1 8)
#(revert-auto-beam-setting '(end 1 16 4 4) 1 8)
doesn't work as I would have expected it.

Anyway, I wrote this thing up yesterday. I think it explains changing
the auto-beam behaviour better than the current page does. You'll notice
that I skip over any description of beam beginnings. That's because I
don't understand it yet :P

Anyway, let me know what you think.


In normal time signatures, automatic beams can start on any note but
can only end in a few positions within the measure: beams can end on a
or at durations specified by the properties in autoBeamSettings.
The properties in autoBeamSettings consist of a list of rules for where
can begin and end.
The default autoBeamSettings rules are defined in scm/auto-beam.scm.

In order to add a rule to the list, use
#(override-auto-beam-setting '(be p q n m) a b [context])

- be is either "begin" or "end"
- p/q is the duration of the note for which you want to add a rule. A
beam is
  considered to have the duration of its shortest note. Set p and q to
'*' to
  have this apply to any beam.
- n/m is the position in the time signature to which this rule should
  Set n and m to '*' to have this apply in any time signature.
- a/b is the position in the bar at which the beam should end.
- context is optional, and it specifies the context at which the change
  should be made. The default is 'Voice.
  #(score-override-auto-beam-setting '(A B C D) E F) is equivalent to
  #(override-auto-beam-setting '(A B C D) E F 'Score).

For example, if automatic beams should always end on the first quarter
#(override-auto-beam-setting '(end * * * *) 1 4)

You can force the beam settings to only take effect on beams whose
note is a certain duration:

\time 2/4
#(override-auto-beam-setting '(end 1 16 * *) 1 16)
a16 a a a a a a a |
a32 a a a a16 a a a a a |
#(override-auto-beam-setting '(end 1 32 * *) 1 16)
a32 a a a a16 a a a a a |

You can force the beam settings to only take effect in certain time

\time 5/8
#(override-auto-beam-setting '(end * * 5 8) 2 8)
c8 c d d d
\time 4/4
e8 e f f e e d d
\time 5/8
c8 c d d d

You can also remove a previously set beam-ending rule by using
#(revert-auto-beam-setting '(be p q n m) a b [context])

be, p, q, n, m, a, b and context are the same as above. Note that the
rules are specified in scm/auto-beam.scm so you can revert rules that you
didn't explicitly create.

\time 4/4
a16 a a a a a a a a a a a a a a a
#(revert-auto-beam-setting '(end 1 16 4 4) 1 4)
a16 a a a a a a a a a a a a a a a

The rule in a revert-auto-beam-setting statement must exactly match the
original rule.
That is, no wildcard expansion is taken into account.

\time 1/4
#(override-auto-beam-setting '(end 1 16 1 4) 1 8)
a16 a a a
#(revert-auto-beam-setting '(end 1 16 * *) 1 8) % this won't revert it!
a a a a
#(revert-auto-beam-setting '(end 1 16 1 4) 1 8) % this will
a a a a

You can turn off automatic beaming altogether with \autoBeamOff.

lilypond-devel mailing list

reply via email to

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