input initial values in chaos equation in gen~
Hi there just trying to input some seed values in a gen~ chaos equation. In the left, the normal max code, in the right, the gen~ one. I'm not a frequent gen~ user and I don't get what way to go any help?
Looks like your patch didn't post. It's a bit more handy to paste a copy compressed patch right into the forum text field. Select your patch in edit mode then go to Edit>Copy Compressed
Seems like you're assigning a new value to the live gen params. Changing the codebox to this resolves the errors . . . not quite sure how you're hooking up the outside of the gen~ to your metro right off the bat though. . . . . .
x=x1;
y=y1;
z=z1;
nx = (z-b)*x;
ny = d * x + (z-b)*y;
nz = c + a*z - pow(z,3)/ 3 - pow(x, 2) + f * z * pow(x, 3);
out1 = x + dt*nx;
out2 = y + dt*ny;
out3 = z + dt*nz;
Hmm doesn't produce the same thing on the right. The problem is that x1, y1, z1 is the seed so it's used only the first time then it loops adding the following iterations. Or maybe I miss your solution.
the formula is:
dx = (z-b) * x - d*y
dy = d * x + (z-b) * y
dz = c + a*z - z3 /3 - x2 + f * z * x3
There's something about the seeded feedback I'm not getting. I tried this. . . .
Have you seen the gen~.chaos patch in examples/gen?
hi no but it's real cool! Trying to understand what they did, but I think it's easier for me in code to translate formulas than objects :)
I tinkered with this a little more. The else block in the codebox in the last thing I posted was killing the feedback, seed values can be an argument in the history objects. Still haven't gotten it worked out though.
Yep, reverse engineered Lorentz example and arrived to this:
Maybe there is a way to encapsulate History in the code but have to understand its logic. Also got rid of the if outside but has a strange effect.
Hi guys, history and params has to be declared at the beginning of a codeblock, and then they should work the same as if put in boxes. I just copied code from Code sidebar, changed inN to corresponding var names and it seems to work (very similar output, but not exactly the same). In addition this version stays stable for all presets in preset object.
Interesting that the fully codeboxed example handles the third preset better than the one with history in patcher objects. Also these gen~ patches run without any signal input now.
Very cool y'all.
Yeah!