record~/buffer specific file path


    Aug 02 2008 | 11:43 pm
    Hi all
    This is a very basic one and yes, I've read some posts on this topic of sfrecord~ >a specific file path.
    My question is how do I define a file path using [record~]?
    The way that I've build my patch using the [sprintf] patch works fine.
    *The only problem is, the clips that I create are saved in the file path of the last patcher window opened.
    So how can I tell the buffer~ to place the samples in a specific location using [record~] ?
    I suspect that it would have something to do w. path>[thispatcher] or [ ;
    qr_rec_path "Macintosh HD:My Audio Folder:"] that I've found the extra's folder.
    I thought I would use record~ instead of sfrecord~ because I read in a post that is has less latency with automatic playback. (Also, I like the fact that you can directly see in the [waveform~ display] what is being recorded instead of at the end like w. [sfrecord~].
    (the downside you have to specify buffer lenght
    thanks a lot for any tips on this.
    Phil

    • Aug 03 2008 | 6:00 pm
      I may not be understanding you completely, but basically, record~ is recording into RAM so you can't actually define a file to write to using record~ alone. Instead you record~ into buffer~ and then use the "write" message sent to the buffer~ recorded into to save to a soundfile. Unlike sfrecord~, record~ cannot automatically write to a file stored on your hard-disk because it's writing it into a memory-space allocated in RAM as defined by you when instantiating a buffer~(i guess you could say that while it has less latency with playback it has complete latency with regards to recording-to-file). This means, you must wait 'til after the sound is recorded into a buffer~ to then write it to a soundfile(and this can only be done using the "write" message to buffer~).
      With that said, you can probably apply what the posts said about specifying specific paths for sfrecord~ to the "write" message you send to buffer~.... i think... haven't looked up those posts...
      Hope it helps.
    • Aug 03 2008 | 7:19 pm
      Thanks for your advice abid.
      That is exactly what i've done. Used [sel 1 0]/toggle
      THE REAL PROBLEM IS, any sample I record will then be place in the path of the last patch opened. So if the last one opened is not my "recording patch", then I'm screwed.
      Next time I close and reopen max and my recording patch, I will not be able to autoload my samples because they're placed in the wrong folder.
      This is specifically what I'm trying to solve. [No matter in what order you open multiple patches to run/ when I use my "recording patch", samples will be place in the right folder.]
      Thanks again for your advice.
      phil
    • Aug 03 2008 | 9:38 pm
      you can include paths in your "write" message. For example, at least on OSX, I can do "write /test.aif" and this will write it to my root folder. Or I can do "write /Users/karaokaze/Desktop/tester.aif" to write it to my desktop, etc.
      Just specify the absolute path to the folder you want.
    • Aug 03 2008 | 10:54 pm
      thanks so much RabidRaja !
      You helped me solve it. I had tried the [write /path], but the problem was that my destination folder had a space in the title.
      So i replaced that space in my title w. an "_"and that was it!
      One last thing,
      I use the [sprintf]< include some "/" in it. I read somewhere that it's not a good idea to include them in the sprintf, because it can sometime behave erratically. < Is that correct in your opinion?
      Thanks a lot
      I new it had to be simple.
      Phil
    • Aug 04 2008 | 12:31 am
      I haven't seen it behave erratically with "/"s. It should be perfectly fine...
      also, there are ways you can get it to read filepaths that have files with spaces in them. You convert the filepath to a symbol using object and then give sprintf the "symout" argument to have it output everything as a symbol.
      Better yet, option-click on for the help-file and check out the
      subpatch within its help-file for specific examples of what I'm describing.
      Glad I could help!
    • Aug 04 2008 | 3:31 am
      Rabid
      thanks again for all the tips. I really appreciate you efforts. really< I save time and learn and get tips for more dirt to dig.:)
      One last thing
      you said
      > Or I can do "write /Users/karaokaze/Desktop/tester.aif" to write it to my desktop, etc.
      is this the same kareokaze member I suspected to be a sort of guru ;)
      Just some fun detective suspicions !!
      Thanks again
      phil
    • Aug 04 2008 | 4:29 am
      yes, my alter-ego, hehe