Forums > MaxMSP

sfrecord~ record into subfolder

August 5, 2008 | 3:26 pm

Hello everyone

I use Max5 since 2 days and I want to record a sound file with sfrecord~ in a relative folder of my patch (ex : ./audio/record_1/file.wave)
I use sprintf to do this automatically for several recordings but it isn’t my problem.

It does not work with a message like: [open ./audio/record_1/file.wave wave)
The file is created in the root folder of my patch …

I am accustomed to using Puredata and I did not this problem …
What should I do?

Thank you in advance !…

Maxence Mercier

_____________________________________________________________________________
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr


August 5, 2008 | 6:43 pm

I probably shouldn’t answer since I’m not completely clear on this but just going out on a limb, are you on windows? If so, you could try an absolute path like
"open C:….file.wav wave"

otherwise, on OSX, I’m able to specify absolute paths for sfrecord~ like this:
"open /Users/[username]/Desktop/testfolder/file.wav wave"
or even with my hard-drive name "+" like this:
"open +:/Users/[username]/Desktop/file.wav wave"

Sorry if you didn’t want absolute-paths and instead want relative-paths, in that case, you could also try converting from path to path using the , , and objects. Although, there’s probably a better way to just specify relative-paths within the "open…" message itself. At the very least, hopefully someone else will see this thread easier and answer with a better reply now that I’ve bumped it back up to the top of the list;)


August 5, 2008 | 7:08 pm

to access folders relative to your main patch use the thispatcher object with sprintf. the following patch fills up a umenu with the contents of a folder at the same level as your patch. you have to save the patch to disk first, and rename "your_folder" to whatever your folder name is.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 250 121 21 196617 $1;
#P message 60 181 33 196617 clear;
#P window linecount 0;
#P message 186 208 212 196617;
#P window linecount 1;
#P message 179 121 66 196617 folder_name;
#P button 111 79 15 0;
#P newex 111 165 51 196617 tosymbol;
#P newex 111 145 78 196617 sprintf %s%s/;
#P message 111 102 29 196617 path;
#N thispatcher;
#Q end;
#P newobj 111 120 61 196617 thispatcher;
#P newex 186 186 61 196617 prepend set;
#P newex 111 186 74 196617 prepend prefix;
#P user ubumenu 60 208 120 196617 0 1 1 0;
#X setrgb 255 255 255 241 150 105 21 34 211 0 0 0 165 165 165 112 112 112;
#X prefix_set 0 1 0;
#X pattrmode 1;
#P objectname ubumenu[13];
#P window linecount 4;
#P comment 279 121 100 196617 if used in an abstraction , make the folder name an argument;
#P fasten 8 0 9 0 116 99 184 99;
#P connect 8 0 5 0;
#P connect 11 0 1 0;
#P fasten 2 0 1 0 116 205 65 205;
#P lcolor 7;
#P connect 5 0 4 0;
#P fasten 4 1 6 0 167 141 116 141;
#P connect 6 0 7 0;
#P connect 9 0 6 1;
#P fasten 7 0 3 0 116 183 191 183;
#P connect 7 0 2 0;
#P connect 3 0 10 0;
#P window clipboard copycount 13;


August 5, 2008 | 9:38 pm

I use OSX Leopard, I have no problem with an absolute address . But with an relative is impossible for me.
Robert, I cannot open your file with max5, what do I do?

Many thanks !

Maxence

—– Message d’origine —-
De : Robert Ramirez
À : maxmsp@cycling74.com
Envoyé le : Mardi, 5 Août 2008, 21h08mn 51s
Objet : [maxmsp] Re: sfrecord~ record into subfolder

to access folders relative to your main patch use the thispatcher object with sprintf. the following patch fills up a umenu with the contents of a folder at the same level as your patch. you have to save the patch to disk first, and rename "your_folder" to whatever your folder name is.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 250 121 21 196617 $1;
#P message 60 181 33 196617 clear;
#P window linecount 0;
#P message 186 208 212 196617;
#P window linecount 1;
#P message 179 121 66 196617 folder_name;
#P button 111 79 15 0;
#P newex 111 165 51 196617 tosymbol;
#P newex 111 145 78 196617 sprintf %s%s/;
#P message 111 102 29 196617 path;
#N thispatcher;
#Q end;
#P newobj 111 120 61 196617 thispatcher;
#P newex 186 186 61 196617 prepend set;
#P newex 111 186 74 196617 prepend prefix;
#P user ubumenu 60 208 120 196617 0 1 1 0;
#X setrgb 255 255 255 241 150 105 21 34 211 0 0 0 165 165 165 112 112 112;
#X prefix_set 0 1 Partition_2:/Freelance/Builders/actions/ 0;
#X pattrmode 1;
#P objectname ubumenu[13];
#P window linecount 4;
#P comment 279 121 100 196617 if used in an abstraction , make the folder name an argument;
#P fasten 8 0 9 0 116 99 184 99;
#P connect 8 0 5 0;
#P connect 11 0 1 0;
#P fasten 2 0 1 0 116 205 65 205;
#P lcolor 7;
#P connect 5 0 4 0;
#P fasten 4 1 6 0 167 141 116 141;
#P connect 6 0 7 0;
#P connect 9 0 6 1;
#P fasten 7 0 3 0 116 183 191 183;
#P connect 7 0 2 0;
#P connect 3 0 10 0;
#P window clipboard copycount 13;

_______________________________________________
maxmsp mailing list
maxmsp@cycling74.com

http://www.cycling74.com/mailman/listinfo/maxmsp

_____________________________________________________________________________
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr


August 5, 2008 | 10:19 pm

File -> New From Clipboard ?


August 5, 2008 | 10:33 pm

Thank you Robert I solved my problem by reading your path as a text file!
Attach this mail, the solution to my problem for max5, if it can help other novice …

Maxence

_____________________________________________________________________________
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr


August 5, 2008 | 11:27 pm

Ah yes ! is better like that !

thank you again !

—– Message d’origine —-
De : Robert Ramirez
À : maxmsp@cycling74.com
Envoyé le : Mercredi, 6 Août 2008, 0h19mn 58s
Objet : [maxmsp] Re: Re : Re: sfrecord~ record into subfolder

File -> New From Clipboard ?
_______________________________________________
maxmsp mailing list
maxmsp@cycling74.com

http://www.cycling74.com/mailman/listinfo/maxmsp

_____________________________________________________________________________
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr


Viewing 7 posts - 1 through 7 (of 7 total)