lilypond-devel
[Top][All Lists]
Advanced

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

Re: Auto-beam in 2.6


From: Mats Bengtsson
Subject: Re: Auto-beam in 2.6
Date: Mon, 18 Jul 2005 21:22:05 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050319

Did you read
http://lists.gnu.org/archive/html/lilypond-devel/2005-07/msg00015.html
The explanations provided there have also been included in the latest
version of the manual.

   /Mats

Stephen wrote:
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
except:
#revert-auto-beam-setting

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.

Stephen

----- 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
example,
#(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
beat,
or at durations specified by the properties in autoBeamSettings.
The properties in autoBeamSettings consist of a list of rules for where
beams
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
apply.
  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
node,
use
#(override-auto-beam-setting '(end * * * *) 1 4)

You can force the beam settings to only take effect on beams whose
shortest
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
signatures:

\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
default
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
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-devel




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

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        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]