|
Random -copy-paste work aroundWhat is the best way (or your way) to work around the fact that QC copies the same seed when a random controller is copied? It is really unsustainable to drag in a new instance of "random controller" for large patches and macros. Thanks, this forum is a great resource, First time poster long time reader.
|
This DRIVES ME INSANE as well! :) I'm glad I'm not alone in this.
As far as I know, there's no workaround. We might be able to modify the inspector panel to add this sort of thing though.. not sure how that would work, exactly. There are some other alternatives as well (code-wise, not really UI-wise).
The JavaScript Math.random() function is a potential alternative to the QC random patch. The JS method seems to work fine inside an Iterator, too, unlike the buildin random source.
a|x
...is it likely to be quicker to generate a list of random values using a single JS script and passing them in to an Iterator as a structure, or to use a JS script inside the Iterator to do a similar job?
a|x
I'm not very knowledgeable in the javascript area, what is the simplest piece of code to generate random numbers?
I'm coming from more of a Max/MSP background, and would love a random ramps (like line or line~ in MSP) that generates a new ramp each time one is completed.
I suppose this could use the interpolation patch and a random object that generates new values only at the end of a ramp. Any suggestions?
Constant Random
The following JavaScript code will generate a single (constant) random value between 0 and 1:
If you cut-and-paste this JavaScript patch, each instance will generate a different constant random number.
Varying Random
If you want the random number to change with every frame, use the following code:
...and connect a Patch Time to the JavaScript patch's input. (This forces the JavaScript code to reevaluate for each frame, whereas without the Patch Time input, the JavaScript code is only evaluated during the first frame.)
Linear-Interpolated Random Values
For something like what caseyfarina described in the above comment, try this code:
and see the attached composition.
Smokris is the Man, Seriously thanks that last patch is exactly what I've been trying to build in QC. That is going to save lots of work. Indeed a great work around. Thanks again, Casey