Skip to content

Examples for cycles/pcycles #44

Answered by defaultxr
emenel asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the question! Looking at it now, I'm realizing I should probably improve pcycles' docstring to make its functionality more clear; the current one is pretty sparse.

To sub-divide a "step" of pcycles, you'll want to be sure you're using a list rather than a string. So for example:

Flat list of 6 elements. Yields 6 events, each 1/6 dur as expected:

> (next-upto-n (pcycles '(1 - - 2 - -) :repeats 1))
((EVENT :VALUE 1 :DUR 1/6)
 (EVENT :TYPE :REST :DUR 1/6)
 (EVENT :TYPE :REST :DUR 1/6)
 (EVENT :VALUE 2 :DUR 1/6)
 (EVENT :TYPE :REST :DUR 1/6)
 (EVENT :TYPE :REST :DUR 1/6))

List of 4 elements, whose last element is a 3-element sub-list. Also yields 6 events, but the first 3 fit in 3/…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by emenel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants