Jump to content

Random movement between notes in time frame

Recommended Posts

Hey everyone,


I want to create movement from f1 to c1 in a timeframe of 5 seconds. How can I generate random note values until 5 seconds are reached? Repetitions of notes should also be possible. Here's what I got so far:


(make-omn :length (rnd-sample 6 '(s -s e q)) :pitch (midi-to-pitch '(65 64 63 62 61 60)))


Thanks in advance,






Link to comment
Share on other sites

;;; quick-function
(defun make-seq (&key (prob 0.5) (possible-pitches (make-scale 'c4 11))) ;; prob = length/rest-weight 
  (make-omn :pitch (rnd-sample 10 possible-pitches)
            :length (gen-length
                     (loop for i in (rnd-sum-to-size 20 10 '(1 2 3 4 5))
                           collect (if (probp prob)
                                       (* -1 i)
            :span :length))

;;; EVAL

(make-seq :possible-pitches (midi-to-pitch (gen-integer 10 110))) ;; with rnd-pitches

of course... with 60bpm

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.

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