FluidSliceCorpus error

This one has me stumped. It seems to be failing with long files. I noticed it on a mono wav that was over 15 minutes. Tried it on a different one that was 43 minutes…and that also failed. I set the FluidBufNoveltySlice threshold to 0.99 just to make sure that it wasn’t overloading on slices? Anyway here’s what the post returns:

Slicing 1/1
ERROR: Input buffer : not enough frames
File '/Users/ted/Library/Application Support/SuperCollider/tmp/318578646' could not be opened: Format not recognised.
FluidSliceCorpus: 1/1

Thanks for any pointers!

good pun!

Have you tried a buffer that size in NoveltySlice? I think you are likely to get roll-over of INT in 32bit but I might be wrong. It would be a good first test - in theory you should get the right address, just with the wrong precision (getting worse with time) but if you don’t get valid addresses after 2^24 then we need to chase that error first… In other word, try it outside the code - if it works, check that nowhere after that there are assumptions of the number being under 2^24 (like casting) - anyway there I’ll help too.

I just tried the really long file in FluidBufNoveltySlice.process and it worked great. I even put the threshold super low to see if it was a problem with a high number of slices.

	//var path = "/Volumes/Ted's 10TB My Book (June 2020)/SOUND DESIGNS/_EURORACK SOUNDS/201201 eurorackies/audio/01-201201_1505.wav"; // 8:22
	//var path = "/Volumes/Ted's 10TB My Book (June 2020)/SOUND DESIGNS/_EURORACK SOUNDS/200613 eurorack 01/01-200613_1527.wav";// 17:22
	//var path = "/Volumes/Ted's 10TB My Book (June 2020)/SOUND DESIGNS/_EURORACK SOUNDS/200606 eurorack/01-200605_1210.wav"; // 56:08
	var path = "/Volumes/Ted's 10TB My Book (June 2020)/RECORDING SESSIONS/200823 patti/audio/05-high tom-200823_1240.wav"; // 43:29
	b = Buffer.readChannel(s,path,channels:[0]);
	c = Buffer(s);
	//	b.duration.postln;

The original problem was happening here (below). The ~loader is a FluidLoadFolder that has loaded just the one long file.

			var slicer;
			"loader done: %".format(~loader.index).postln;
			slicer = FluidSliceCorpus({
				arg src, start, num, dest;
				//FluidBufOnsetSlice.kr(src,start,num,indices:dest,threshold:0.01); // thresh = 0.05

				arg slices_index;
				~loader.index = slices_index; // i made this settable...

				~avg_sec = ~loader.buffer.duration / ~loader.index.size;
				"% slices".format(~loader.index.size).postln;
				"% avg sec per slice".format(~avg_sec.round(0.001)).postln;