Previous topicNext topic

How to cycle specific input values?

Questions, comments, feedback, etc.
Post Reply
dj0le
Posts: 53
Joined: Sun Jan 31, 2016 9:46 am
Location: Tuzla, Bosnia & Herzegovina

How to cycle specific input values?

Post by dj0le »

Hey guys

I've been using ramp to create 'timeline' animations similar to the effect in Resolume Arena. Unfortunately, I can't figure out how to modify it other than the speed. I'm hoping you can help me out with a few questions:

1. What modifiers should I use on a parameter (using no source as the input) so that it cycles between an exactly specified min/max range. For example, what if I want to ramp between 0.015 - 0.310 instead of 0.000 - 1.000 over and over?

2. Similarly, how do you do the same thing with an input parameter that has a range greater than 1.0?

Say the input value ranges from 0 to 100, but I want to only cycle between 20 - 65. How do I
A) set those min and max values, and
B) step through it 1 whole number at a time (ie - 20-21-22 etc and not 20.00 - 20.01 - 20.02)?

3. Is there a way to set up ramp so it counts up and then down between the values without changing speed? I messed around with the oscillators thinking that would work, but I couldn't figure out how to maintain a uniform speed as it cycled.

Thanks!

-djole
artnik
Posts: 268
Joined: Tue Jan 05, 2016 5:33 pm

Re: How to cycle specific input values?

Post by artnik »

Screen Shot 2016-02-10 at 10.47.11 AM.png
Screen Shot 2016-02-10 at 10.47.11 AM.png (33.72 KiB) Viewed 3628 times
This is the answer to your second question, but the principle is the same for the first.

You need to design a stack of modifiers to achieve your goal:
  • The INCREASE can be considered the "Frames per second" as it is how much the value will increase over 1 second. Set it to your desired FPS.
    The OFFSET is the starting point (20). This value is always added to the output and defines the minimum end.
    The WRAP is the end point (65). If the specified value is exceeded it wraps to zero. (It's actually a MODULO operation returning the remainder).
    The STEP is a limiter that rounds the value to the nearest whole multiple of the value.
When you want to achieve complex number sequences, using a stack of modifiers can usually get the job done. For decimal ranges, or negative numbers, apply a SCALE modifier at the bottom of the stack, using an appropriate value. Unless you want audio to affect the output, remember to set the SOURCE to (NO SOURCE) so only the modifier stack generates the values.

Here's an example of using a TRI Oscillator to count up and down from 20 to 65 to 20.
Screen Shot 2016-02-10 at 12.20.05 PM.png
Screen Shot 2016-02-10 at 12.20.05 PM.png (36.41 KiB) Viewed 3622 times
Cheers!
Magic
Site Admin
Posts: 3441
Joined: Wed Apr 09, 2014 9:28 pm

Re: How to cycle specific input values?

Post by Magic »

Yup that's mostly correct, although for the Ramp/Sin/Tri modifiers, you don't need the Wrap after the Offset. You also don't need the Step if the parameter accepts whole numbers only (as is the case with the JpegFolder Index), because the value is automatically rounded down.

Here is the simplest case:
Screen Shot 2016-02-10 at 9.32.21 AM.png
Screen Shot 2016-02-10 at 9.32.21 AM.png (32.79 KiB) Viewed 3620 times
You can see that 35.267 becomes 35.

And here is basically the same concept, but using a Ramp instead of a Tri, and using values below 1 instead of above:
Screen Shot 2016-02-10 at 9.36.04 AM.png
Screen Shot 2016-02-10 at 9.36.04 AM.png (26.96 KiB) Viewed 3620 times
So that would be the answer to your first question. The general formula is to start with your oscillator of choice, then scale by the range (.31-.015 = .295), then offset to set the starting point (.015).

The answer to your third question would be to just replace Ramp with Tri Osc.
artnik
Posts: 268
Joined: Tue Jan 05, 2016 5:33 pm

Re: How to cycle specific input values?

Post by artnik »

Thanks for the clarification Eric. :-)
Post Reply