- "Some standard subdivisions for time signatures."
- (let*
- ((key (cons num den))
- (entry (assoc key '(
- ; Simple time signatures
- (( 3 . 8) . (3))
- (( 4 . 8) . (2 2))
- ; Compound time signatures
- (( 6 . 4) . (3 3))
- (( 6 . 8) . (3 3))
- (( 6 . 16) . (3 3))
- (( 9 . 4) . (3 3 3))
- (( 9 . 8) . (3 3 3))
- (( 9 . 16) . (3 3 3))
- ((12 . 4) . (3 3 3 3))
- ((12 . 8) . (3 3 3 3))
- ((12 . 16) . (3 3 3 3))
- ; Some common irregular time signatures
- (( 5 . 8) . (3 2))
- (( 8 . 8) . (3 3 2))
- ))))
-
- (if entry
- (cdr entry)
- '())))
+;;; Used for calls that include beat-grouping setting
+(define-public (set-time-signature num den . rest)
+ "Set properties for time signature @var{num/den}.
+If @var{rest} is present, it is used to make a default
+@code{beamSetting} rule."
+ (ly:export (apply make-beam-rule-time-signature-set
+ (list num den rest))))
+
+(define-public (make-beam-rule-time-signature-set num den rest)
+ "Implement settings for new time signature. Can be
+called from either make-time-signature-set (used by \time
+in parser) or set-time-signature (called from scheme code
+included in .ly file."
+
+ (define (make-default-beaming-rule context)
+ (override-property-setting
+ context
+ 'beamSettings
+ (list (cons num den) 'end)
+ (list (cons '* (car rest)))))