How to Setting File Preferences without opening the Max for Live Device ?

Sabina's icon

Hello people ,

I need help, please, to find a solution for:

The user loads a folder with images in a Max for Live Device.

The problem is :

I do not want the user to open the device and set the File Preferences...

I need a way to do it without opening the device. But...

The live.drop object won't work for this, since it does not work with folders, only with files.

Even if I add the folder in Ableton's project, it won't work, because there is not a specified file path in the Max/Options/File Preferences.

Does anybody can provide a solution o guide to solve this issue ?

Thanks ,

TFL's icon

What if you get the folder's absolute path with [dropfile] or [opendialog], save that path in a [pattr folder_path @parameter_enable 1], and use it with [folder] or [umenu @autopopulate 1] to get its content?

Max Patch
Copy patch and select New From Clipboard in Max.

This way, the folder's absolute path should be saved with the Live set, regardless of its location.

E Pe's icon

hello is that related to this? i still dont know how to fix this, could it be related?

Source Audio's icon

your screenshots show that objects used in your devices are not found.

has nothing to do with loading folder path with files.

something is wrong with your Live/Max installation or preferences.

Sabina's icon

@TFL, The problem is not how to remember a file path, even if the file path is correct, Max won't find the files if the path is not added to the Options/File Preferences/ in Max.

So the quiestion is, how can I add a file path to the Max File Preferences without EDITING/Opening the Max for Live Device ?

Why, because the user most not open the Max for Live Device, it must be ready to use just after loading it.

@E PE, Your case might be related, since your files are not found

TFL's icon

As far as I know you cannot programmatically add folders in the Files preferences, but I still don't see why you would need this in your case: if you provide the absolute file path (starting from the disk drive letter, not just the filename or a relative path), Max/M4L will find the file if it exists, regardless of the Files Preferences. If the file still cannot be opened, then it is likely a security setting to change (in macOS there is this this Files and Folders permission you can change on a per-app basis, in Windows you have the usual user permissions but it's not an issue most of the time).

In short: make sure to store the absolute path of your files/folders, and make sure to use this absolute path when using read messages.

Source Audio's icon

use max dropfile instead of live.drop if you want user to drop that folder

each time that it needs to be found.

or

install that folder into user path like documents and use absolute path to it.

then

~/Documents/My-Folder

then autopopulate umenu, chooser ... whatever

with files inside.