Error("FluidBufToKr:kr needs to be passed either an existing buffer or an OutputProxy and a number of frames for the buffer that will be supplied").throw;
});
numFrames=numFrames??{buffer.numFrames};
if(numFrames==0){"FluidKrToBuf:kr indicated numFrames is zero.".warn};
if(numFrames>1000){
Error("FluidKrToBuf: Buffer is indicated to have % frames. This is probably not the buffer you intended.".format(numFrames)).throw;