plotting a randomly generated envelope curve
What’s the best way to plot a randomly generated envelope curve?
I have a function setup to randomly generate: 1) number of points on the envelope 2) x-values (time values) and 3) y values (between 0-1)
So far, the most likely object seems to be jit.mgraphics. However, it requires that information be sent to it point by point.
Is there a function that would allow me to send it N number of x/y pairs, and plot the resulting shape?
Have a look at the function object, which does what you describe and is designed to control the line~ object (or curve~ object) to make envelopes.
Thanks, Chris, but the function object won’t accept a list of x/y pairs as input.
I could feed them directly to the line~ object, but I wanted to have a graphic image to show my students on how the envelope plot is changing.
Could you do it with LCD? That would definitely allow you to use XY pairs
No problem, just break your list up into x-y pairs with zl, like this.
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 529.3ocwUssbaBCD8Y3qPidl5QRfLw8s9czoSFAH6nLffADotIS92KZEfuL3 fMwo8AjXWoc04bzxxa9d3jx8xFL56neh77dy2yCbYc30a6gKD6SyEMv1vExl FwNINvs11RsoQ8pztF8gUjd251BkNWZfXXGbV1ZF7ROJCZQAjA7OpUh7gbWI LoOoz6drVlZbXLxdDHVHyNERh.K9JB5W8w3N.yepjt.v3wkTYvQTl772nLr0 26991gfqj5IsFSoFOEEoeHEmfHz0VnGC7fQFFuLMRD5cSSExRnhV96tfGnhQ tGfE1fxQo4RQ8sb8NM2YK+5MBziMa.UI9CubCPXGdmRZ32Qk40bjxHqQrOeg +mPYb0KquRkYRQIZIhxYezOpJDDYEhZG2vQrH6KbTL2Ny3cKPru8esUALDRo KrQQ3RTqss5Ti5l5TDMGOnTWqBGSn1NeWlJayKEFnBn+4xcONHf0cBaWE9iR sHIGxD4HtCAiyU5y+aAfXq+SEjlx15zA7zeRH5HDxjMFkV.pzQ6gcxldRkkI g0GpUJTYUkJsoGCTFcEuSTXg1ovH1n0gCR0XoS147I31I.oCbj4XvI6YVBzU Qx6uMCP73Qiu.3yuF8+1POML9eJ7mS7ilA92OzDcGJEtenI7JPCegnw8cunp 5EYcSeJAfz0x64xZq45.vToclPFw0xWTC6+Aea1d2+u.FTUWFA -----------end_max5_patcher-----------
Thank you Christopher!
That was exactly what I needed!
Forums > MaxMSP