I am processing some sound files with FluCoMa and I think I must be hitting an error in accessing buffers I have stored in a set of associations/events but I can’t figure out how to get this to work correctly. I want the arguments to .process
once since the values need to be the same to whatever process I’m using to get the data. It’s returning ERROR: FluidBufNoveltySlice: Invalid source buffer
and I don’t understand why.
//Buffer load
(
var cleanup = Buffer.freeAll;
~samples = [
//paths to my samples
].collect{|path, i|
var srcBuf = Buffer.read(s, path);
var sliceBuf = Buffer(s);
var featuresBuf = Buffer(s);
(
src: srcBuf,
slices: sliceBuf,
features: featuresBuf,
path: path
);
};
)
~samples[0][\src] //returns the audio buffer, as expected
//Analysis
(
var sampleIndex = 0; //set me
var sample = ~samples[sampleIndex];
var dictionary;
var process = {
var assoc =
//novelty
(process: [FluidBufNoveltySlice, FluidBufNoveltyFeature], args: (server: Server.local, source: sample[\src], indices: sample[\slices], features: sample[\features], algorithm: \mfcc, kernelSize: 3, threshold: 0.5, filterSize: 1, minSliceLength: 100, windowSize: 1024, hopSize: -1, fftSize: -1));
//amp
// (process: [FluidBufAmpSlice, FluidBufAmpFeature], args: (server: Server.local, source: sample[\src], indices: sample[\slices], features: sample[\features], fastRampUp: 1, fastRampDown: 1, slowRampUp: 100, slowRampDown: 100, onThreshold: -144, offThreshold: -144, floor: -144, minSliceLength: 1, highPassFreq: 5));
assoc[\process].do{|process|
process.process(
assoc[\args]
);
};
\done.postln;
};
process.(); //ERROR: FluidBufNoveltySlice: Invalid source buffer
)