Jump to content

Featured Replies

Posted

(defun testp (n1 n2 &key (test '=))
  (progn 
    (cond ((pitchp n1)
           (setf n1 (pitch-to-midi n1)
                 n2 (pitch-to-midi n2)))
          ((velocityp n1)
           (setf n1 (get-velocity n1)
                 n2 (get-velocity n2))))

    (eval (list test n1 n2))))


(testp 'cs4 'd4 :test '<)
(testp 'cs4 'd4 :test '/=)
(testp 'cs4 'cs4 :test '=)

(testp 'mp 'mf :test '<)
(testp 12 13 :test '=)

 

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