Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Cellular Automaton filters Chord

Featured Replies

Here’s a small technical idea... just with a "random-chord"

(progn
  (setf chord  (rnd-sample-seq 10 (gen-sieve '(c3 g7) '(1 2 4 7 4 2) :type :pitch)))
  
  
  (setf rule30 (cellular-automaton 30 200 '(0 0 0 1 0 1 0 0 0 0)))
  (setf positions (loop for i in rule30
                        collect (position-item 1 i)))
  
  (setf chords (loop for i in positions
                     collect (chordize (position-filter i chord))))

  (pitch-list-plot (flatten chords)  :join-chords t))

https://plato.stanford.edu/entries/cellular-automata/supplement.html

  • AM changed the title to Cellular Automaton filters Chord
  • Author

Here's a little function that generates OMN-Seqs with CA-filter (pos/neg) with a CA-Rhy - both parameters independently.

Have fun - André


(defun cellular-automaton-filter (&key (type 'pos) (n 200) prule pinit lrule linit field (rhy '1/16))
  (progn
    
    (setf n-chords n)
    
    (setf pseq (cellular-automaton prule n-chords pinit)) ;'(0 0 0 0 0 0 1 0 0 0 0 0 0)))
    (setf lseq (cellular-automaton lrule n-chords linit))
    (setf positions (loop for i in pseq
                          collect (position-item 1 i)))
    
  
    (setf chords (if (equal type 'neg)
                     (loop for i in positions
                           collect (chordize (position-remove i field)))
                   (loop for i in positions
                           collect (chordize (position-filter i field)))
                   ))
    
    (setf lengths (loop for i in (flatten lseq)
                        when (= i 1) collect rhy
                        else collect (* -1 rhy)))
  
  
    (make-omn :pitch chords
              :length lengths
              :velocity '(ppp))))
  

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


;; type: pos -> play/chordize the 1-values
(cellular-automaton-filter :type 'pos 

                           :prule 110
                           :pinit '(0 0 0 0 0 1 0 0 1 0 0 0 0 0 0)
                           :field (gen-sieve '(f0 f7) '(6 3 4 6 3 4) :type :pitch)

                           :lrule 26
                           :linit '(0 0 0 0 0 1 0 0 1 0 0 0 0 0 0)
                           :rhy '1/20)


;; type: neg -> play/chordize the 0-values
(cellular-automaton-filter :type 'neg 

                           :prule 110
                           :pinit '(0 0 0 0 0 1 0 0 1 0 0 0 0 0 0)
                           :field (gen-sieve '(f0 f7) '(6 3 4 6 3 4) :type :pitch)

                           :lrule 26
                           :linit '(0 0 0 0 0 1 0 0 1 0 0 0 0 0 0)
                           :rhy '1/32)

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.