input initial values in chaos equation in gen~


    Feb 22 2018 | 11:54 pm
    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?

    • Feb 23 2018 | 1:12 am
      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
    • Feb 23 2018 | 7:37 pm
    • Feb 23 2018 | 8:07 pm
      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;
    • Feb 23 2018 | 9:00 pm
      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
    • Feb 23 2018 | 10:38 pm
      There's something about the seeded feedback I'm not getting. I tried this. . . .
    • Feb 23 2018 | 10:55 pm
      Have you seen the gen~.chaos patch in examples/gen?
    • Feb 23 2018 | 11:28 pm
      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 :)
    • Feb 24 2018 | 1:18 am
      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.
    • Feb 24 2018 | 9:55 am
      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.
    • Feb 24 2018 | 3:58 pm
      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.
    • Feb 24 2018 | 4:34 pm
      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.
    • Feb 24 2018 | 7:17 pm
      Yeah!