[SuperCollider] Build a dataset without onset analysis and with recursive search

Hi @John_C n=and welcome,

I don’t think you really need FluidBufCompose for this – just preallocating a Buffer after using SoundFile.collect should let you load up a set of files one after another

Some unpretty code:

s.boot
(
~files=SoundFile.collect("/Users/owen/dev/flucoma-core/Resources/AudioFiles/*");
~frames = ~files.collect{|f| f.numFrames}; 
~totalFrames = ~frames.sum; 
~buf = Buffer.alloc(s, ~totalFrames);
~frameCount = 0; 
~files.do{|f|
	~buf.readChannel(f.path, bufStartFrame:~frameCount, channels:[0]);
	~frameCount = ~frameCount + f.numFrames; 
};
)
2 Likes