Page 1 of 1

"Pausing" rotation during a song

Posted: Wed Jun 02, 2021 7:26 pm
by khilts
Hi all, first post. I have gone through the tutorials and searched the forums, but couldn't find the easy answer I must be missing...

I'm using a slow-speed Sine Osc modifier on a RotateAxis block to get smooth rotation, but I'd like to pause (not reset to zero) the rotation during certain parts of a song and then resume the rotation.

I've figured out how to use Internals | Playback Time and a switch statement to return a certain value depending on the point in time
(conditionals are in seconds and the return value could indicate '1' for rotate and '0' for pause rotation):

*** EXAMPLE ***
switch
{
case (x > 35) and (x < 68) : 1;
case (x > 101) and (x < 134) : 1;
case (x > 168) : 1;
default : 0;
}
*** end EXAMPLE ***

How can I use that return value to pause rotation? Using 'Bypass' on the RotateAxis block would force a discontinuous '0' rotation when the block is bypassed.

Thanks in advance for any help,
khilts

Re: "Pausing" rotation during a song

Posted: Thu Jun 03, 2021 3:42 am
by Sadler
After your expression use a Ramp modifier set to 0. The output of your switch then becomes the rotation speed. It is quite satisfying to use a dollop of smoothing after the expression to give a soft start to the rotation.

Re: "Pausing" rotation during a song

Posted: Thu Jun 03, 2021 10:59 am
by khilts
Thanks for the reply, Sadler. I did eventually come up with a similar (but more clunky) solution:
a global named OscSpeed with the switch statement originally mentioned,
and a global named OscGlobal that defines the osc type (sine osc in my case), uses OscSpeed and an average function for smoothing the rotation speed change.
RotateAxis in my main process then refers to OscGlobal.