Jump to content

Recommended Posts

to use the function which works on event-numbers, first you have to number it (the score), so that you could work with this afterwards...


;;; ADD numbers to text attributes (can do that in your setup), then ADD number to events
;;; have a look to the example. after that, easy to use REPLACE-ON-EVENT-NUMBER etc...

(defun add-numbers-to-text-attributes (a b)
  (loop for i from a to b
    append (add-text-attributes (list (compress (list 'nr i)) (write-to-string i)))))

(add-numbers-to-text-attributes 0 100)

(defun add-num-to-events (omnlist)
    for x in (single-events omnlist)
    for i from 0 to (length (single-events omnlist))
    when (omn-formp x)
    collect (omn-replace :articulation (list (compress (list 'nr i))) x)
    else collect x))

;;; evaluate cmd3
(setf seq (add-num-to-events '(-q q c4 mp -q -q e e e e e q c4 mp -q -q q c4 mp -q)))

=> ((-q) (q c4 mp nr1) (-q) (-q) (e c4 mp nr4) (e c4 mp nr5) (e c4 mp nr6) (e c4 mp nr7) (e c4 mp nr8) (q c4 mp nr9) (-q) (-q) (q c4 mp nr12) (-q))



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use Privacy Policy