Wim Dijkgraaf Posted April 21, 2016 Share Posted April 21, 2016 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 Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted April 21, 2016 Share Posted April 21, 2016 Hi, may be this can do what you want: (make-scale 'c4 14 :alt '(13 -11) :type :pal) SB. JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
AM Posted April 21, 2016 Share Posted April 21, 2016 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)))) JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
Rangarajan Posted April 21, 2016 Share Posted April 21, 2016 WOW, SB! -Rangarajan Stephane Boussuge 1 Quote Link to comment Share on other sites More sharing options...
Wim Dijkgraaf Posted April 21, 2016 Author Share Posted April 21, 2016 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 Stephane Boussuge, JulioHerrlein and lviklund 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.