newbie Q. weighted probability.

JensD's icon

newbie here
couple of questions if you care to answer

I am attempting to create my first patch, its really simple. but i am missing one link in the chain. how do you create weighted probability; i.e. say i have objects A, B, C, D, and E. in a pile and i wish to pick one randomally, i can do this with 'random' and 'selector'. but lets say i wish to increase B to 3. using a number box. how to i reflect this change.

also how do you import and export these text files i see on the forums, knowing this would be great cause then i can look at other peoples issues and attempt to make sense of it. example:

Max Patch
Copy patch and select New From Clipboard in Max.

any help is much appreciated.

cheers

jens

laonikoss's icon

to copy your patch like this, you select your patch and you choose Edit -> Copy Compressed, and then you just paste it here.

I don't quite understand your question - what do you mean by "increase B to 3"? Do you mean, make it so that it is three times more likely to get B than it is to get any of the other letters?

JensD's icon

ahh wicked cut and paste. sweet

Max Patch
Copy patch and select New From Clipboard in Max.

might best be described with a diagram.

with the current setting each letter has equal opportunity of occurring, i wish to be able to increase the number in the number box, and thus increase the odds that the letter can print, and when it is 0 it has no chance of occurring.
I know the number box is in the wrong spot, it should be earlier in the chain, but its just to illustrate my point.

thanks.

mzed's icon

The table object will act as a weighted probability table, if you send it a bang.

mz