Forums > MaxMSP

sfrecord~ Problem??


MIB
April 27, 2006 | 6:14 pm

I don’t know if this is a problem or if I am doing something silly… but I set up a little patch which uses sfrecord~ but the directory under which the files are saved in is changing all the time. Sometimes it’s saving under the Max/MSP folder then the Max help-file folder then the folder under which the patch is itself saved…
I know this problem has been discussed in the forum and the below solution was given. I was wondering though why it is changing folders, seemingly at random??? and is there a way to avoid having to use the below patch…
I apologize if this is too simple a question, but it confuses the hell out of me. Plus having to hunt down my samples each time I start the thing is pretty annoying too!!!

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 220 326 80 196617 pack open s aiff;
#P newex 255 301 51 196617 tosymbol;
#P button 255 162 15 0;
#P newex 255 201 74 196617 opendialog fold;
#B color 5;
#P message 333 231 40 196617 Tester;
#P message 411 231 26 196617 999;
#P newex 362 380 32 196617 print;
#P newex 255 278 167 196617 sprintf %s%s%ld.aiff;
#P newex 220 380 55 196617 sfrecord~;
#P connect 3 0 1 2;
#P fasten 6 0 8 0 260 186 225 186;
#P connect 6 0 5 0;
#P fasten 6 0 4 0 260 183 338 183;
#P fasten 6 0 3 0 260 183 416 183;
#P connect 8 0 0 0;
#P connect 8 0 2 0;
#P connect 4 0 1 1;
#P connect 7 0 8 1;
#P connect 1 0 7 0;
#P connect 5 0 1 0;
#P window clipboard copycount 9;


April 28, 2006 | 5:26 am

you write the extension aiff with (sprintf %s%s%ld.aiff). why do you
need the "aiff" a second time (pack open s aiff)?

have a look at this:

max v2;
#N vpatcher 394 44 942 498;
#P toggle 112 358 15 0;
#P user ezdac~ 60 357 104 390 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 165 405 55 196617 sfrecord~;
#P newex 165 295 68 196617 prepend open;
#P newex 165 269 51 196617 tosymbol;
#P newex 335 119 51 196617 tosymbol;
#P message 214 364 261 196617 open "anywhere/new file.aif";
#P newex 214 336 62 196617 prepend set;
#P newex 303 167 30 196617 t b s;
#P newex 165 246 168 196617 sprintf %s%s.aif;
#P message 335 195 148 196617 "new file";
#P newex 335 167 62 196617 prepend set;
#P newex 335 92 56 196617 route text;
#P user textedit 335 60 481 79 32820 3 9 new file;
#P message 165 220 60 196617 anywhere/;
#P newex 165 125 62 196617 prepend set;
#P button 165 62 15 0;
#P newex 165 101 74 196617 opendialog fold;
#B color 5;
#P comment 334 42 75 196617 New File Name;
#P comment 187 62 60 196617 open folder;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P fasten 11 0 5 0 308 202 170 202;
#P connect 4 0 5 0;
#P connect 5 0 10 0;
#P connect 10 0 15 0;
#P connect 15 0 16 0;
#P connect 16 0 17 0;
#P connect 19 0 17 0;
#P connect 16 0 12 0;
#P connect 12 0 13 0;
#P fasten 14 0 11 0 340 151 308 151;
#P connect 11 1 10 1;
#P connect 6 0 7 0;
#P connect 7 0 14 0;
#P connect 14 0 8 0;
#P connect 8 0 9 0;
#P pop;

greetings

peter



MIB
April 28, 2006 | 6:27 pm

thanks… but I must say I don’t quite understand the whole sprintf object yet… I have no background other than Max and that only for a couple of months.
When I use your patch it creates a file (in the correct folder) even though I am not recording and all the files are corrupt. Since I don’t really understand what is going on I don’t know how to tackle the problem.
Why would sfrecord make a file when it doesn’t get a 1 to start recording???


April 30, 2006 | 2:40 pm

Martin Ritter wrote:
> I don’t know if this is a problem or if I am doing something silly…
> but I set up a little patch which uses sfrecord~ but the directory
> under which the files are saved in is changing all the time.

search the documentation and archive for default path, in max its
changing (for good reasons) dependent on what you open before, which
explains the behaviour.
Thats why you should open splay~ ALWAYS with a COMPLETE path. Then
you’ll never run into that problem.

> and is there a way to avoid having to use the below patch…

Yes but they are all much more complicated than that simple solution,
its worth to understand it…

> Plus having to hunt down my samples each time I start the thing is
> pretty annoying too!!!

Sometimes annyoance is, what will force you to learn. Its always worth
it, and the best way to overcome the annoyance…
It will save you a lot of time in the future…

Stefan

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-57 42 91 09


May 1, 2006 | 8:38 am

Martin Ritter wrote:
> Why would sfrecord make a file when it doesn’t get a 1 to start
> recording???

It needs to open a file to start recording. If you don’t record, the
file still will be there without any content. Just don’t open it if you
don’t want to record…

Stefan

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-57 42 91 09


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