Re: Help for \beamExceptions

2015-09-05 Thread Richard Shann
On Fri, 2015-09-04 at 20:20 +0200, David Kastrup wrote:
> Richard Shann  writes:
> 
> > On Fri, 2015-09-04 at 19:25 +0200, David Kastrup wrote:
> >> Richard Shann  writes:
> >> 
> >> > On Fri, 2015-09-04 at 18:56 +0200, David Kastrup wrote:
> >> >> Richard Shann  writes:
> >> >> 
> >> >> > I seem to have run into a snag with re-writing
> >> >> > default-time-signature-settings, it works ok if there was previously a
> >> >> > rule for a time signature, but adding a rule for one (such as 6/8) 
> >> >> > which
> >> >> > has none doesn't result in the beaming pattern being used. Here is a
> >> >> > minimal example. The first bar shows the pattern desired, and this is
> >> >> > put into the value for 'beamExceptions in the 6/8 alist, but the 
> >> >> > second
> >> >> > bar is not then beamed to follow that pattern.
> >> >> 
> >> >> That's likely because 6/8 triggers a special case relying on the context
> >> >> property
> >> >> 
> >> >>  (beamHalfMeasure ,boolean? "Whether to allow a beam to begin
> >> >> halfway through the measure in triple time, which could look like 6/8.")
> >> >
> >> > It sounds like I am tackling this at too low a level then. Is there a
> >> > more user-accessible way of setting the beaming rules for an entire
> >> > score containing many movements with a variety of time signatures?
> >> 
> >> Just unset the darn property if you don't want its effect.
> >
> > which property do you refer to?
> 
> beamHalfMeasure.  What other property were we talking about right now?
> 
> >> At any rate, I don't understand why you are not using
> >> \overrideTimeSignatureSettings to begin with rather than meddling
> >> with the alists used internally.
> >
> > Is that to say that my explanation before "it applies
> > to a particular instance of a time signature change, the user has to
> > re-define (or cut and paste) to use it in another part of the score."
> > was unclear?
> 
> It's wrong.
> 
> > As far as I can see, \overrideTimeSignatureSettings needs to be
> > invoked at every time signature, rather than being applied to a
> > complete book.
> 
> How did you reach that conclusion?  Have you _read_ the documentation of
> \overrideTimeSignatureSettings I pointed you to?  Where does it say
> anything like that?
> 
> > Please correct me if I am wrong, but at the moment I don't know how a
> > user can place a something at the top of a LilyPond file that will
> > result in a particular beaming rule being applied whenever they use a
> > particular time signature.
> 
> \layout {
>\overrideTimeSignatureSettings ...
> }
> 

Thank you, that was the bit that is missing from the page you referred
to. I suggest that this text from that page:

Alternatively, the default values of all these time-signature-based
variables, including baseMoment and beamExceptions, can be set together.
The values can be set independently for several different time
signatures. The new values take effect when a subsequent \time command
with the same value of the time signature is executed: 


should become

Alternatively, the default values of all these time-signature-based
variables, including baseMoment and beamExceptions, can be set together.
The values can be set independently for several different time
signatures. This can be done in a \layout {} block when it affects all
the passages with the specified time signature in the score block it is
placed in (or all the score blocks if the layout block is at the top
level). Or if placed in the music, the new values take effect when a
subsequent \time command with the same value of the time signature is
executed and affects only the staff in which it is placed: 

with, perhaps an example of the 

 \layout{ \overrideTimeSignatureSettings ... }

use, which I would have thought is mostly what people want (consistent
beaming for a given time signature throughout a work).

Richard








___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-05 Thread David Kastrup
Richard Shann  writes:

> On Fri, 2015-09-04 at 20:20 +0200, David Kastrup wrote:
>> Richard Shann  writes:
>> 
>> > Please correct me if I am wrong, but at the moment I don't know how a
>> > user can place a something at the top of a LilyPond file that will
>> > result in a particular beaming rule being applied whenever they use a
>> > particular time signature.
>> 
>> \layout {
>>\overrideTimeSignatureSettings ...
>> }
>> 
>
> Thank you, that was the bit that is missing from the page you referred
> to. I suggest that this text from that page:
>
> Alternatively, the default values of all these time-signature-based
> variables, including baseMoment and beamExceptions, can be set together.
> The values can be set independently for several different time
> signatures. The new values take effect when a subsequent \time command
> with the same value of the time signature is executed: 
>
>
> should become
>
> Alternatively, the default values of all these time-signature-based
> variables, including baseMoment and beamExceptions, can be set together.
> The values can be set independently for several different time
> signatures. This can be done in a \layout {} block when it affects all
> the passages with the specified time signature in the score block it is
> placed in (or all the score blocks if the layout block is at the top
> level). Or if placed in the music, the new values take effect when a
> subsequent \time command with the same value of the time signature is
> executed and affects only the staff in which it is placed:

But that's the same with every single context property setting command.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-04 Thread Richard Shann
I seem to have run into a snag with re-writing
default-time-signature-settings, it works ok if there was previously a
rule for a time signature, but adding a rule for one (such as 6/8) which
has none doesn't result in the beaming pattern being used. Here is a
minimal example. The first bar shows the pattern desired, and this is
put into the value for 'beamExceptions in the 6/8 alist, but the second
bar is not then beamed to follow that pattern.

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><

\version "2.19.5"
MvmntIVoiceI = {
 a8[ d'8 f' a'] e'8[ e'8]
 a'8 a' e' f' e' a'
}

#(let ((outer-value #f))
(format #t "Before adding 6/8 rule: ~s\n\n" default-time-signature-settings)
   (set! outer-value (assoc-get '(6 . 8) 
default-time-signature-settings))
   (if (not outer-value) (set! outer-value '()))
   (set! outer-value (assoc-set! outer-value 'beamExceptions 
   #{ \beamExceptions { a 8[ d' 8 f'  a' ] 
e' 8[ e' 8]}#}
   ))
   (set! default-time-signature-settings (assoc-set! 
default-time-signature-settings '(6 . 8) outer-value))
(format #t "After adding 6/8 rule: ~s\n\n" default-time-signature-settings)
)

\score {
 {  \time 6/8  \MvmntIVoiceI}   
   }

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><

The output to the terminal is:
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><
Before adding 6/8 rule: (((2 . 2) (beamExceptions (end (1/32 8 8 8 8 ((3 . 
2) (beamExceptions (end (1/32 8 8 8 8 8 8 ((3 . 4) (beamExceptions (end 
(1/8 6) (1/12 3 3 3 ((3 . 8) (beamExceptions (end (1/8 3 ((4 . 2) 
(beamExceptions (end (1/16 4 4 4 4 4 4 4 4 ((4 . 4) (beamExceptions (end 
(1/8 4 4) (1/12 3 3 3 3 ((4 . 8) (beatStructure 2 2)) ((6 . 4) 
(beamExceptions (end (1/16 4 4 4 4 4 4 ((9 . 4) (beamExceptions (end (1/32 
8 8 8 8 8 8 8 8 ((12 . 4) (beamExceptions (end (1/32 8 8 8 8 8 8 8 8 8 8 8 
8 ((5 . 8) (beatStructure 3 2)) ((8 . 8) (beatStructure 3 3 2)))

After adding 6/8 rule: (((6 . 8) (beamExceptions (end (1/8 4 2 ((2 . 2) 
(beamExceptions (end (1/32 8 8 8 8 ((3 . 2) (beamExceptions (end (1/32 8 8 
8 8 8 8 ((3 . 4) (beamExceptions (end (1/8 6) (1/12 3 3 3 ((3 . 8) 
(beamExceptions (end (1/8 3 ((4 . 2) (beamExceptions (end (1/16 4 4 4 4 4 4 
4 4 ((4 . 4) (beamExceptions (end (1/8 4 4) (1/12 3 3 3 3 ((4 . 8) 
(beatStructure 2 2)) ((6 . 4) (beamExceptions (end (1/16 4 4 4 4 4 4 ((9 . 
4) (beamExceptions (end (1/32 8 8 8 8 8 8 8 8 ((12 . 4) (beamExceptions 
(end (1/32 8 8 8 8 8 8 8 8 8 8 8 8 ((5 . 8) (beatStructure 3 2)) ((8 . 8) 
(beatStructure 3 3 2)))
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><

which seems to be perfect, but the second bar just has the (1/8 3 3)
pattern when typeset.

If anyone can illuminate me I would be very grateful.

Richard





On Thu, 2015-09-03 at 12:50 +0100, Richard Shann wrote:
> On Thu, 2015-09-03 at 12:59 +0200, David Kastrup wrote:
> > Richard Shann  writes:
> > 
> > > On Thu, 2015-09-03 at 10:54 +0200, David Kastrup wrote:
> > >> Richard Shann  writes:
> > >> 
> > >> > 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.
> > >> 
> > >> There are separate commands for defining time-signature-specific
> > >> exceptions rather than the currently active exception list.
> > >
> > > I was just experimenting with something along those lines when your
> > > email arrived:
> > >
> > > #(override-time-signature-setting '(3 . 8) '())
> > >
> > >
> > > I was thinking this might revert the 3/8 rules to the default, but I'm
> > > not sure I've got it right yet. I got there from Simon Albrecht pointing
> > > me to
> > 
> > Anything wrong with using \overrideTimeSignatureSettings here?  Cf
> > 
> 
> 
> Well, that is the facility currently available in Denemo, but it applies
> to a particular instance of a time signature change, the user has to
> 

Re: Help for \beamExceptions

2015-09-04 Thread David Kastrup
Richard Shann  writes:

> I seem to have run into a snag with re-writing
> default-time-signature-settings, it works ok if there was previously a
> rule for a time signature, but adding a rule for one (such as 6/8) which
> has none doesn't result in the beaming pattern being used. Here is a
> minimal example. The first bar shows the pattern desired, and this is
> put into the value for 'beamExceptions in the 6/8 alist, but the second
> bar is not then beamed to follow that pattern.

That's likely because 6/8 triggers a special case relying on the context
property

 (beamHalfMeasure ,boolean? "Whether to allow a beam to begin
halfway through the measure in triple time, which could look like 6/8.")

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-04 Thread David Kastrup
Richard Shann  writes:

> On Fri, 2015-09-04 at 18:56 +0200, David Kastrup wrote:
>> Richard Shann  writes:
>> 
>> > I seem to have run into a snag with re-writing
>> > default-time-signature-settings, it works ok if there was previously a
>> > rule for a time signature, but adding a rule for one (such as 6/8) which
>> > has none doesn't result in the beaming pattern being used. Here is a
>> > minimal example. The first bar shows the pattern desired, and this is
>> > put into the value for 'beamExceptions in the 6/8 alist, but the second
>> > bar is not then beamed to follow that pattern.
>> 
>> That's likely because 6/8 triggers a special case relying on the context
>> property
>> 
>>  (beamHalfMeasure ,boolean? "Whether to allow a beam to begin
>> halfway through the measure in triple time, which could look like 6/8.")
>
> It sounds like I am tackling this at too low a level then. Is there a
> more user-accessible way of setting the beaming rules for an entire
> score containing many movements with a variety of time signatures?

Just unset the darn property if you don't want its effect.  At any rate,
I don't understand why you are not using \overrideTimeSignatureSettings
to begin with rather than meddling with the alists used internally.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-04 Thread Richard Shann
On Fri, 2015-09-04 at 19:25 +0200, David Kastrup wrote:
> Richard Shann  writes:
> 
> > On Fri, 2015-09-04 at 18:56 +0200, David Kastrup wrote:
> >> Richard Shann  writes:
> >> 
> >> > I seem to have run into a snag with re-writing
> >> > default-time-signature-settings, it works ok if there was previously a
> >> > rule for a time signature, but adding a rule for one (such as 6/8) which
> >> > has none doesn't result in the beaming pattern being used. Here is a
> >> > minimal example. The first bar shows the pattern desired, and this is
> >> > put into the value for 'beamExceptions in the 6/8 alist, but the second
> >> > bar is not then beamed to follow that pattern.
> >> 
> >> That's likely because 6/8 triggers a special case relying on the context
> >> property
> >> 
> >>  (beamHalfMeasure ,boolean? "Whether to allow a beam to begin
> >> halfway through the measure in triple time, which could look like 6/8.")
> >
> > It sounds like I am tackling this at too low a level then. Is there a
> > more user-accessible way of setting the beaming rules for an entire
> > score containing many movements with a variety of time signatures?
> 
> Just unset the darn property if you don't want its effect.

which property do you refer to?

>   At any rate,
> I don't understand why you are not using \overrideTimeSignatureSettings
> to begin with rather than meddling with the alists used internally.

Is that to say that my explanation before "it applies
to a particular instance of a time signature change, the user has to
re-define (or cut and paste) to use it in another part of the score."
was unclear? As far as I can see, \overrideTimeSignatureSettings needs
to be invoked at every time signature, rather than being applied to a
complete book. Please correct me if I am wrong, but at the moment I
don't know how a user can place a something at the top of a LilyPond
file that will result in a particular beaming rule being applied
whenever they use a particular time signature.

Richard



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-04 Thread David Kastrup
Richard Shann  writes:

> On Fri, 2015-09-04 at 19:25 +0200, David Kastrup wrote:
>> Richard Shann  writes:
>> 
>> > On Fri, 2015-09-04 at 18:56 +0200, David Kastrup wrote:
>> >> Richard Shann  writes:
>> >> 
>> >> > I seem to have run into a snag with re-writing
>> >> > default-time-signature-settings, it works ok if there was previously a
>> >> > rule for a time signature, but adding a rule for one (such as 6/8) which
>> >> > has none doesn't result in the beaming pattern being used. Here is a
>> >> > minimal example. The first bar shows the pattern desired, and this is
>> >> > put into the value for 'beamExceptions in the 6/8 alist, but the second
>> >> > bar is not then beamed to follow that pattern.
>> >> 
>> >> That's likely because 6/8 triggers a special case relying on the context
>> >> property
>> >> 
>> >>  (beamHalfMeasure ,boolean? "Whether to allow a beam to begin
>> >> halfway through the measure in triple time, which could look like 6/8.")
>> >
>> > It sounds like I am tackling this at too low a level then. Is there a
>> > more user-accessible way of setting the beaming rules for an entire
>> > score containing many movements with a variety of time signatures?
>> 
>> Just unset the darn property if you don't want its effect.
>
> which property do you refer to?

beamHalfMeasure.  What other property were we talking about right now?

>> At any rate, I don't understand why you are not using
>> \overrideTimeSignatureSettings to begin with rather than meddling
>> with the alists used internally.
>
> Is that to say that my explanation before "it applies
> to a particular instance of a time signature change, the user has to
> re-define (or cut and paste) to use it in another part of the score."
> was unclear?

It's wrong.

> As far as I can see, \overrideTimeSignatureSettings needs to be
> invoked at every time signature, rather than being applied to a
> complete book.

How did you reach that conclusion?  Have you _read_ the documentation of
\overrideTimeSignatureSettings I pointed you to?  Where does it say
anything like that?

> Please correct me if I am wrong, but at the moment I don't know how a
> user can place a something at the top of a LilyPond file that will
> result in a particular beaming rule being applied whenever they use a
> particular time signature.

\layout {
   \overrideTimeSignatureSettings ...
}

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-04 Thread Richard Shann
On Fri, 2015-09-04 at 18:56 +0200, David Kastrup wrote:
> Richard Shann  writes:
> 
> > I seem to have run into a snag with re-writing
> > default-time-signature-settings, it works ok if there was previously a
> > rule for a time signature, but adding a rule for one (such as 6/8) which
> > has none doesn't result in the beaming pattern being used. Here is a
> > minimal example. The first bar shows the pattern desired, and this is
> > put into the value for 'beamExceptions in the 6/8 alist, but the second
> > bar is not then beamed to follow that pattern.
> 
> That's likely because 6/8 triggers a special case relying on the context
> property
> 
>  (beamHalfMeasure ,boolean? "Whether to allow a beam to begin
> halfway through the measure in triple time, which could look like 6/8.")

It sounds like I am tackling this at too low a level then. Is there a
more user-accessible way of setting the beaming rules for an entire
score containing many movements with a variety of time signatures?

Richard




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-03 Thread David Kastrup
Richard Shann  writes:

> 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.

There are separate commands for defining time-signature-specific
exceptions rather than the currently active exception list.

>   (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? 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
>
> #>
>
> which is the "music" function rather than the alist - how come these two
> things appear to have the same name?

Convenience.  Just so that you don't need to remember two names.  As a
context property, 'beamExceptions is just a symbol.  You could probably
use something like

\applyContext #(lambda (c) (write
 (ly:context-property c 'beamExceptions)))

to dump the current beamExceptions at any place in the score.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-03 Thread Richard Shann
On Thu, 2015-09-03 at 10:54 +0200, David Kastrup wrote:
> Richard Shann  writes:
> 
> > 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.
> 
> There are separate commands for defining time-signature-specific
> exceptions rather than the currently active exception list.

I was just experimenting with something along those lines when your
email arrived:

#(override-time-signature-setting '(3 . 8) '())


I was thinking this might revert the 3/8 rules to the default, but I'm
not sure I've got it right yet. I got there from Simon Albrecht pointing
me to

scm/time-signature-settings.scm

reading which I understand default-time-signature-settings is set to an
alist that uses the time signature pair as a key and an alist as value,
in which inner alist one of the keys can be 'beamExceptions.
If this understanding is right, then I should be able to set!
default-time-signature-settings to a new value incorporating the user's
desired beamExceptions value before any \score {} blocks and the new
rules will then apply wherever the user has that time signature. I was
guessing that override-time-signature-setting would allow changing the
"inner" alist of default-time-signature-settings.
Let me know if I'm barking up the wrong tree here!

Richard


> 
> >   (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? 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
> >
> > #>
> >
> > which is the "music" function rather than the alist - how come these two
> > things appear to have the same name?
> 
> Convenience.  Just so that you don't need to remember two names.  As a
> context property, 'beamExceptions is just a symbol.  You could probably
> use something like
> 
> \applyContext #(lambda (c) (write
>  (ly:context-property c 'beamExceptions)))
> 
> to dump the current beamExceptions at any place in the score.
> 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-03 Thread David Kastrup
Richard Shann  writes:

> On Thu, 2015-09-03 at 10:54 +0200, David Kastrup wrote:
>> Richard Shann  writes:
>> 
>> > 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.
>> 
>> There are separate commands for defining time-signature-specific
>> exceptions rather than the currently active exception list.
>
> I was just experimenting with something along those lines when your
> email arrived:
>
> #(override-time-signature-setting '(3 . 8) '())
>
>
> I was thinking this might revert the 3/8 rules to the default, but I'm
> not sure I've got it right yet. I got there from Simon Albrecht pointing
> me to

Anything wrong with using \overrideTimeSignatureSettings here?  Cf



-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-03 Thread Richard Shann
On Thu, 2015-09-03 at 12:59 +0200, David Kastrup wrote:
> Richard Shann  writes:
> 
> > On Thu, 2015-09-03 at 10:54 +0200, David Kastrup wrote:
> >> Richard Shann  writes:
> >> 
> >> > 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.
> >> 
> >> There are separate commands for defining time-signature-specific
> >> exceptions rather than the currently active exception list.
> >
> > I was just experimenting with something along those lines when your
> > email arrived:
> >
> > #(override-time-signature-setting '(3 . 8) '())
> >
> >
> > I was thinking this might revert the 3/8 rules to the default, but I'm
> > not sure I've got it right yet. I got there from Simon Albrecht pointing
> > me to
> 
> Anything wrong with using \overrideTimeSignatureSettings here?  Cf
> 


Well, that is the facility currently available in Denemo, but it applies
to a particular instance of a time signature change, the user has to
re-define (or cut and paste) to use it in another part of the score.

I think I have got there with modifying default-time-signature-settings
- now I have:

beamExceptions-three-eight =   \beamExceptions {  e'8[ f'8]a'8 }

#(let ((outer-value #f) (value #f))
   (set! outer-value (assoc-get '(3 . 8) default-time-signature-settings))
   (set! value (assoc-get 'beamExceptions outer-value))
   (set! outer-value (assoc-set! outer-value 'beamExceptions 
beamExceptions-three-eight))
   (set! default-time-signature-settings (assoc-set! 
default-time-signature-settings '(3 . 8) outer-value)))
  
This changes the 3/8 rule to 2 beamed and one un-beamed 1/8 note in the
bar. the beam exceptions can be created by the Denemo user simply by
selecting the music which has been manually beamed and declaring that
this is to be the rule, (or added to the current beamExceptions etc).

I think I am now cooking with gas - thank you very much David and Simon,
and apologies for a slightly off topic thread. 

Richard






___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-02 Thread Richard Shann
On Tue, 2015-09-01 at 21:04 +0200, David Kastrup wrote:
> Richard Shann  writes:
> 
> > I've been trying to use the music function \beamExceptions
> 
> "scheme function"

Is that to say that this should be called a scheme function not a music
function? I found it documented at

http://www.lilypond.org/doc/v2.19/Documentation/notation/available-music-functions

as Available music functions ...


> 
> > which is in version 2.19.25, I can't find anything much to document it
> > though.  For example, trying this
> >
> > \version "2.19.25"
> >
> > MvmntIVoiceI = {
> >  e'8[ f'8 g'] a'8\noBeam b'8 a'[ g'8 f'] |
> >  e'8 f' g' a' b' a' g' f' 
> > }
> >
> > \score { 
> > \new Staff {\time 4/4 \MvmntIVoiceI } 
> > \layout {
> > \set beamExceptions = \beamExceptions { \time 4/4  e' 8[ f' 8
> > g' ] a' 8\noBeam b' 8 a' [ g' 8 f' ] }
> > }
> >   }
> >
> > the second bar is not beamed like the first, despite the music argument
> > to \beamExceptions being a copy of the first bar.
> 
> \beamExceptions only takes explicit beams.  \noBeam is useless here.
> 
> > Is the next stop some source file for finding out what can be done, or
> > am I missing some documentation?
> 
> It's just notes and [ and ].

hmm, well I have tried \tuplet (I think it was, or the older \times
perhaps) and it seemed to understand that - I haven't yet tried \grace,
it would be nice if that could be autobeamed, though perhaps that is not
possible. And there is a comment somewhere about using | to separate
something, I guess bars with the same \time signature (or, indeed
different ones).
I did have it barfing on empty measures (s1*4/4 perhaps) where the
underlying scheme errored without any pleasant LilyPond error message
resulting, I'm not sure if this is something that should be pursued...

> 
> > Another topic that came up while I was doing this:
> > I have used \set beamExceptions here, but I couldn't figure out what is
> > allowed for setting the context - Voice and Staff worked but \set
> > Score.beamExceptions was ignored, and I couldn't find out what \set
> > Timing.beamExceptions was doing - Timing doesn't appear in the hierarchy
> > of contexts...
> 
> Timing is a context alias established by the Timing_translator.  There
> is a hardwired alias Timing for the Score context in case you use Timing
> before anything has been called.  The location in ly/engraver-init.ly
> where this alias of Timing to Score (which is only relevant if you are
> at outer Score level or there is no intervening Timing alias) states:
> 
>   \alias "Timing"
> 
>   %% An alias for Timing is established by the Timing_translator in
>   %% whatever context it is initialized, and the timing variables are
>   %% then copied from wherever Timing had been previously established.
>   %% The alias at Score level provides a target for initializing
>   %% Timing variables in layout definitions before any
>   %% Timing_translator has been run.
> 

Thanks very much for this insight into what is going on with Timing -
I'll be going on (hopefully) to make setting beaming patterns at Voice
and at top level available to Denemo users, so this will hopefully help.

Richard





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-02 Thread 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? 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

#>

which is the "music" function rather than the alist - how come these two
things appear to have the same name?

Richard








___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-02 Thread Simon Albrecht

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

#>

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

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-02 Thread David Kastrup
Richard Shann  writes:

> On Tue, 2015-09-01 at 21:04 +0200, David Kastrup wrote:
>> Richard Shann  writes:
>> 
>> > I've been trying to use the music function \beamExceptions
>> 
>> "scheme function"
>
> Is that to say that this should be called a scheme function not a music
> function? I found it documented at
>
> http://www.lilypond.org/doc/v2.19/Documentation/notation/available-music-functions
>
> as Available music functions ...

Well.  Most of them are, but this one has a documented different return
type.  Should we call the superset of them LilyPond functions, or rather
bite the bullet and create multiple categories?

>> > which is in version 2.19.25, I can't find anything much to document it
>> > though.  For example, trying this
>> >
>> > \version "2.19.25"
>> >
>> > MvmntIVoiceI = {
>> >  e'8[ f'8 g'] a'8\noBeam b'8 a'[ g'8 f'] |
>> >  e'8 f' g' a' b' a' g' f' 
>> > }
>> >
>> > \score { 
>> > \new Staff {\time 4/4 \MvmntIVoiceI } 
>> > \layout {
>> >\set beamExceptions = \beamExceptions { \time 4/4  e' 8[ f' 8
>> > g' ] a' 8\noBeam b' 8 a' [ g' 8 f' ] }
>> > }
>> >   }
>> >
>> > the second bar is not beamed like the first, despite the music argument
>> > to \beamExceptions being a copy of the first bar.
>> 
>> \beamExceptions only takes explicit beams.  \noBeam is useless here.
>> 
>> > Is the next stop some source file for finding out what can be done, or
>> > am I missing some documentation?
>> 
>> It's just notes and [ and ].
>
> hmm, well I have tried \tuplet (I think it was, or the older \times
> perhaps) and it seemed to understand that - I haven't yet tried \grace,
> it would be nice if that could be autobeamed, though perhaps that is not
> possible.

It isn't.

> 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 |.

> I did have it barfing on empty measures (s1*4/4 perhaps) where the
> underlying scheme errored without any pleasant LilyPond error message
> resulting, I'm not sure if this is something that should be pursued...

Possibly, but it does not exactly make much sense to beam over that.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-02 Thread Richard Shann
On Tue, 2015-09-01 at 22:06 +0200, Simon Albrecht wrote:
> Hello Richard,
> 
> if you want to use \beamExceptions, it seems like the only way to do this is
> %%
> \version "2.19.25"
> 
> {
>\time 4/4
>\set Timing.beamExceptions = \beamExceptions { 8[] 8[ 8] 8[]  8[] 8[ 
> 8 8] }
>e'8 f' g' a' b' a' g' f'
> }
> %%
> 
> – that’s a bit cumbersome

That's really good to know - it will be easy to substitute \noBeam for
[] as the user creates the Beaming Rules from the selection in Denemo,
so that answers that need perfectly (well, assuming the [] syntax is not
just an accident of the parser - I don't recall seeing it documented).

Thanks v. much indeed!

Richard

>  and IMO it should lead to the same result with 
> { 8 8[ 8] 8  8 8[ 8 8] }.
> So currently this is a case where the immediate, Scheme way is more 
> straightforward:
> 
> 
> \version "2.19.25"
> 
> {
>\time 4/4
>\set Timing.beamExceptions = #'((end . ((1/8 . (1 2 1 1 3))
>(1/12 . (1 6 2 1 2)
>e'8 f' g' a' b' a' g' f'
>\tuplet 3/2 4 { e' f' g' f' g' a' g' a' b' a' g' f' }
> }
> 
> 
> Yours, Simon
> 
> Am 01.09.2015 um 20:37 schrieb Richard Shann:
> > I've been trying to use the music function \beamExceptions which is in
> > version 2.19.25, I can't find anything much to document it though.
> > For example, trying this
> >
> > \version "2.19.25"
> >
> > MvmntIVoiceI = {
> >   e'8[ f'8 g'] a'8\noBeam b'8 a'[ g'8 f'] |
> >   e'8 f' g' a' b' a' g' f'
> > }
> >
> > \score {
> >  \new Staff {\time 4/4 \MvmntIVoiceI }
> >  \layout {
> > \set beamExceptions = \beamExceptions { \time 4/4  e' 8[ f' 8
> > g' ] a' 8\noBeam b' 8 a' [ g' 8 f' ] }
> >  }
> >}
> >
> > the second bar is not beamed like the first, despite the music argument
> > to \beamExceptions being a copy of the first bar.
> >
> > Is the next stop some source file for finding out what can be done, or
> > am I missing some documentation?
> >
> > Another topic that came up while I was doing this:
> > I have used \set beamExceptions here, but I couldn't figure out what is
> > allowed for setting the context - Voice and Staff worked but \set
> > Score.beamExceptions was ignored, and I couldn't find out what \set
> > Timing.beamExceptions was doing - Timing doesn't appear in the hierarchy
> > of contexts...
> >
> > Richard
> >   
> >
> >
> > ___
> > lilypond-user mailing list
> > lilypond-user@gnu.org
> > https://lists.gnu.org/mailman/listinfo/lilypond-user
> 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-02 Thread Simon Albrecht

Am 02.09.2015 um 21:35 schrieb Richard Shann:

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

#>


You can display the list of beam exceptions currently in effect by
%%%
\version "2.19.25"

{
  \time 4/4
  \applyContext #(lambda (context)
   (display (ly:context-property context 'beamExceptions)))
  c
}
%%%

See Extending Manual, section 2.6.1.

Yours, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-01 Thread David Kastrup
Richard Shann  writes:

> I've been trying to use the music function \beamExceptions

"scheme function"

> which is in version 2.19.25, I can't find anything much to document it
> though.  For example, trying this
>
> \version "2.19.25"
>
> MvmntIVoiceI = {
>  e'8[ f'8 g'] a'8\noBeam b'8 a'[ g'8 f'] |
>  e'8 f' g' a' b' a' g' f' 
> }
>
> \score { 
> \new Staff {\time 4/4 \MvmntIVoiceI } 
> \layout {
>   \set beamExceptions = \beamExceptions { \time 4/4  e' 8[ f' 8
> g' ] a' 8\noBeam b' 8 a' [ g' 8 f' ] }
> }
>   }
>
> the second bar is not beamed like the first, despite the music argument
> to \beamExceptions being a copy of the first bar.

\beamExceptions only takes explicit beams.  \noBeam is useless here.

> Is the next stop some source file for finding out what can be done, or
> am I missing some documentation?

It's just notes and [ and ].

> Another topic that came up while I was doing this:
> I have used \set beamExceptions here, but I couldn't figure out what is
> allowed for setting the context - Voice and Staff worked but \set
> Score.beamExceptions was ignored, and I couldn't find out what \set
> Timing.beamExceptions was doing - Timing doesn't appear in the hierarchy
> of contexts...

Timing is a context alias established by the Timing_translator.  There
is a hardwired alias Timing for the Score context in case you use Timing
before anything has been called.  The location in ly/engraver-init.ly
where this alias of Timing to Score (which is only relevant if you are
at outer Score level or there is no intervening Timing alias) states:

  \alias "Timing"

  %% An alias for Timing is established by the Timing_translator in
  %% whatever context it is initialized, and the timing variables are
  %% then copied from wherever Timing had been previously established.
  %% The alias at Score level provides a target for initializing
  %% Timing variables in layout definitions before any
  %% Timing_translator has been run.


-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Help for \beamExceptions

2015-09-01 Thread Simon Albrecht

Hello Richard,

if you want to use \beamExceptions, it seems like the only way to do this is
%%
\version "2.19.25"

{
  \time 4/4
  \set Timing.beamExceptions = \beamExceptions { 8[] 8[ 8] 8[]  8[] 8[ 
8 8] }

  e'8 f' g' a' b' a' g' f'
}
%%

– that’s a bit cumbersome and IMO it should lead to the same result with 
{ 8 8[ 8] 8  8 8[ 8 8] }.
So currently this is a case where the immediate, Scheme way is more 
straightforward:



\version "2.19.25"

{
  \time 4/4
  \set Timing.beamExceptions = #'((end . ((1/8 . (1 2 1 1 3))
  (1/12 . (1 6 2 1 2)
  e'8 f' g' a' b' a' g' f'
  \tuplet 3/2 4 { e' f' g' f' g' a' g' a' b' a' g' f' }
}


Yours, Simon

Am 01.09.2015 um 20:37 schrieb Richard Shann:

I've been trying to use the music function \beamExceptions which is in
version 2.19.25, I can't find anything much to document it though.
For example, trying this

\version "2.19.25"

MvmntIVoiceI = {
  e'8[ f'8 g'] a'8\noBeam b'8 a'[ g'8 f'] |
  e'8 f' g' a' b' a' g' f'
}

\score {
 \new Staff {\time 4/4 \MvmntIVoiceI }
 \layout {
\set beamExceptions = \beamExceptions { \time 4/4  e' 8[ f' 8
g' ] a' 8\noBeam b' 8 a' [ g' 8 f' ] }
 }
   }

the second bar is not beamed like the first, despite the music argument
to \beamExceptions being a copy of the first bar.

Is the next stop some source file for finding out what can be done, or
am I missing some documentation?

Another topic that came up while I was doing this:
I have used \set beamExceptions here, but I couldn't figure out what is
allowed for setting the context - Voice and Staff worked but \set
Score.beamExceptions was ignored, and I couldn't find out what \set
Timing.beamExceptions was doing - Timing doesn't appear in the hierarchy
of contexts...

Richard
  



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user