<br><br><div class="gmail_quote">2011/3/3 Caio Barros <span dir="ltr">&lt;<a href="mailto:caio.barros@gmail.com">caio.barros@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hey guys, long time since I posted here.<br>I&#39;ve been trying to think a way to divide a number into random parts.<br>Let me explain myself better:<br>I&#39;m writing a piece where I want 10 chords played during 48 seconds but the duration of each chord should be different.<br>


So I&#39;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.<br></blockquote><div><br>take n random numbers and sum them (n1+n2+n3+...=sum)<br>


divide 48 by that sum (48/sum=x)<br>
multiply each of your n random numbers by x and sum that to get 48<br>
(n1*x + n2*x + n3*x +...=48)<br>gr,<br>
Tim<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Since I&#39;m not expert at math maybe someone can help me.<br>
I want to do this operation with other numbers, therefore a pd patch would be great.<br>
<br>_______________________________________________<br>
<a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br>