[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] array to emulate accelerando or ritenuto



answering my own question...I could not find any better than this:

~bar = 4;

~start = 0.25;

~end = 0.75

~num = 10;

~len = ~bar - ~start;

f = {|start, end, len|  (1..len).linexp(1, len, start, end)}

g = [~start ]++ (f.value(~start, ~end, ~num-1).normalizeSum*~len);

g.sum;

///////////////////////////////////////////////////////////


On 19 September 2010 21:22, Fabrice Mogini <fmogini@xxxxxxxxxxxxxx> wrote:
what about a fixed sum for the array?

f = {|start, end, len|  (1..len).linexp(1, len, start, end)}

// here trying to get a four sec bar

f.value(0.125, 1, 8).normalizeSum*4


but the first value has now changed of course,

would it still be possible then to get an array that starts with a fixed value of 0.125?