Jump to content

Featured Replies

Posted

The following function generates symmetrical structures based on sequences of tones, which can evolve over multiple generations, resulting in nested symmetries. Here are a few examples mapped to pitches, integers, and rhythms.


(defun gen-symmetrical-structure (&key row gen)
  (let* ((seq1 (filter-repeat 1 (loop repeat gen
                                     for i in (rnd-sample '(3 5 7 11) :norep t)
                                     append (progn
                                              (setf r1 (filter-first 11 row))
                                              (setf r2 (filter-last 11 row))
                                              (setf n i)
                                              (setf rev (probp 0.5))
                                              (setf r1 (if (null rev)
                                                           r1
                                                         (reverse r1)))
                                              (setf r2 (if (null rev)
                                                           r2
                                                         (reverse r2)))

                                              (flatten (gen-rotate (random 2) (list (filter-first n r1)
                                                                                    (filter-last n r2))))))))

         
        (seq2 (flatten (gen-rotate (random 2) (list (filter-first (length seq1) seq1)
                                                    (pitch-invert-start 'fs4 (reverse (filter-first (length seq1) seq1))))))))
        (filter-repeat 1 (flatten seq2))))


;; with one GEN
(pitch-list-plot
 (gen-symmetrical-structure :row (rnd-air :type :pitch) :gen 1)
 :join-points t :style :fill)

;; with x GEN
(pitch-list-plot
 (gen-symmetrical-structure :row (rnd-air :type :pitch) :gen (+ 2 (random 10)))
 :join-points t :style :fill)


;; remapped to integer
(list-plot
 (pitch-to-integer (gen-symmetrical-structure :row (rnd-air :type :pitch) :gen (+ 2 (random 10))))
 :join-points t :style :fill)

=> (9 5 7 1 10 11 4 8 3 2 0 6 9 5 7 1 10 11 4 8 3 2 0 2 3 8 4 1 7 5 9 6 0 2 3 8 4 11 10 11 10 1 7 5 9 6 3 7 5 11 2 1 2 1 8 4 9 10 12 6 3 7 5 11 8 4 9 10 12 10 9 4 8 1 2 11 5 7 3 6 12 10 9 4 8 1 2 11 5 7 3)

;; remapped to lengths
(length-list-plot
 (gen-length (pitch-to-integer (gen-symmetrical-structure :row (rnd-air :type :pitch) :gen (+ 2 (random 10))))
             '1/32)
 :join-points t :style :fill)

=> (11/32 3/32 9/32 5/16 3/8 3/16 1/16 7/32 5/32 1/8 1/16 7/32 5/32 1/8 1/32 1/4 11/32 3/32 9/32 5/16 3/8 3/16 1/16 7/32 5/32 1/8 1/32 1/4 11/32 3/32 9/32 5/16 1/16 3/32 9/32 1/32 1/8 11/32 1/4 7/32 5/32 5/16 3/16 -1/32 1/16 3/32 9/32 1/32 1/8 11/32 1/4 7/32 5/32 5/16 1/4 7/32 5/32 5/16 3/16 -1/32 1/16 3/32 9/32 1/32)

symm.png

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