Rounding & Remapping

There will be times where you don’t want a value to exceed a threshold or you might want to change the value to a certain range. For these cases we have Absolute, Negate, Wrap, Clamp, Map and Curve.

Absolute

This node will output the absolute value of the given input. In layman's terms: any negative values will be turned into positive values. -10 becomes 10.  20 stays 20.

Negate

This node will negate the given input. In layman's terms: it flips the value from negative to positive and the other way around. -10 becomes 10. 20 becomes -20.


Wrap

The Wrap node will wrap values around it’s min and max values. If the incoming value exceeds max value of the node the output value will wrap around back to its min value. 

The wrap node is often used in conjunction with the Counter node. The counter node counts up indefinitely on each trigger, but you might want to count from 1 to 4. In this case a Wrap node with a minimum value of 1 and a maximum value of 5 should work.

Clamp

The Clamp node simply puts a hard stop on a value. The incoming value cannot exceed the min and max values of the node. This can be in conjunction with the Patch Settings node to make sure a texture doesn’t move out of the width or height of the patch.

This can be useful when you have a slider that runs from 0 to 1 but goes to multiple inlets. Maybe you don’t want one of the inlets to exceed a threshold.

Map

The Map node is a very versatile node. The input range will be remapped to a new range. The only condition is that you already know what the min and max values of the input are. You could have an input range of between -1 and 1 and map it to be a value between 0 and 100.

Pro tip: A good practice with this node is to have your input sliders always run from 0 to 1 and then remap them to the values that actually work for your patch. Maybe there is a size slider on in your patch, but you probably don’t want the user to set it to 0 and make the content invisible. Remapping 0 to 1 to 0.1 to 1 is a very clean solution.

Curve

The Curve node will take an incoming vale and recalculate it with a curve. These curves are normally found in the envelope editor in Resolume. Again, you need to know what the input range is, but after that the node does the rest and you can use Curve to create all sorts of fun modulations.

Pro tip: Patch the Transport Beat(1/4) into an Attack Release and into the Curve node(bounce) to literally have your content bounce on the beat.

Smooth Step

Those of you that are used to GLSL might already be familiar with this function. This function is a combination of rounding and smoothing values. The node has an input and two edges.

If the incoming value is lower than the first edge, the value is rounded down to 0. If the incoming value is higher than the second edge, the value is rounded up to 1. If the value is in between the edges is smoothed.


Related Articles