itoa Reference

Convert integers to UTF-8 (Unicode) characters

itoa

Description

Converts a stream or list of up to 256 integers into a symbol.

Examples

Collect typed keys into a symbol (output with return key).

Discussion

This can be useful for formatting sysex bytes into a message for display purposes. The leftmost inlet accepts either a list of integers or an individual int, and immediately translates and transmits them/it. It also responds to bang, outputting the currently stored symbol. The rightmost inlet is used to set the output symbol, but unlike the left inlet it does not cause output. The middle inlet appends characters to the currently-stored symbol, either by list or one character at a time.

Arguments

None.

Attributes

utf8 [int] (default: 0)

Input is UTF-8

Common Box Attributes

Messages

bang

In left inlet: a bang message can be used to trigger the output of the currently stored string of ascii characters as a symbol.

int

Arguments

input [int]
In left inlet: The integer is interpreted as an ASCII character which is stored internally and sent out the outlet as a symbol.

In middle inlet: The integer is interpreted as an ASCII character which is appended to the internally stored character string. No output is triggered.

In right inlet: The integer is interpreted as an ASCII character which is stored internally, replacing the previously stored character string, but not output.

float

Arguments

input [float]
Converted to int.

list

Arguments

input [list]
In left inlet: Each value in list of integers sent to the left inlet is interpreted as an ASCII character and stored internally as an ASCII character string, replacing the previously stored character string, and output as a symbol.

In middle inlet: A list of integers sent to the middle inlet will be converted to ASCII characters and appended to the current internally-stored character string, without causing output.

In right inlet: A list of integers sent to the right inlet will be converted to ASCII characters and stored internally as an ASCII character string, replacing the previously stored character string, without triggering output .

clear

Arguments

input [list]
In left inlet: The clear message is used to clear the contents of the internally-stored string of ascii characters.

Output

symbol

The ASCII character string converted from the input is sent out as a symbol.

See Also

Name Description
atoi
key
keyup
message
regexp
spell
sprintf
Max Basic Tutorial 8: Keyboard and Mouse Input Max Basic Tutorial 8: Keyboard and Mouse Input
Max Comm Tutorial 2: Serial Communication Max Comm Tutorial 2: Serial Communication