Posted April 21, 20169 yr Hi all, I'm new to Lisp and new to OpusModus but have over 20 years of programming experience and an academic degree in composition. I'm having a great time learning Lisp and getting a better feel for the power of using OpusModus. As an exercise, I would like to be able to program functions that generate Slonimsky patterns. For example pattern 648: c4 cs5 d4 ds5 e4 es5 (from c4 to c5 and back to c4). (see attached image) Instead of making it a data list I would like to be able to program a Lisp function that generates the pattern. Maybe someone on this forum can give me a jump start. Many thanks in advance, Wim Dijkgraaf
April 21, 20169 yr Hi, may be this can do what you want: (make-scale 'c4 14 :alt '(13 -11) :type :pal) SB.
April 21, 20169 yr in lisp -> create OMN with (midi-to-pitch)... (setq half-row (loop repeat 13 with interval with stack = 60 with cnt = 0 when (oddp cnt) do (setq interval 13) when (evenp cnt) do (setq interval -11) when (= cnt 0) collect stack else collect (setq stack (+ stack interval)) do (incf cnt))) (midi-to-pitch (append half-row (reverse (butlast half-row))))
April 21, 20169 yr Author This is a great learning experience. Both SB and AM thank you so much!!!! Worked on page 90 of Slonimsky's book to further discover what can be done with make-scale and came up with the following: ;; Slonimsky 648 (make-scale 'c4 14 :alt '(13 -11) :type :pal) ;; Slonimsky 649 (make-scale 'c4 14 :alt '(13 13 -11 -11) :type :pal) ;; Slonimsky 650 (make-scale 'c4 13 :alt '(13 13 13 -11 -11 -11) :type :pal) ;; Slonimsky 651 (make-scale 'c4 13 :alt '(1 13 -11) :type :pal) ;; Slonimsky 652 (make-scale 'c4 13 :alt '(13 -11 1) :type :pal) ;; Slonimsky 653 (make-scale 'c4 13 :alt '(13 1 -11) :type :pal) ;; Slonimsky 654 (make-scale 'c4 13 :alt '(1 1 13 1 1 -11) :type :pal) ;; Slonimsky 655 (make-scale 'c2 13 :alt '(11 -1 11 -1) :type :pal) ;; Slonimsky 656 - has mismatch with original -> to be checked why (make-scale 'c2 14 :alt '(11 11 -13 11) :type :pal) ;; Slonimsky 657 - has mismatch with original -> to be checked why (make-scale 'c2 14 :alt '(11 11 11 11 -13 -13 -13) :type :pal) It makes my day :-) Wim Dijkgraaf
Create an account or sign in to comment