[sc-users] buffer to ats file

James Harkins jamshark70 at gmail.com
Fri Apr 25 11:05:18 PDT 2008


I'm not sure about the PID stuff (I haven't used those extensions) but
there is some confusion here about the completionMessage.

The function that you give to completionMessage should return an OSC
message that the server will execute after writing. The OSC message is
computed immediately -- so you can't use this function for something
that should execute in the client after the server finishes.

For that, you should use a routine and .sync -

fork {
   this.write(...);  // note, no completion message
   this.server.sync;
   (atsapath + ......).unixCmdThen...
}

hjh

On Fri, Apr 25, 2008 at 1:54 PM, alo <alo at tehis.net> wrote:
> Hello
>
> I would like to analyze real-time inputs with atsa and one way I pictured
> doing it was to record the input into a buffer and then extend the buffer
> class something like this (I added the action to .loadCollection at the end
> of .loadToBuffer):
>
> + Buffer{
>
>
>  asAtsFile{|action|
>  var atsapath = "/Users/ise/ats-1.0.osx/atsa";
>  var tempPath, atsfile;
>  if (path.notNil)
>  { tempPath = "recordings/" ++ path.basename }
>  { tempPath = "recordings/" ++ "b2a_" ++ Date.getDate.stamp };
>  this.write(tempPath, completionMessage: {
>  (atsapath + tempPath + (tempPath ++ "ats")).unixCmdThen({
>  atsfile = AtsFile((tempPath ++ "ats"), this.server).loadToBuffer(action);
>  });
>  });
>  }
>
>
> }


-- 
James Harkins /// dewdrop world
jamshark70 at dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman


More information about the sc-users mailing list