Skip to content
View in the app

A better way to browse. Learn more.

Learn more

FFTH / length

Featured Replies

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

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.