+
+(define-ly-syntax (make-mark-set parser location label)
+ "Make the music for the \\mark command."
+ (let* ((set (and (integer? label)
+ (context-spec-music (make-property-set 'rehearsalMark label)
+ 'Score)))
+ (ev (make-music 'MarkEvent))
+ (ch (make-event-chord (list ev))))
+
+ (set! (ly:music-property ev 'origin) location)
+ (if set
+ (make-sequential-music (list set ch))
+ (begin
+ (set! (ly:music-property ev 'label) label)
+ ch))))
+
+(define-ly-syntax (partial parser location dur)
+ "Make a partial measure."
+
+ ;; We use `descend-to-context' here instead of `context-spec-music' to
+ ;; ensure \partial still works if the Timing_translator is moved
+ (descend-to-context
+ (context-spec-music (make-music 'PartialSet
+ 'origin location
+ 'partial-duration dur)
+ 'Timing)
+ 'Score))