(let
((lst
(fold-some-music
- (lambda (m) (or (music-is-of-type? m 'layout-instruction-event)
- (music-is-of-type? m 'context-specification)
- (music-is-of-type? m 'apply-context)
- (music-is-of-type? m 'time-signature-music)))
+ (music-type-predicate '(layout-instruction-event
+ context-specification
+ apply-context
+ time-signature-music))
(lambda (m overrides)
(case (ly:music-property m 'name)
((OverrideProperty)
;;; post events
;;;
-(define (post-event? m)
- (music-is-of-type? m 'post-event))
+(define post-event? (music-type-predicate 'post-event))
(define* (event-direction->lily-string event #:optional (required #t))
(let ((direction (ly:music-property event 'direction)))
(chord-repeat (ly:music-property chord 'duration)))
(call-with-values
(lambda ()
- (partition (lambda (m) (music-is-of-type? m 'rhythmic-event))
+ (partition (music-type-predicate 'rhythmic-event)
elements))
(lambda (chord-elements other-elements)
(cond ((pair? chord-elements)
;; articulations on individual events since they can't actually get
;; into a repeat chord given its input syntax.
- (define (keep-element? m)
- (any (lambda (t) (music-is-of-type? m t))
- event-types))
+ (define keep-element? (music-type-predicate event-types))
(for-each
(lambda (field)
"Return a flat list of all music with @var{type} (either a single
type symbol or a list of alternatives) inside of @var{music}, not
recursing into matches themselves."
- (extract-music
- music
- (if (cheap-list? type)
- (lambda (m)
- (any (lambda (t) (music-is-of-type? m t)) type))
- (lambda (m) (music-is-of-type? m type)))))
+ (extract-music music (music-type-predicate type)))
(define*-public (event-chord-wrap! music)
"Wrap isolated rhythmic events and non-postevent events in