thresh

Description

thresh collects items into a list if they appear within a certain specifiable amount of time. Each time an item arrives, the time is reset.

Arguments

Name

Type

Opt

Description

threshold-time

int

opt

Sets an initial value for the threshold time. If no argument is present, the initial value is 10 milliseconds.

threshold-time

float

opt

Converted to int.

Messages

int

input [int]

In left inlet: Numbers are combined into a list if received within a certain time of each other. When the time between incoming numbers is greater than the specified threshold, the list is sent out the outlet, and a new list is started.

(inlet1)

threshold-time [int]

In right inlet: The number is stored as the time, in milliseconds, to wait before sending out the compiled list of numbers. If no new number is received in the left inlet within that time, the list is sent out and a new list is started.

float

input [float]

In left inlet: Numbers are combined into a list if received within a certain time of each other. When the time between incoming numbers is greater than the specified threshold, the list is sent out the outlet, and a new list is started.

In right inlet: The number is stored as the time, in milliseconds, to wait before sending out the compiled list of numbers. If no new number is received in the left inlet within that time, the list is sent out and a new list is started.

list

input [list]

In left inlet: The entire list is appended to the list stored in thresh.