Forums > MaxMSP

Likeliness

September 4, 2012 | 8:23 pm

Hi, This is a simple patch that I made to test that I have got the probability function (not yet included) working correctly.

At the moment, once you click the toggle, 100 bangs trigger the random creation of numbers from 1-4 and the number of each is displayed.

I really need to know what to do in order to make it more likely that say the number 1 is triggered………. so the results may look like;

1. 56 2. 14 3. 19 4. 11

I have tried using the PROB object and lists & i tables etc. but i don't really get it and its mangling my mind.

Cheers

Danny

[attachment=202780,4368]


September 4, 2012 | 8:45 pm

you need a list the get from each ? so it carry two numbers ?

edit:
you might want to check [funnel] , [spray] help file . it helps to index carried data !


September 4, 2012 | 8:51 pm

Ultimately I just want to generate a flow of random numbers (between a specified amount) and be able to control the probability of a chosen number being omitted more often than the rest.


September 4, 2012 | 8:53 pm

Just seen the edit, cheers for the heads up, i’ll have a look at those objects


September 4, 2012 | 8:56 pm

my edit doesnt do what u need . i just did not get the idea at first


September 4, 2012 | 8:57 pm

i might know how to exclude repetitions at all ,but how to control them i would need some time to work it out


September 4, 2012 | 9:26 pm

You can use the table object as a probability table (read about the ‘bang, ‘quantile’, and ‘fquantile’ messages to the table object).

You can also read about it here: Probability distribution

Here’s an example using the numbers you provided

– Pasted Max Patch, click to expand. –

September 4, 2012 | 9:50 pm

Yes, That’s the sorta thing.

I gotta try n figure out how to incorporate it in to the patch.

Will that way allow me to still use the random object as my source, but just incude a ‘weighting’ that favours 1 over 2,3 & 4 say (preferably with a variable degree; perhaps 100 would represent 100 1s every hundred bangs and 0 no 1s, just 2s 3s & 4s)

I hope you get what i mean

Thanks so much. all of your efforts are massively appreciated. Hopefully 1 day i’ll be able to help someone figure something out :)



ak
September 4, 2012 | 9:51 pm

@OP: Max Basic Tutorial 17 can answer many your questions… :)


September 4, 2012 | 10:07 pm

I’ve worked it out I think, thanks :)


September 4, 2012 | 10:34 pm

here's the patch now

[attachment=202798,4370]

Attachments:
  1. Dannysprobabilitytesteranswered.png

Viewing 11 posts - 1 through 11 (of 11 total)