lilypond-user
[Top][All Lists]
Advanced

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

Re: Help for \beamExceptions


From: Simon Albrecht
Subject: Re: Help for \beamExceptions
Date: Wed, 2 Sep 2015 21:47:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

Am 02.09.2015 um 21:35 schrieb Richard Shann:
On Wed, 2015-09-02 at 20:13 +0200, David Kastrup wrote:
And there is a comment somewhere about using | to separate
something,
I guess bars with the same \time signature (or, indeed different
ones).
No, it's always for exactly one time signature, but at the time it is
called, LilyPond has no idea just how long a bar is and can't count it
off itself.  So you need to separate rule patterns by |.
Ah, in that case I need a way of building up the list of beamExceptions,
so the user can define beaming rules for all the time signature changes
they use in the score. My first attempt was this:
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
beamExceptions_first =   \beamExceptions { \time 4/4  e'8 f'8[ a'8 b'8  a'8] 
f'8[ e'8 e'8] }
beamExceptions_second =  \beamExceptions { \time 6/8  e'8 f'8[ b'8  a'8] f'8[ 
e'8] }

\layout {
\set beamExceptions = #(append beamExceptions_first beamExceptions_second)
}
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

but using \displayScheme I see that this results in

(make-music
   'ContextSpeccedMusic
   'context-type
   'Bottom
   'element
   (make-music
     'PropertySet
     'value
     (list (list (quote end) (list 1/8 5 3))
           (list (quote end) (list 1/8 4 2)))
     'symbol
     'beamExceptions))

Which I guess means that this is not creating a beaming rule specific to
those time signatures - can I augment the alist returned by
\beamExceptions to make it into a rule specific to the time signature
concerned?
Any value of beamExceptions only applies to one time signature, which is the one currently in effect.
  I guess I would know the answer to this if I could find out
what the alist holds initially, but my feeble attempt to elicit this via
\void \displayScheme #beamExceptions
gave me

#<Music function #<procedure #f (music)>>

which is the "music" function rather than the alist - how come these two
things appear to have the same name?
Well, that’s by design :-)
The default values of beamExceptions for each time signature are defined in scm/time-signature-settings.scm – also the best resource for examples in dealing with the ‘internal’ Scheme data structure of beamExceptions, which is hard to grasp :-)

Yours, Simon



reply via email to

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