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.
you need a list the get from each ? so it carry two numbers ?
you might want to check [funnel] , [spray] help file . it helps to index carried data !
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.
Just seen the edit, cheers for the heads up, i’ll have a look at those objects
my edit doesnt do what u need . i just did not get the idea at first
i might know how to exclude repetitions at all ,but how to control them i would need some time to work it out
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. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 450.3ocsTssaBCCC84zuhp7bGpoPYWdaeGSSUoDOHSkTTpgwFh+8k5j.kcAP SZRsopNm3dNGa2cILdc6Vnim9P5SoL1tDFiB0GfEdmwWJ2NqQ1Qv3l0KqAKO yu0JINag1LuxByPeZlb2n7rTQ9j9Gk48qEt0zmCGQqn7zV+5Mkwz7RqAMxk. syiVsr43Gv5hifsBLx5FBQdXOGUzlF.IhIFjpN8GDPQwnAXaWiQvEgn9P36q .O24ZCxyR40Rybd5y8f1mjzujck1S8ZDaMWzdJmF8ke2cFyOmNOUPheSP+ck Xf2brHxAD1RBfiTU3R56NRYiu8b5Sb4p+IJu3enBGPcHcwjQprRIQo+XNYPU MWi8D288taQVHZ35XxVz9FnzXqcXyJ3FaTCKUdHCbtoEzHi3dx0Fmme3wwTK 2.pJm44NTkDQq10u4meYGJimcnw4SQmlGi7iD96lBiaclVHjfBQsTwFKhk7F s4q+Pg5R5ieZ2VW6Z6rXYIzPLvFUPGpMRT6FmNho7DLKzJEXFZyJcWuhImN+ G65uV1L9JXi3OxFuUIWsZCX6BojHhaD7UeYXZF8p1LnpvsvFcDeYRe11m744 QOkB -----------end_max5_patcher-----------
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 :)
@OP: Max Basic Tutorial 17 can answer many your questions… :)
I’ve worked it out I think, thanks :)
here's the patch now
Forums > MaxMSP