Jump to content

Featured Replies

Posted

could be an interesting idea for OPMO? (or already existing?)

greetings

andré

 

;;; a function (a sketch - i needed it for my momentary work) which filters 
;;; an OMN-sequence in a specific bar, from a specific beat, with a specific
;;; span. (in such a basic version all in quarters (bars/...))


(defun copy-omn-seq (omnseq bar/beat-list &key (measure '(4/4)) (span nil))
  (loop for i in bar/beat-list
    collect (loop repeat (if (null span)
                           (- (/ (car measure) 1/4) (1- (cadr i)))
                           span)
              for x = (1- (cadr i)) then (incf x)
              append (nth x (omn-to-measure (nth (1- (car i)) (omn-to-measure omnseq measure)) '(1/4))))))



(setf mat '((e c4 cs4 d4 ds4 e4 f4 fs4 g4) 
            (e c3 cs3 d3 ds3 e3 f3 fs3 g3) 
            (e c6 cs6 d6 ds6 e6 f6 fs6 g6)))



(copy-omn-seq mat '((2 3))) ;; bar 2 from beat 3 until end of bar
=> ((e e3 f3 e fs3 g3))

(copy-omn-seq mat '((1 1)) :span 2) ;; bar 1 from beat 1 for 2 quarters
=> ((e c4 cs4 e d4 ds4))

(copy-omn-seq mat '((1 2) (2 3) (3 4))) ;; same thing with more then ONE filterings
=> ((e d4 ds4 e e4 f4 e fs4 g4) (e e3 f3 e fs3 g3) (e fs6 g6))

(copy-omn-seq mat '((1 2) (2 3) (3 4)) :span 1) ;; same - every filtering with span 1
=> ((e d4 ds4) (e e3 f3) (e fs6 g6))

 

  • Author

thanks for the hint 🙂 but don't seems to be equal / not same idea?

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