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

live.thisdevice Reference

Send a bang automatically when a Max Device is loaded, report device state

live.thisdevice

Description

live.thisdevice reports three pieces of information about your Max Device. A bang message is automatically sent from the left outlet when the Max Device is opened and completely initialized, or when the containing patcher is part of another file that is opened. Additionally, a bang will be reported every time a new preset is loaded or the device is saved (and thus reloaded within the Live application). A 1 or 0 will be sent from the middle outlet when the Device is enabled or disabled, respectively. A 1 or 0 will be sent from the right outlet when preview mode for the Device is enabled or disabled, respectively. Used within Max, live.thisdevice functions essentially like the loadbang object. The middle and right outlets are inactive in this case.

Arguments

None.

Attributes

amxdtype [int]

Max for Live Device Type

Possible values:

0 = 'None'
1 = 'Audio'
2 = 'MIDI'
3 = 'Instrument'

openinpresentation [int]

Open in Presentation

Common Box Attributes

Messages

bang

Sending a bang message to a live.thisdevice object causes it to output a bang message from the leftmost outlet.

(mouse)

Double-clicking on a live.thisdevice object causes it to output a bang message from the leftmost outlet.

getstate

Sending a getstate message to a live.thisdevice object causes it to output the Max Device state from the rightmost outlet.

loadbang

Same as bang.

setwidth

Arguments

width [int]
The setwidth message will dynamically set the width of the Max for Live device.
Note: This width is not automatically saved as part of the preset and/or Live set.
The message setwidth 0 will return to the default condition where the width of the device is calculated by using the devices's visible objects.

See Also

Name Description
Max For Live Max For Live
active
button
closebang
freebang
loadbang
loadmess
thispatcher