Jump to content

Featured Replies

Posted

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

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.

Create an account or sign in to comment


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy