wondering if someone can help me out with this.. i believe rand works by generating a random number string that can be applied to something, but is not truly random in the sense that a random number is picked each for each value each time a value is called.
in practice this means, if i have # pan rand applied in two places in my code they will "randomly" pan together/in sync.
what i'm looking for is a way to invert one of those values. so in practice one would pan right when the other pans left, by equal amounts.
cool. let me see if i understand what this does correctly... this adds x (let's say 1) to each number generated by the rand function? i'm assuming i delete that x after let shrand (that's the only way i could get it to work for me.
not quite. x is the number of cycles shifted so you can grab a new random value that's different from the one currently running on the pattern you don't want it to be shared with. the x value is kind of not important. it could be 1, it could be 10,000; what's important is that it's grabbing the rand value of some future cycle.
ok, thanks for the explanation!
if i'm understanding correctly then that would ensure you get a different set of random numbers, for whatever has shrand applied to it.
so -- what would be the best way to get the inverse value of the rand i have applied somewhere in my code so far?
oh, ok, i see you are trying to do something quite specific with the panning. i thought you were just looking for a workaround to the not-quite-random rand...if i were you, i'd test out some of the continuous patterns like saw and isaw to sync up your pans.