pattrhub

Access all of the pattr objects in a patcher

Description

Once you have a patcher full of pattr objects, the pattrhub object can be used to centralize communication with them. The pattrhub object has a single inlet and two outlets. The inlet is used for all incoming messages. Messages that can be understood by a pattr object within the pattrhub object's patcher (e.g. get or set messages) will be automatically forwarded to that object, and any response will be sent from the pattrhub object's right outlet.

Arguments

None.

Messages

bang A bang is passed through the pattrhub object and output from its left outlet.
int input [int]
An int is passed through the pattrhub object and output from its left outlet.
float input [float]
A float is passed through the pattrhub object and output from its left outlet.
list input [list]
A list is passed through the pattrhub object and output from its left outlet.
anything arguments [list]
Incoming messages to the pattrhub object are analyzed. If the first element of the message matches the name of a pattr- or autopattr-maintained object, the subsequent arguments in the message set that object's value. If the first element of the message matches get (name), where (name) matches the name of a pattr- or autopattr-maintained object, the value of that object is sent from the pattrhub object's right outlet, preceded by the object's name. Otherwise, the message is passed through the pattrhub object and output from its left outlet.
getattributes target-name(s) [list]
The getattributes message causes a list of all pattr- or autopattr-maintained object names to be output from the pattrhub object's right outlet, preceded by the symbol attributes.
getstate target-name(s) [list]
The getstate message causes a series of lists to be output from the pattrhub object's right outlet -- one for every pattr- or autopattr-maintained object in the patcher containing the pattrhub object. Each list begins with the name of the object, and is followed by the object's current value.

Attributes

Name Type g/s Description
patcher symbol The word patcher, followed by a symbol describing a valid path to a patcher, sets the patcher referenced by the pattrhub object. The default is the special symbol this, which represents the patcher the pattrhub object resides within. The pattrhub object can refer to patchers other than the one in which the object resides. A double-colon syntax ('::') is used to separate levels of patcher hierarchy. See the pattrhub help file for further information on this feature.

Information for box attributes common to all objects

Output

anything: Out left outlet: Any message not matching a get or set request to a pattr- or autopattr-maintained object in the pattrhub object's patcher is passed through the left outlet unchanged.

Out right outlet: get queries to the a pattr- or autopattr-maintained object in the pattrhub object's patcher are output from the right outlet, also known as the dumpout outlet.

Examples

See Also

Name Description
autopattr Expose multiple objects in a patcher to the pattr system
pattr Patcher-specific, named data wrapper
pattrforward Send any message to a named object in the patcher hierarchy
pattrmarker Create pattr 'share points' and communicate between patcher hierarchies
pattrstorage Save and recall presets of pattr data
Max pattr Tutorial 1: Patcher Storage Max pattr Tutorial 1: Patcher Storage