A newer version of Max is available. Click here to access the latest version of the documentation

prepend Reference

Add a message in front of input

prepend

Description

Prepends any input messages with a stored message.

Examples

Symbols can be combined into meaningful messages with prepend

Arguments

message [symbol]

Sets the message to be prepended at the beginning of incoming messages. The first argument must be a symbol.

Attributes

Common Box Attributes

Messages

bang

The message stored in prepend is attached to the beginning of the message received in the inlet, and the combined message is sent out its outlet followed by the word "bang").

int

Arguments

input [int]
The integer stored in prepend is attached to the beginning of the message received in the inlet, and the combined message is sent out its outlet.

float

Arguments

input [float]
The float stored in prepend is attached to the beginning of the message received in the inlet, and the combined message is sent out its outlet.

list

Arguments

input [list]
The list stored in prepend is attached to the beginning of the message received in the inlet, and the combined message is sent out its outlet.

anything

Arguments

input [list]
The message stored in prepend is attached to the beginning of the message received in the inlet, and the combined message is sent out its outlet.

set

Arguments

message [list]
The word set, followed by any message, will replace the message stored in prepend, without triggering output.

Output

anything

The message received in the inlet is combined with the message stored in prepend, and then sent out the outlet. The maximum allowed length of any constructed message is 256 items.

See Also

Name Description
append
message
route