Hi, I have a question about making a random IDM drum sequencer.
The main idea is to generate 4 bar array with duration; it plays around 16 bars.
And after that, regenerate the 4 bars with array(duration).
my Idea to make an array, set duration as [0.5, 0.125, 0.25, 1] as the array, choose a number till the total sum of reaching to 4, and loop four times
and it reaches to 16, regenerate the duration array.
I think the “for” iteration loop can handle this issue, but I think It has a more easy way to handle this idea.
does anyone know the easy and elegant ways in supercollider?
(
~func = {
arg bar_len = 4;
var durations = [0.5, 0.25, 0.125];
var sequence = [];
var sum = 0;
var next = 0;
(sum < bar_len).while {
var next = durations.choose;
sequence = sequence.add(next);
sum = sum + next;
//sequence;
// next = next +1;
};
// sum.postln;
};
)
this is my idea, do you think it works retrun th values of array?
and error message of the code
ERROR: While was called with a fixed (unchanging) Boolean as the condition. Please supply a Function instead.