live.drop

Define a region for dragging and dropping a file

Description

The live.drop objects defines a region for dragging and dropping files and outputs the filepath when a file is dropped onto it.

Arguments

None.

Messages

bang Sends the current path out the outlet.
(drag) When a file is selected and dragged from the Live application's File Browser onto a live.drop object in a Max for Live device, the full pathname of the file is sent out the live.drop object's outlet.
The object will also provide the full pathname for a file when its icon is dragged from the Max File Browser or your computer's Finder onto a live.drop object.
The live.drop object can be used with encrypted and encoded samples from Live's File Browser. Encrypted samples will be decrypted, and a temporary filename will be passed from the object's outlet, which can be used by objects in MaxMSP. Note that this temporary file will become invalid 1 minute after the last object (including live.drop) in MaxMSP has stopped using it.
Encoded samples (e.g. .mp3, .flac) are handled similarly, although they are not automatically invalidated after use. Please see the decodemode attribute for more information about encoded samples.
clear Clears the currently stored filepath.
(mouse) To drop a file, click on the name of an audio file or its icon in the Live application's file broswer, drag it onto the live.drop object's display area, and release the mouse button.

When the mouse is positioned over the live.drop object, a round button will appear in the lower right-hand portion of the object's display. The button indicates the enabled or disabled state for dragging and dropping, and is enabled by default. To toggle drag and drop behavior, click on the round button. The button's color (set using the circlecolor and circleoncolor attributes found in the object Inspector) changes to indicate its state.
set filepath-name [list]
The word set, followed by a list that specifies a filepath, sets a filepath to be reported by the the live.drop when it is initialized. The set message allows you to store a filepath as reported by the object in the parameter and display and output the path as if a file had been manually dropped on the object.

Attributes

Name Type g/s Description
bordercolor float Sets the display color for the live.drop object's border in RGBA format.
decodemode int When enabled (default), the live.drop object will attempt to decode non-PCM-audio files dropped on it from Live's file browser (for instance, .mp3, .mp4, .m4v, .mov, .flac, etc.). Decoded files will be cached to a temporary directory on the computer's hard drive. In this case, the filename and path passed out of the object's outlets will refer to the temporary decoded file, not to the original. This feature is limited to file types which Live can decode.
You might wish to disable decodemode if you are using the live.drop object to read, for instance, QuickTime Movie files for use in jit.qt.movie or if you otherwise need the original file data, rather than extracted audio from the dragged file.
focusbordercolor float Sets the color of the live.drop object's border when the object has focus in RGBA format.
legend symbol
def.:Drop Something Here!
Sets the text which appears in the display area of the live.drop object.
textcolor float Sets the color for the text which appears in the display area of the live.drop object in RGBA format.

Information about attributes available for Parameter-aware objects

Information for box attributes common to all objects

Output

symbol: Out left outlet: When an file from the Live application broswer (or a file icon from the Max File Browser or your computer's Finder) has been dragged onto the live.drop object and the mouse released within its box, the absolute pathname of the file is sent out the left outlet as a single symbol (i.e. surrounded by double quotes).
Absolute pathnames look like this:

"C:/Max Folder/extras/mystuff/mypatch.pat"

If you want to use the live.drop object to cause a file to be read by another object that accepts the read message with a filename argument, put a prepend read object between live.drop object and the object that will open a file.

Out right outlet: When an file from the Live application broswer (or a file icon from the Max File Browser or your computer's Finder) has been dragged onto the live.drop object and the mouse released within its box, the file type code of the file is sent out the right outlet.

Examples

See Also

Name Description
dropfile Define a region for dragging and dropping a file