Jump to content

reading-list-by-steps


Recommended Posts

the "STEP-TO"-idea could be used more common... with other parameters...welcome to extend/develop it...

for mulidimensional/multiparametrical rnd-walks (first example)? :-)

 

;;; FUNCTION -> same as  step-to-pitch

(defun reading-list-by-steps (&key steps values start)
  (let ((pos (car (position-item start values))))
    (append (list (nth pos values))
            (loop for i in steps
              do (setf pos (+ pos i))
              when (> pos (length values))
              do (setf pos (+ 0 i))
              collect (nth pos values)))))



;;; EXAMPLES

;;; rnd-walk all parameters

(make-omn :length (reading-list-by-steps :steps (gen-walk 4 :start 1)
                                         :values '(1/32 2/32 3/32 4/32 5/32 6/32)
                                         :start 3/32)

          :pitch (reading-list-by-steps :steps (gen-walk 4 :start 2)
                                        :values (expand-tonality '(b3 messiaen-mode6))
                                        :start 'ds4)

          :velocity (reading-list-by-steps :steps (gen-walk 4 :start 1)
                                           :values '(pppp ppp pp p mp mf f ff fff ffff)
                                           :start 'ppp)

          :articulation (reading-list-by-steps :steps (gen-walk 4 :start 1)
                                               :values '(ponte tasto spicc ord pizz snap)
                                               :start 'tasto))




;;;; separeted examples

(reading-list-by-steps :steps (gen-walk 4 :start 1)
               		:values '(pppp ppp pp p mp mf f ff fff ffff)
               		:start 'ppp)

;; => depends on rnd-walk values


(reading-list-by-steps :steps '(1 1 -1 2 2 -1 1)
               		:values '(a b c d e f g)
               		:start 'b)

;; => (b c d c e g f g)


(reading-list-by-steps :steps '(1 1 -1 2 2 -1 1)
               		:values '(1/32 2/32 3/32 4/32 5/32 6/32)
               		:start 3/32)

;; => (3/32 1/8 5/32 1/8 3/16 3/32 1/16 3/32)




(reading-list-by-steps :steps '(1 1 -1 2 -1)
               		:values '(ponte tasto spicc ord pizz snap)
               		:start 'tasto)

;; => (tasto spicc ord spicc pizz ord)

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy