trough Reference

Output a number if less than previous numbers

trough

Examples

Inlets

in1 [bang, number, list]

The input value to compare to the stored value. If input is less than the lowest value received (trough), it is passed and set as the new trough.

in2 [number, list]

Sets the trough value. If a lower value is received in the left inlet, it will become the new trough.

Outlets

out [number]

Left outlet: New minimum values are sent out.

isNew [number]

Middle outlet: If the number received is a new minimum value, the output is 1. If the number received in the left inlet is not a new minimum value, the output is 0.

isOld [number]

Right outlet: If the number received is a new minimum value, the output is 0. If the number received in the left inlet is not a new minimum value, the output is 1.

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

in1 [bang, number, list]

The input value to compare to the stored value. If input is less than the lowest value received (trough), it is passed and set as the new trough.

in2 [number, list]

Sets the trough value. If a lower value is received in the left inlet, it will become the new trough.

See Also

Name Description
trough Output a number if it is less than previous numbers
change Filter out repetitions
ltep Pass less than or equal operator
maximum Output the Highest Value.
minimum Output the Smallest Value.
peak Output larger peak values