Posted March 31Mar 31 I wrote a script to reproduce Steve Reich's "Clapping Music" by brute forcing a list of rhythm permutations. Is there a single command that would do the same? ;; ---------------------------------------------------------;; Welcome to the Composer panel.;; This is the space where you write your score.;; ---------------------------------------------------------(setf Clap1 '(e g4 e e -e e e -e e -e e e -e ))(setf Clap2 '( ( e c4 e e -e e e -e e -e e e -e ) ( e e -e e e -e e -e e e -e e ) ( e -e e e -e e -e e e -e e e ) ( -e e e -e e -e e e -e e e e ) ( e e -e e -e e e -e e e e -e ) ( e -e e -e e e -e e e e -e e ) ( -e e -e e e -e e e e -e e e ) ( e -e e e -e e e e -e e e -e ) ( -e e e -e e e e -e e e -e e ) ( e e -e e e e -e e e -e e -e ) ( e -e e e e -e e e -e e -e e ) ( -e e e e -e e e -e e -e e e ) ( e e e -e e e -e e -e e e -e )))(setf RepClap1 (gen-repeat (length Clap2) Clap1))(ps 'gm :p (list RepClap1 Clap2) :time-signature '(6 4) :tempo 160)
March 31Mar 31 This perhaps(setf Clap2 (loop for i from 0 downto -12 collect (gen-rotate i (pitch-transpose -7 Clap1))))less calculations:(setf Clap3 (loop with clap = (pitch-transpose -7 Clap1) for i from 0 downto -12 collect (gen-rotate i clap)))Or repeating every pattern 8 times.((setf Clap3 (omn-to-measure (loop with clap = (pitch-transpose -7 Clap1) for i from 0 downto -12 collect (gen-repeat 8 (gen-rotate i clap))) 6/4))Jesper
March 31Mar 31 Solution:(setf clap1 '(e g4 = = - = = - = - = = -)) (setf clap2 (gen-rotate 12 '(e c4 = = - = = - = - = = -) :type 'list))or(setf cl1 '(e g4 = = - = = - = - = = -)) (setf cl2 '(e c4 = = - = = - = - = = -)) (setf r-num (length (single-events cl2))) (setf r-cl2 (gen-rotate (1- r-num) cl2 :type 'list)) (setf r-cl1 (gen-repeat (length r-cl2) (list cl1))) (ps 'gm :p (list r-cl1 r-cl2) :time-signature '(6 4) :tempo 160 )quite simple to do :-)
April 1Apr 1 Author Thank you! I don't know why gen-rotate didn't show up in my search. I knew there was an elegant solution!
April 1Apr 1 Also this solution, from Book 2:;;;-------------------------------------------------------- ;;; Study and Practice in Composition with Opusmodus - Book 2 ;;; Julio Herrlein ;;; ISBN 9791280270566 ;;; Score Examples (code) ;;;-------------------------------------------------------- ;;; 2.4. Reich's Clapping Music - PCS-Rhythm ;;;-------------------------------------------------------- (progn (setf cell 1) ;; Clap 1 Ostinato/Timeline Voice (setf rhy1 (pcs-rhythm '8-26 :rotate 9)) (setf aug1 (length-augmentation 2 rhy1)) (setf rep1 (gen-repeat (* 13 cell) aug1)) (setf clap1-ostinato (omn-to-time-signature rep1 '(6 4))) ;; Clap 2 Variation Voice (setf rhy2 (pcs-rhythm '8-26 :rotate '(9 8 7 6 5 4 3 2 1 0 11 10 9))) (setf aug2 (length-augmentation 2 rhy2)) (setf rep2 (gen-repeat cell aug2)) (setf clap2-rotate (omn-to-time-signature aug2 '(6 4))) ;; To find the length of the repetitions (get-count clap2-rotate :sum t) ;; Preview Score (ps 'gm :rhy (list clap1-ostinato clap2-rotate) :key-signature '(c maj) :tempo 88 :time-signature '(12 8)) )
Create an account or sign in to comment