Here's a small function from my toolbox i use very often for adding articulation on already generated OMN material.
Also useful for adding legato slurs.
Link to video example:
;;; =============================================
;;; ARTICULATION-MAP-OMN
;;; AJOUTE DES ARTICULATIONS SUR DES LISTES OMN
;;; BASÉES SUR DU PATTERN MATCHING.
;;; =============================================
(defun articulation-map-omn (map omn &key (otherwise '-))
(do-verbose
("articulation-map-omn")
(let ((plist (disassemble-omn omn)))
(setf (getf plist :articulation)
(pattern-map map (getf plist :length) :otherwise otherwise :swallow t))
(apply 'make-omn plist))))
#| USAGE
(setf mat '((q c4 p d4 e e4 f4 s g4 f a4 g4 f4 q e4)
(e d4 mp c4 s d4 e4 f4 e4 q d4 e c4 b3)
(h a3 f -h)))
(setf prules '(((s s s) (leg leg leg))
((s s) (leg leg))
((s e) (- -))
((s q) (- stacc))
((q) (stacc))
((e) (-))))
(setf out (articulation-map-omn prules mat))
|#
SB.