+overrideBeamSettings =
+#(define-music-function
+ (parser location
+ context time-signature rule-type grouping-rule)
+ (symbol? pair? symbol? pair?)
+
+ (_i "Override beamSettings in @var{context}
+for time signatures of @var{time-signature} and rules of type
+@var{rule-type} to have a grouping rule alist
+@var{grouping-rule}.
+@var{rule-type} can be @code{end} or @code{subdivide},
+with a potential future value of @code{begin}.
+@var{grouping-rule} is an alist of @var{(beam-type . grouping)}
+entries. @var{grouping} is in units of @var{beam-type}. If
+@var{beam-type} is @code{*}, grouping is in units of the denominator
+of @var{time-signature}.")
+
+ ;; TODO -- add warning if largest value of grouping is
+ ;; greater than time-signature.
+
+#{
+#(override-beam-setting
+ $time-signature $rule-type $grouping-rule $context)
+#})