Node: Filter

From Waltz
Jump to navigation Jump to search

The Filter node lets you provide a list of any type to be filtered by a user-defined piece of script. This is useful for filtering out data that is outside a certain range or touches that are older than some amount of time.

Settings

Expected Type Details Default
input Any or List<Any> The value, or list of values, that will be filtered.
filterFunction Boolean A script that is passed a single argument, value. value will be a single item from the input list. Perform any necessary calculations to determine if the value should remain in the output, and return true if it should. You may perform any amount of processing in this script, but the script must return either true or false. If the script does not return, it is assumed that the given value should not be included in the output. return value < 0.5

Parameters

Type Details
output List<Any> Note: The parameter is read-only. The filtered list of values from the input after using the filterFunction.

Functions

Arguments Returns Details
filter(object) Any object - The object to check. Boolean Uses the filterFunction to return either true or false based on the provided object.

Example Usage

No examples provided.

Nodes
Devices ArtNet Input · ArtNet Output · Interactive LED Processor · NDI™ Input · NDI™ Output · OSC Input · OSC Output · Projector · SensorLink · TCP · TUIO Output · UDP Input · UDP Output · Watchout Media Server
Objects LED Tile Layout · List · Map · Random Number · Simulated Touch · Timer · Value · Wave
Operators Blend · Change · Clip · Cluster Tracker · DMX Multiverse Merge · Ease · Filter · Hold · JSON Mapper · JSON Stringify · Logic · Math · Proximity · Range · Rotate · Scale · Shear · Smooth · Touch Mapper · Translate
Scenes External Scene · Material Scene
Materials Graph · Touch Material
Scripting Script Function · Script
Comments Comment