[sc-users] buffer to ats file
alo
alo at tehis.net
Fri Apr 25 10:54:53 PDT 2008
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);
});
});
}
}
This seems to work fine until, I am guessing, there are more than 1
atsa processes at the same time and the otherwise very handy
unixCmdThen throws a warning and an error e.g.:
WARNING:
String.unixCmdInferPID - unable to be sure of the atsa PID.
Compared: [ 0 ] against [ 1257, 1261, 0 ] with result [ 1257, 1261 ]
Difference function returns [ 1257, 1261 ]
ERROR:
String:unixCmdThen - could not infer PID, therefore couldn't wait
until done!
I would be very grateful for any suggestions how to avoid this. Or,
perhaps, Josh, you have a better way of using atsa on the fly?
Cheers
Alo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.create.ucsb.edu/pipermail/sc-users/attachments/20080425/fb66807d/attachment.html
More information about the sc-users
mailing list