# [PD] To divide a number in random parts

Caio Barros caio.barros at gmail.com
Fri Mar 4 04:01:53 CET 2011

```>
> You could try this approach(I also attached a patch with it):
>> 48 = 4 * 10 + 1 * 8
>> so you use
>> n1=random(10)
>> n2 = 10 - n1
>> n3 = random(10)
>> n4 = 10-n3
>> .
>> .
>> n9 = random(8)
>> n10 = 8 - n9
>>
>
> But this makes the odd-ordered chords to start at every 10 seconds. I
> believe that Caio wants something more random than that.
>
>
Yes that's right. And another problem is that all the durations are
integers. I want something without the feeling of (regular) pulsations.

> BTW I have another idea :
>
> initialise all of them to equal or almost equal amounts, then modify the
> delays gradully : pick a donor randomly among delays that aren't already
> minimum ; pick a acceptor randomly among delays that aren't already
> maximum ; give one unit of delay from the donor to the acceptor.
>
>
I was trying to figure out something like that. Now that I think about it,
is more important to have a minimum duration than a maximum because
depending on the minimum I chose, the probability of a chord too long is low
(and bottom line I can always change the result to fit in what I want to
hear).

I'll need to experiment a bit. If I have the time to make a cool patch with
general paramethers I'll share with the list. Unfortunately today I could
not compose.

Caio Barros
-------------- next part --------------
An HTML attachment was scrubbed...