X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fauto-beam.scm;h=eb289931180ebaa4f8d6cfdfc972659b1bacf201;hb=c271bf5018db132003a6a8341691b33b6d6f0e9f;hp=d40e52860cc5d66943eefa03b960927553fdbac9;hpb=74452b9d42befc2e0b5ca2451857758c81e60762;p=lilypond.git diff --git a/scm/auto-beam.scm b/scm/auto-beam.scm index d40e52860c..eb28993118 100644 --- a/scm/auto-beam.scm +++ b/scm/auto-beam.scm @@ -1,10 +1,8 @@ -;;; -;;; auto-beam.scm -- Auto-beam-engraver settings -;;; -;;; source file of the GNU LilyPond music typesetter -;;; -;;; (c) 2000--2003 Jan Nieuwenhuizen -;;; +;;;; auto-beam.scm -- Auto-beam-engraver settings +;;;; +;;;; source file of the GNU LilyPond music typesetter +;;;; +;;;; (c) 2000--2004 Jan Nieuwenhuizen ;;; specify generic beam begin and end times @@ -15,8 +13,8 @@ ;;; where ;;; ;;; function = begin or end -;;; shortest-duration-in-beam = numerator denominator; eg: 1 16 -;;; time-signature = numerator denominator, eg: 4 4 +;;; shortest-duration-in-beam = numerator denominator; e.g.: 1 16 +;;; time-signature = numerator denominator, e.g.: 4 4 ;;; ;;; unspecified or wildcard entries for duration or time-signature ;;; are given by * * @@ -85,12 +83,12 @@ (define (override-property-setting context context-prop setting value) - "Like the C++ code that executes \override, but without type + "Like the C++ code that executes \\override, but without type checking. " - (ly:set-context-property! context context-prop + (ly:context-set-property! context context-prop (cons (cons setting value) - (ly:get-context-property context context-prop) + (ly:context-property context context-prop) ) ) ) @@ -110,13 +108,13 @@ a fresh copy of the list-head is made." - (ly:set-context-property! + (ly:context-set-property! context context-prop - (revert-assoc (ly:get-context-property context context-prop) + (revert-assoc (ly:context-property context context-prop) setting)) ) -(define-public (override-auto-beam-setting setting num den) +(define-public (override-auto-beam-setting setting num den . rest) (ly:export (context-spec-music (make-apply-context (lambda (c) @@ -124,18 +122,19 @@ a fresh copy of the list-head is made." c 'autoBeamSettings setting (ly:make-moment num den)) )) - "Voice") - )) + (if (and (pair? rest) (symbol? (car rest))) + (car rest) + 'Voice) + ))) -(define-public (revert-auto-beam-setting setting) +(define-public (revert-auto-beam-setting setting . rest) (ly:export (context-spec-music (make-apply-context (lambda (c) (revert-property-setting c 'autoBeamSettings setting))) - - "Voice"))) - - + (if (and (pair? rest) (symbol? (car rest))) + (car rest) + 'Voice))))