Jump to content

Featured Replies

Posted

dear all

here's a function (revised, should work correct now) to work with rotations - based on the work of karel  goeyvaerts

 

(defun goeyvaerts-rotation* (&key pitches 
                                 static-pitches
                                 generations
                                 goeyvaerts-transpose-interval
                                 (direction 'up)
                                 low-border
                                 high-border
                                 correction-interval)

  (let ((pitches (filter-remove (pitch-to-midi static-pitches) (pitch-to-midi pitches))))
    (midi-to-pitch (append  (list (append pitches (pitch-to-midi static-pitches)))

                            (cond ((equal direction 'up)
                                   (loop repeat generations
                                     for x in (gen-repeat 50 goeyvaerts-transpose-interval)
                                     collect (append 
                                              (setf pitches (append (loop for i in pitches
                                                                      
                                                                      when (> (+ i x) (pitch-to-midi high-border))
                                                                      collect (+ x (- i (abs correction-interval)))
                                                                      else collect (+ i x))))
                                              (pitch-to-midi static-pitches))))

                                  ((equal direction 'down)
                                   (loop repeat generations
                                     for x in (gen-repeat 50 goeyvaerts-transpose-interval)
                                     collect (append 
                                              (setf pitches (append (loop for i in pitches
                                                                      
                                                                      when (< (- i x)  (pitch-to-midi low-border))
                                                                      collect (+ i correction-interval)
                                                                      else collect (- i x))))
                                              (pitch-to-midi static-pitches)))))))))

 

EXAMPLE:

 

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

;;; an example with multiple objects inside a chord / GOEYVAERTS uses it woth octave-rotations and with static pitches
;;; here i do it different....

;;; :goeyvaerts-transpose-interval => in every generation the elements are transposed by next interval (circular)
;;; :static-pitches =>  will not rotate!!
;;; :high-border => if a pitch  is higher then this it will be transposed down by :correction-interval

;;; EVALUATE THIS

(setf groups (loop for i in (goeyvaerts-rotation* :pitches '(b3 d4 eb4 gb4 f5 e5 g5 ab5 a4 bb4 db5 c6)
                                                  :static-pitches nil;'(e4 eb5)
                                                  :direction 'up
                                                  :generations 20
                                                  :goeyvaerts-transpose-interval '(2 3 5 7 5 3)
                                                  :low-border 'a2
                                                  :high-border 'eb6
                                                  :correction-interval -36)

               collect  (gen-divide '(5 3 2 2) i)))

;;; AND THIS / cmd1 => so you see the chords an see the rotation etc..

(setf chordized-groups (loop for i in groups 
                         collect (chordize i)))


=> you see the process of the elements

 

 

50686864_Bildschirmfoto2021-02-06um11_26_02.thumb.png.12ab5fda7919b2b8a5abaa3ab1ae3a2b.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