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

hi Reference

Human Interface (gaming) device input

hi

Description

Provides input from human interface peripherals (i.e. Trackpad, Keyboard, and others).

Examples

Affect the pitch and duration of notes

Arguments

device [symbol]

Optional

An argument can be used to specify the object for focus on the hi object.

Attributes

Common Box Attributes

Messages

bang

bang message will output the current event queue.

int

Arguments

index [int]
An incoming int causes the object to focus on the device in the device list with that index.

anything

Arguments

device [list]
Sending the name of any device to the hi object will set the object to focus on the specified device.

clear

The message clear will reset all values set using the ignore and delta messages to their default values.

delta

Arguments

element [int]
The word delta, followed by an integer that represents an element of the device will cause the hi object to report an event from the specified element only if it is different then the last value that was reported.

ignore

Arguments

element [int]
The word ignore, followed by an integer that represents an element of the device, disables event reporting from the specified element.

info

The info message causes device information to be output to the Max console.
The menu message causes a device list to be output from the right outlet in a format fit for a umenu object.

poll

Arguments

output-time [float]
The word poll, followed by a number, sets the time in milliseconds between outputs of the event queue. The message poll 0 disables automatic polling.

Output

list

The object collects data from the selected device and will output all collected data when a bang or a timing trigger from to a poll message is received. Data is output as a two-element integer list; he first element represents the element of the device to which the data applies, and the second element represents the data value.

See Also

Name Description
Using Max with Hardware Using Max with Hardware
key
keyup
Max Comm Tutorial 1: Human-Interface Devices Max Comm Tutorial 1: Human-Interface Devices