How to randomise a value whilst keeping the index of that value static during automation?


    Jun 14 2018 | 4:39 am
    Hello again!
    I have edited this post with another query which I’m hoping somebody could help me with.
    I am using Multislider which outputs a list (16 values in this case) and each step (index) is being automated to move left at every metro bang.
    I am trying to randomise a value whilst keeping the index of that value static, the values of each of the indexes are automated to move along one step at a time, think of the Live.Step object with the left or right message being sent into it.
    The problem I am facing is how to randomise only one of the indexes / steps without it moving along or effecting all the other values that aren't randomised but static in value?
    I tried using [zl nth] object to select one of the numbers in the list to randomise but it keeps moving along due to the [zl rot] rotating the whole list...
    Hmmm, I hope this makes some sense? :)
    I have posted my patch (with no randomisation) just to help visualise what I’m trying to do...

    • Jun 16 2018 | 4:01 am
      I am trying to randomise a value whilst keeping the index of that value static, the values of each of the indexes are automated to move along one step at a time, think of the Live.Step object with the left or right message being sent into it.
      *friendly bump!
    • Jun 16 2018 | 7:43 am
      Here's a patch that randomizes the fifth slider and rotates the others
    • Jun 16 2018 | 8:37 am
      Hmm, after looking at Rick's patch i might not have fully understood your question properly, but here's my contribution. It's a javascript implementation, which freezes a value at a certain location in the list while rotating the others an arbitrary amount. To do that you need to rotate, then swap the value at the frozen location with the value at the frozen location, less the rotation amount. you could probably do this in max vanilla, but I did this in javascript as an exercise. you need to include the js file "freezeElement". Will work for any length list, and any rotation step size. can only freeze one location at a time. Hope it's of use. You could extend the code to do the random value change pretty easily.
    • Jun 16 2018 | 10:34 am
      here's a modified version of the previously posted patch, where you can alter the value of the frozen element using the newVal message
    • Jun 16 2018 | 12:21 pm
      You guys are great, thanks for offering your input. Floating point, I appreciate your interesting offering, haven’t really thought about javascript as it's beyond my knowledge but Rick has nailed it on the head, I wanted to figure out a way of randomising only one of the index's (steps) without being affected by the rotation of the steps and Rick your patch is exactly what I was after..
      Thank you both!
    • Jun 16 2018 | 12:30 pm
      Rick, how would I select an index to randomise with your patch, I can’t seem to figure that out?