Previous topicNext topic

RotateAxis - Random between -0.01 and 0.01

Questions, comments, feedback, etc.
Post Reply
greatcalzones
Posts: 4
Joined: Thu Sep 16, 2021 6:36 pm

RotateAxis - Random between -0.01 and 0.01

Post by greatcalzones »

Hi all! After searching around a bit and finding a few similar threads, I still can't seem to figure out the expression that I need to have a RotateAxis module between -.01 and 0.01.

I found this thread, but attempting to modify the expression he used has been unsuccessful: https://magicmusicvisuals.com/forums/vi ... dom#p11252

I know that this is solved by an expression and is probably really simple, but I can't figure it out. Any assistance is very much appreciated!!
jameseye
Posts: 20
Joined: Sun Feb 07, 2016 5:22 pm

Re: RotateAxis - Random between -0.01 and 0.01

Post by jameseye »

I am new to expressions.
BUT, I think this might be what you want: .01*sin(20*x)
That will sin oscillate between -.01 and .01.
Change the 20 to something smaller/larger to change the rate of oscillation.
Note: a good way to figure these out is to use this site: https://www.desmos.com/calculator
And keep typing, playing, zooming until something looks right. :)
(I have forgotten all my math!).
Good luck!
-James
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: RotateAxis - Random between -0.01 and 0.01

Post by Sadler »

You don't need to use expressions though of course jameseye is correct with his.

You can use any oscillator modifier (Sine, Triangle or Ramp) which all go from 0 to 1 and back. Then scale it by 0.02 to bring it in the range 0 to 0.02. Then Offset by -0.01 to shift the values in the range -0.01 to 0.01.
greatcalzones
Posts: 4
Joined: Thu Sep 16, 2021 6:36 pm

Re: RotateAxis - Random between -0.01 and 0.01

Post by greatcalzones »

Both of you, thank you very much! I ended up using Sadler's method and it worked perfectly!!
frank_halfwong
Posts: 44
Joined: Wed Apr 21, 2021 5:22 pm

Re: RotateAxis - Random between -0.01 and 0.01

Post by frank_halfwong »

Hi,

I've got a lot of "random" generator of values. The expression I use is as follow (rather than offset).

1- a generator of your choosing, random, sin oss, triangle oss etc
2- (x-.5) = this will allow values to go from -.5 to +0.5
3- scale to your desired value.

Good luck in your projects!
frank
Post Reply