I have two issues with generating pattern with array.
(
~funcB = { arg len = 16;
var n = Array.fill(len, {arg i ; i});
var m = Array.fill(rrand(4, len-1), {n.choose}).sort;
var randNum = rrand(0, len);
m.postln;
};
)
~funcB.();
I would like to make an array with only one number in an array. is there any methods to do that?
(
~funcC = { arg len = 16;
var n = Array.fill(len, {arg i ; if ([true,false].choose, {i}, {0})}).sort;
n.postln;
};
)
which method will be works removing specific item in array? I would like to remove in all “0” in this array
I miss typed the question. number 0 to 16, I want to get a only one number at once for a set of [0…16] I would like to array like [2, 3, 6, 12] or [2, 4, 5, 11, 12,15] not [2, 2, 3, 4, 5, 5, 5]
and thank you so much you solve so many my weird question
And If I get an array [2, 3, 5, 6, 13], is there any method to check specific values in the array? like python method?
for example, I would like to condition statment, like If or switch after generating the array!