pick list (array), n (number_or_nil)
Pick n elements from list or ring. Unlike shuffle, after each element has been picked, it is ‘returned’ to the list so it may be picked again. This means there may be duplicates in the result. If n is greater than the size of the ring/list then duplicates are guaranteed to be in the result.
If n
isn’t supplied it defaults to a size of 1.
If no arguments are given, will return a lambda function which when called takes an argument which will be a list to be picked from. This is useful for choosing random onset:
vals for samples.
Always returns a list-like thing (either an array or ring)
Introduced in v2.10
# Example 1 | |
|
|
# Example 2 | |
|
|
# Example 3 | |
|
|
# Example 4 | |
|
|
# Example 5 | |
|
|