AM Posted August 6, 2018 Share Posted August 6, 2018 works, but only for one-time-repetiton... could you use it? (defun merge-lengths-of-a-pitch-rep (omn-seq) (let* ((omn-seq (single-events omn-seq)) (l)) (flatten (loop repeat (length omn-seq) for cnt = 0 then (incf cnt) when (equal (omn :pitch (nth cnt omn-seq)) (omn :pitch (nth (1+ cnt) omn-seq))) do (progn (setf l (length-note-merge (append (omn :length (nth cnt omn-seq)) (omn :length (nth (1+ cnt) omn-seq))))) (incf cnt)) and collect (omn-replace :length l (nth cnt omn-seq)) else collect (nth cnt omn-seq))))) (merge-lengths-of-a-pitch-rep '(e c4 mf d4 d4 e4 f4 f4)) => (e c4 mf q d4 mf e e4 mf q f4 mf) Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted August 6, 2018 Share Posted August 6, 2018 use filter-tie function. s. opmo 1 Quote Link to comment Share on other sites More sharing options...
AM Posted August 6, 2018 Author Share Posted August 6, 2018 ...damn, again i have not found the right function thanks, stephane!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.