Jump to content

List Segmentation

Recommended Posts

The following example randomly segments a list of given pitches into progressively increasing sublist of elements. I can't seem to recall a function one could use instead of rnd-repeat that would do the same but not randomly, preserving the original order or pitches => (c4) (d4 e4) (f4 g4 a4), etc.


Thank you!


(setf pitches '(c4 d4 e4 f4 g4 a4 b4 c5))
(setf seq 
       :pitch (rnd-repeat (gen-integer 1 4) pitches)
       :length '(1/16)
       :velocity '(f)
       :articulation '(stacc)
       :span :pitch))


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