thresh

Combine numbers into a list when received close together

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.

Information for box attributes common to all objects

Output

list: Each number received in the left inlet is appended to a list stored by thresh. If a certain time passes without a new number being received, thresh sends out the list and starts a new list.

Examples

If threshold time is exceeded without a new number being received thresh sends out what it holds

See Also

Name Description
bondo Synchronize a group of messages
buddy Synchronize arriving data, output them together
iter Break a list up into a series of numbers
pack Combine numbers and symbols into a list
quickthresh Fast chord detection
zl Multi-purpose list processing