From 771503749e5fa4a4e579f0c81731b142b4c2b4f6 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Thu, 28 Nov 2013 17:32:52 +0100 Subject: [PATCH] Issue 3682/2: Change documentation and regtests for \beamExceptions --- Documentation/notation/rhythms.itely | 39 ++++++------------- input/regression/auto-beam-exceptions.ly | 38 +++++------------- input/regression/les-nereides.ly | 7 ++-- .../regression/tablature-slurs-with-beams.ly | 5 ++- 4 files changed, 27 insertions(+), 62 deletions(-) diff --git a/Documentation/notation/rhythms.itely b/Documentation/notation/rhythms.itely index d104f18aef..2847d627c1 100644 --- a/Documentation/notation/rhythms.itely +++ b/Documentation/notation/rhythms.itely @@ -2037,6 +2037,7 @@ new beam starts. @funindex autoBeaming @funindex baseMoment @funindex beamExceptions +@funindex \beamExceptions @funindex beatStructure @funindex measureLength @funindex \time @@ -2178,42 +2179,24 @@ the time signature. Any exceptions to this default can be found in Special autobeaming rules (other than ending a beam on a beat) are defined in the @code{beamExceptions} property. +The value for @code{beamExceptions}, a somewhat complex Scheme +data structure, is easiest generated with the +@code{\beamExceptions} function. This function is given one or +more manually beamed measure-length rhythmic patterns (measures +have to be separated by a bar check@tie{}@code{|} since the +function has no other way to discern the measure length). Here is +a simple example: + @lilypond[quote,relative=2,verbatim] \time 3/16 \set Timing.beatStructure = #'(2 1) \set Timing.beamExceptions = - #'( ;start of alist - (end . ;entry for end of beams - ( ;start of alist of end points - ((1 . 32) . (2 2 2)) ;rule for 1/32 beams -- end each 1/16 - ))) %close all entries + \beamExceptions { 32[ 32] 32[ 32] 32[ 32] } c16 c c | \repeat unfold 6 { c32 } | @end lilypond -@code{beamExceptions} is an alist with a key of rule-type and a value -of beaming-rules. - -At this time the only available value of rule-type is -@code{'end} for beam ending. - -Beaming-rules is a scheme alist (or list of pairs) that indicates the -beam type and the grouping to be applied to beams containing notes with -a shortest duration of that beam type. - -@example -#'((beam-type1 . grouping-1) - (beam-type2 . grouping-2) - (beam-type3 . grouping-3)) -@end example - -Beam type is a scheme pair indicating the duration of the beam, -e.g., @code{(1 . 16)}. - -Grouping is a scheme list indicating the grouping to be applied to -the beam. The grouping is in units of the beam type. - -@warning{ A @code{beamExceptions} value must be @emph{complete} +@warning{A @code{beamExceptions} value must be @emph{complete} exceptions list. That is, every exception that should be applied must be included in the setting. It is not possible to add, remove, or change only one of the exceptions. While this may seem cumbersome, diff --git a/input/regression/auto-beam-exceptions.ly b/input/regression/auto-beam-exceptions.ly index 676bb3aafb..b7d553b123 100644 --- a/input/regression/auto-beam-exceptions.ly +++ b/input/regression/auto-beam-exceptions.ly @@ -1,4 +1,4 @@ -\version "2.16.0" +\version "2.19.0" \header { @@ -11,40 +11,20 @@ \relative c' { \time 2/4 - \set Score.beamExceptions = #'( - ( end . - ( - ( (1 . 32) . (4 4 4 4) ) - ) - ) - ) + \set Score.beamExceptions = + \beamExceptions \repeat unfold 4 { 32[ 32 32 32] } \repeat unfold 16 c32 \time 3/4 - \set Score.beamExceptions = #'( - ( end . - ( - ( (1 . 32) . (4 4 4 4 4 4) ) - ) - ) - ) + \set Score.beamExceptions = + \beamExceptions \repeat unfold 6 { 32[ 32 32 32] } \repeat unfold 24 c32 c8 c32 c32 c32 c32 c16 c16 c32 c32 c32 c32 c16 c32 c32 c32 c32 c32 c32 \time 4/4 - \set Score.beamExceptions = #'( - ( end . - ( - ( (1 . 32) . (4 4 4 4 4 4 4 4) ) - ) - ) - ) + \set Score.beamExceptions = + \beamExceptions \repeat unfold 8 { 32[ 32 32 32] } \repeat unfold 32 c32 \time 6/8 - \set Score.beamExceptions = #'( - ( end . - ( - ( (1 . 32) . (4 4 4 4 4 4) ) - ) - ) - ) + \set Score.beamExceptions = + \beamExceptions \repeat unfold 6 { 32[ 32 32 32] } \repeat unfold 24 c32 } diff --git a/input/regression/les-nereides.ly b/input/regression/les-nereides.ly index c87772419d..61b79eccd4 100644 --- a/input/regression/les-nereides.ly +++ b/input/regression/les-nereides.ly @@ -1,4 +1,4 @@ -\version "2.17.10" +\version "2.19.0" \header { composer = "ARTHUR GRAY" @@ -233,8 +233,9 @@ middleDynamics = { theScore = \score{ \context PianoStaff << \new Staff = "treble" << - \set beamExceptions = #'((end . (((1 . 8) . (2 2 2 2)) - ((1 . 32) . (4 4 4 4 4 4 4 4))))) + \set beamExceptions = + \beamExceptions { 8[ 8] 8[ 8] 8[ 8] 8[ 8] | + \repeat unfold 8 { 32[ 32 32 32] } } \treble \trebleTwo >> diff --git a/input/regression/tablature-slurs-with-beams.ly b/input/regression/tablature-slurs-with-beams.ly index 1425ed6807..69d68c0fa9 100644 --- a/input/regression/tablature-slurs-with-beams.ly +++ b/input/regression/tablature-slurs-with-beams.ly @@ -1,4 +1,4 @@ -\version "2.17.20" +\version "2.19.0" \header { @@ -10,7 +10,8 @@ either automatic or manual beaming. guitarSolo = { \time 3/4 - \set Timing.beamExceptions = #'((end . (((1 . 8) . (4 2))))) + \set Timing.beamExceptions = + \beamExceptions { 8[ 8 8 8] 8[ 8] } << {bes'2( aes'8-. r)} \\ {r8 cis(-\tag #'beam [ b f'-\tag #'beam ]) -. r} -- 2.39.5