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

hi

Human Interface (gaming) device input

Description

hi allows for input from human interface peripherals (i.e. Trackpad, Keyboard, and others).

Arguments

Name Type Opt Description
device-name symbol opt An argument can be used to specify the object for focus on the hi object.

Messages

bang A bang message will output the current event queue.
int device-index [int]
An incoming int causes the object to focus on the device in the device list with that index.
anything device-name [list]
Sending the name of any device to the hi object will set the object to focus on the specified device.
delta device-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.
clear The message clear will reset all values set using the ignore and delta messages to their default values.
ignore device-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.
menu The menu message causes a device list to be output from the right outlet in a format fit for a umenu object.
poll event-output-delta-time (milliseconds) [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.

Information for box attributes common to all objects

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.

Examples

Affect the pitch and duration of notes

See Also

Name Description
key Report key presses on the computer keyboard
keyup Report key releases on the computer keyboard
Max Comm Tutorial 1: Human-Interface Devices Max Comm Tutorial 1: Human-Interface Devices