That worked! Thanks for the speedy reply. Also, I eyeballed the json file of the dataset afterwards and can confirm that it looks like it’s all written correctly (as in not a bunch of zeros somewhere, the data is filled in).
For anyone else who might come along this way, my FluidBufCompose.sc file now looks like this:
FluidBufCompose : UGen {
*new1 { |rate, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, gain = 1, destination, destStartFrame = 0, destStartChan = 0, destGain = 0, trig = 1, blocking = 1|
source = source.asUGenInput;
destination = destination.asUGenInput;
source.isNil.if {"FluidBufCompose: Invalid source buffer".throw};
destination.isNil.if {"FluidBufCompose: Invalid destination buffer".throw};
^super.new1(rate, source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain, trig, blocking);
}
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, gain = 1, destination, destStartFrame = 0, destStartChan = 0, destGain = 0, trig = 1|
/*^this.multiNew('control', source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain, trig, blocking:1);*/
^this.new1('control', source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain, trig, 1);
}
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, gain = 1, destination, destStartFrame = 0, destStartChan = 0, destGain = 0, action|
^FluidNRTProcess.new(Ò
server, this, action, [destination], blocking:1
).process(
source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain
);
}
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, gain = 1, destination, destStartFrame = 0, destStartChan = 0, destGain = 0, action|
^process(
source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain
);
}
}
and the FluidProcessSlices function I used is this:
~extractor = FluidProcessSlices({|src,start,num,data|
var label = data.key;
var voice = data.value[\voice];
var mfcc = FluidBufMFCC.kr(src,startFrame:start,numFrames:num,numChans:1,features:~mfccBuf[voice],trig:1);
var pitch = FluidBufPitch.kr(src,start,num,0,1,~pitchBuf[voice],trig:Done.kr(mfcc));
var spec = FluidBufSpectralShape.kr(src,start,num,0,1,~specBuf[voice],trig:Done.kr(pitch));
var mfcc_stats = FluidBufStats.kr(~mfccBuf[voice],stats:~mfcc_stats[voice],trig:Done.kr(spec));
var pitch_stats = FluidBufStats.kr(~pitchBuf[voice],stats:~pitch_stats[voice],trig:Done.kr(mfcc_stats));
var spec_stats = FluidBufStats.kr(~specBuf[voice],stats:~spec_stats[voice],trig:Done.kr(pitch_stats));
var mfcc_flat = FluidBufFlatten.kr(~mfcc_stats[voice],~mfcc_flat[voice],trig:Done.kr(spec_stats)); // 91
var pitch_flat = FluidBufFlatten.kr(~pitch_stats[voice],~pitch_flat[voice],trig:Done.kr(mfcc_flat)); // 14
var spec_flat = FluidBufFlatten.kr(~spec_stats[voice],~spec_flat[voice],trig:Done.kr(pitch_flat)); // 49
var mfcc_comp = FluidBufCompose.kr( ~mfcc_flat[voice], 0,-1,0,-1,1,~master_buf[voice],0, 0,0,Done.kr(spec_flat));
var pitch_comp = FluidBufCompose.kr(~pitch_flat[voice],0,-1,0,-1,1,~master_buf[voice],91, 0,0,Done.kr(mfcc_comp));
var spec_comp = FluidBufCompose.kr( ~spec_flat[voice], 0,-1,0,-1,1,~master_buf[voice],91 + 14,0,0,Done.kr(pitch_comp));
FluidDataSetWr.kr(~ds,label, -1, ~master_buf[voice], Done.kr(spec_comp));
});