Jump to content

Recommended Posts

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))

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy