[PD] To divide a number in random parts

Matt Barber brbrofsvl at gmail.com
Sat Mar 5 03:57:45 CET 2011

Check out [list-sort] for short lists, [list-shellsort] for much
longer ones (I don't remember at what point the shellsort starts
beating the other one -- maybe if the list has 50 or more entries; but
at any rate they do the same thing).

Also, if you're going to be doing something like this a ton in real
time with long lists, it might be more productive to do all this
manipulation with tables instead of lists (but there isn't yet a
library of ready-made vanilla table abstractions like list-abs, at
least that I know about; it's been on my to do list for a while but
I've been busy with lots of other stuff, and anyway there are lots of
externals which do these things with tables).


On Fri, Mar 4, 2011 at 9:49 PM, Caio Barros <caio.barros at gmail.com> wrote:
> 2011/3/4 Matt Barber <brbrofsvl at gmail.com>
>> > I'm not shure if I understood that. You mean that if I set the "nuber of
>> > subdivisions per beat" as 10 I can't set the number of beats to, say
>> > 8,255?
>> > As far as user's responsibility goes, it doesn't make sense to input
>> > negative numbers, yet it is possible.
>> I think we're saying the same thing, if you're using the comma the way
>> americans use the dot for indicating decimal; did 8,255 mean "8 +
>> 255/1000"?
>> Briefly -- it means that if I set the "subdivisions" to 4 (i.e. the
>> "rhythms" will be quantized to "sixteenth notes"), I will not be able
>> to generate something that lasts a total of 25.2 beats, since 25.2 is
>> quantized to 5 subdivisions per beat ("sixteenth-note quintuplets).
> Oh yes, we are saying the same thing. Sorry for the comma, I always forget
> that. Even in pd sometimes I keep trying to write 0,25 in a number box and
> get angry because it doesn't work.
> One more thing. How hard it is to make possible for the user to choose
> between the random output that you already made and to sort that output from
> the smallest to longest duration and vice-versa?

More information about the Pd-list mailing list