Jump to content

Featured Replies

Posted
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; subfunction

(defun reset-integer-sequence  (alist &key (offset 0) (flatten nil))
  (let ((min (find-min (flatten alist))))
    (progn 
      (setf alist (cond ((listp (car alist))
                         (loop for j in alist
                           collect (loop for i in j
                                     collect (+ (- i min) offset))))
                        (t (loop for i in alist
                             collect (+ (- i min) offset)))))
      (if (equal flatten t)
        (flatten alist)
        alist))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; check it out
;; command-1

(list-plot (length-staccato (gen-length
                             (reset-integer-sequence
                              (ffth 6 0.075 (x-b (rnd-order '(44 52 22 23 13 44 68 6 22 9 73 28 68)) 3)
                                    :type 'integer))
                             1/64)
                            :value 1/64)
            :point-radius 2 :join-points t)


(list-plot (length-staccato (gen-length
                             (reset-integer-sequence
                              (ffth 4 0.075 (x-b (rnd-order '(44 52 22 23 13 44 68 6 22 9 73 28 68)) 3)
                                    :type 'integer))
                             1/64)
                            :value 1/64)
            :point-radius 2 :join-points t)

 

with 4 voices....

eval -> (command-3)

 

 

(defun reset-integer-sequence  (alist &key (offset 0) (flatten nil))
  (let ((min (find-min (flatten alist))))
    (progn 
      (setf alist (cond ((listp (car alist))
                         (loop for j in alist
                           collect (loop for i in j
                                     collect (+ (- i min) offset))))
                        (t (loop for i in alist
                             collect (+ (- i min) offset)))))
      (if (equal flatten t)
        (flatten alist)
        alist))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(setf s1 (make-omn :pitch '(c1)
                   :length (length-staccato (gen-length
                                             (reset-integer-sequence
                                              (ffth 6 0.075 (x-b (rnd-order '(44 52 22 23 68 6 22 9 73 28 68)) 3)
                                                    :type 'integer)
                                              :offset 4)
                                             1/64)
                                            :value 1/32))

      s2 (make-omn :pitch '(cs4)
                        :length (length-staccato (gen-length
                                                  (reset-integer-sequence
                                                   (ffth 6 0.075 (x-b (rnd-order '(44 52 22 23 13 44 68 9 73 28 68)) 3)
                                                         :type 'integer)
                                                   :offset 4)
                                                  1/64)
                                                 :value 1/32))

      s3 (make-omn :pitch '(d5)
                   :length (length-staccato (gen-length
                                             (reset-integer-sequence
                                              (ffth 6 0.075 (x-b (rnd-order '(44 52 22 23 68 6 22 9 73 28 68)) 3)
                                                    :type 'integer)
                                              :offset 4)
                                             1/64)
                                            :value 1/32))

      s4 (make-omn :pitch '(ds7)
                   :length (length-staccato (gen-length
                                             (reset-integer-sequence
                                              (ffth 6 0.075 (x-b (rnd-order '(44 52 22 23 68 6 22 9 73 28 68)) 3)
                                                    :type 'integer)
                                              :offset 4)
                                             1/64)
                                            :value 1/32)))


(omn-to-time-signature (merge-voices s1 s2 s3 s4) '(4 4))

 

  • opmo changed the title to FFTH / length

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