Pietro Bonanno Posted March 25, 2016 Share Posted March 25, 2016 Good morning. I'm interested in score analysis and I've encountered an issue. Is it possibile in Opusmodus, after I've create a score in OMN form (for example : (h c6 mp) (w. f5 pp) (d a4 mp) ) sort these sublist in PITCH ascending order linking the corresponding value of LENGTH? example: convert this: (h c6 mp) (w. f5 pp) (d a4 mp) in this: (d a4 mp) (w. f5 pp) (h c6 mp) where every sublist remains the same but the order is changed on a pitch base (in this case ascending). I've tried SORT-ASC and similar, but probably there's something to try and I'm new to the program. Thank you a lot! Pietro Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted March 25, 2016 Share Posted March 25, 2016 Hi, this could be a solution: (setf orig '((h c6 mp) (w. f5 pp) (d a4 mp))) (defun prepa (lst) (car (pitch-to-integer (omn :pitch lst)))) ; test of prepa: (prepa '(h c6 mp)) (setf ordered (sort (copy-seq orig) #'< :key #'prepa)) SB. Quote Link to comment Share on other sites More sharing options...
Pietro Bonanno Posted March 25, 2016 Author Share Posted March 25, 2016 Thank you a lot. It's EXACTLY what I need! Pietro 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.