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.
20 lines
669 B
Python
20 lines
669 B
Python
FluidBufStats{
|
|
*process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, stats, numDerivs = 0, low = 0, middle = 50, high = 100, action;
|
|
|
|
source = source.asUGenInput;
|
|
stats = stats.asUGenInput;
|
|
|
|
source.isNil.if {"FluidBufStats: Invalid source buffer".throw};
|
|
stats.isNil.if {"FluidBufStats: Invalid stats buffer".throw};
|
|
|
|
server = server ? Server.default;
|
|
|
|
forkIfNeeded{
|
|
server.sendMsg(\cmd, \BufStats, source, startFrame, numFrames, startChan, numChans, stats, numDerivs, low, middle, high);
|
|
server.sync;
|
|
stats = server.cachedBufferAt(stats); stats.updateInfo; server.sync;
|
|
action.value(stats);
|
|
};
|
|
}
|
|
}
|