2011/3/3 Caio Barros <[email protected]> > Hey guys, long time since I posted here. > I've been trying to think a way to divide a number into random parts. > Let me explain myself better: > I'm writing a piece where I want 10 chords played during 48 seconds but the > duration of each chord should be different. > So I'm trying to figure out a way to divide 48 into 10 unequal parts, I > think using random numbers should be the best way but the difficulty is to > get 10 random numbers wich summed give 48. >
take n random numbers and sum them (n1+n2+n3+...=sum) divide 48 by that sum (48/sum=x) multiply each of your n random numbers by x and sum that to get 48 (n1*x + n2*x + n3*x +...=48) gr, Tim > Since I'm not expert at math maybe someone can help me. > I want to do this operation with other numbers, therefore a pd patch would > be great. > > _______________________________________________ > [email protected] mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list > >
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
