You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
1.1 KiB
Python
23 lines
1.1 KiB
Python
FluidBufTransients {
|
|
*process { arg server, srcBufNum, startAt = 0, nFrames = -1, startChan = 0, nChans = -1, transBufNum, resBufNum, order = 20, blockSize = 256, padSize = 128, skew = 0, threshFwd = 2, threshBack = 1.1, winSize = 14, debounce = 25, action;
|
|
|
|
srcBufNum = srcBufNum.asUGenInput;
|
|
transBufNum = transBufNum.asUGenInput;
|
|
resBufNum = resBufNum.asUGenInput;
|
|
|
|
if(srcBufNum.isNil) { Error("Invalid buffer").format(thisMethod.name, this.class.name).throw};
|
|
|
|
server = server ? Server.default;
|
|
transBufNum = transBufNum ? -1;
|
|
resBufNum = resBufNum ? -1;
|
|
|
|
forkIfNeeded{
|
|
server.sendMsg(\cmd, \BufTransients, srcBufNum, startAt, nFrames, startChan, nChans, transBufNum, resBufNum, order, blockSize, padSize, skew, threshFwd, threshBack, winSize, debounce);
|
|
server.sync;
|
|
if (transBufNum != -1) {transBufNum = server.cachedBufferAt(transBufNum); transBufNum.updateInfo; server.sync;} {transBufNum = nil};
|
|
if (resBufNum != -1) {resBufNum = server.cachedBufferAt(resBufNum); resBufNum.updateInfo;server.sync;} {resBufNum = nil};
|
|
action.value(transBufNum,resBufNum);
|
|
};
|
|
}
|
|
}
|