Automatically Create Folder For Save Location
I'm making a Max For Live patch that records audio, independently of Live (sfrecord~), and saves it to a location. I've got it working with an [opendialog] but it'd be great if the user didn't have to specify where to save it every time the patch is loaded. E.g., within Ableton's User Library folder.
Thanks!
If it's for your own use, just manually create that folder
and use absolute path to it to write files.
If you want that to work on other machines, than
use shell or something similar like jasch's createfolder external to auto create that folder.
I am not using Live, but I guess that it dictates where that user library is, or ?
You can use sprintf or combine to make full path out of
that folder's path and audio file name.
Mind you - sfrecord~ will overwrite any file without warning
when it receives message open with the path appended.
If that is issue, than you could first check if file allready exists
or not.
Hey, thanks for your reply.
It would be for use on other peoples' machines, yes. I'm taking a look at shell currently, but I'm also stuck trying to include an external as part of a patch for other users (I submitted a topic precisely about this earlier). I thought maybe there was a way to do this using Max 'vanilla'.
I'll check out Jasch's createfolder too, see if it'll do what I'd like.
Yeah I've got the location of the User Library now. (Users/(user)/Music/Ableton/User Library) for those who might need it.
I've got the filename time-stamping so the filename for sfrecord~ will always be different (ie not overwite) if that's what you mean?
Cheers
You can short user path on mac using
~/Music/Ableton/User Library
Shell needs slash based path, same output would also work for
createfolder external.
There should be no problem to include externals into
max4live device, I think you should find a tutorial how to do that,
but what might become a problem is Mac OS restrictions,
see the posts about shell and gatekeeper on Catalina.
And timestamp is a good approach for the files.
Maybe One could use project - track name + timestamp,
that can be done using Live Object I think.
And mkdir is the message for the shell,
mkdir + path
This is perfect. Thanks so much for your help. I'll look into saving externals in a Max For Live device too.
Hello, I am looking for the same thing but on windows...
shell can execude cmd so why not have a read on all possible
commands available, including making of directories ?
https://ss64.com/nt/index.html
and then
https://ss64.com/nt/md.html
One has to take care about proper fromating of messages to shell,
because max is max and has it's own head about symbols
or use createfolder external from Jasch package.
It already have [createfolder] but it seems to be only for Mac...
..and I really don't know shell...:/
, I will investigate this way...
....it's me or creating a simple folder in windows is not so basic ?
Thank you !
createfolder.mxe createfolder.mxe64 are windows externals
the jasch were already installed
..but the help file says me that it was working for "Max OS X Only"...
..maybe an old helpfile or old version conflict.
I have to clean my computer =)
Anyway, it's working !
Thank you !
yes you are right - windows version was included only in very last release.
Anyone knows where to download createfolder externals?
Thanks
package manager
If you dislike package manager
you can also use shell to create folders.
on mac mkdir, on windows md for example