The server was not crashing. And, no–it’s different code than what is at the top of the thread, but the same idea. I’ll paste it below.
Do you mean rather than running at ServerProcessSlices
, running at FluidBuf*.processBlocking()
on everything?
Without the if(jobs.size > 0){SystemClock.sched(0.1, perf.value(jobID))};
that Sam suggested above? Or without the new .wait
in Alpha 07 (which I’m not using yet)? Either way, I reverted my FluidProcessSlices
class to not have the added things above to make sure I was testing on the same code. I tried it once today (using the default 4 tasks) to double check and it failed in the same way.
On the internal server, it worked great!
SuperCollider is not letting me boot at TCP server, so I don’t about that one. It’s giving me:
Requested notification messages from server 'test'
too many users
test - could not register, too many users.
// ========================== here’s the code: ===================
(
var folder;
//=============================== FOLDER WITH THE STUFF WE'LL BE USING... =========================
folder = "/Users/ted/Desktop/SCD/sample_space_maker/outputs/201228_222352/";
//==================================================================================================
Routine{
var buf_path, index_path, buffer, index, files, dataSet;
var mfccBuf, pitchBuf, specBuf, loudBuf, mfcc_stats, pitch_stats, spec_stats, loud_stats;
var mfcc_flat, pitch_flat, spec_flat, loud_flat, master_buf, extractor;
var mfcc_chans, pitch_chans, spec_chans, loud_chans, n_mfccs = 40;
var stats_order = ["mean","stddev","skewness","kurtosis","min","median","max"];
var names_order;
var column_headers;
files = PathName(folder).files;
buf_path = files.select({
arg pn;
pn.fileName[0..1] == "01";
})[0];
index_path = files.select({
arg pn;
pn.fileName[0..1] == "02";
})[0];
buffer = Buffer.read(s,buf_path.fullPath);
index = Object.readArchive(index_path.fullPath);
mfccBuf = 4.collect{Buffer(s)};
pitchBuf = 4.collect{Buffer(s)};
specBuf = 4.collect{Buffer(s)};
loudBuf = 4.collect{Buffer(s)};
mfcc_stats = 4.collect{Buffer(s)};
pitch_stats = 4.collect{Buffer(s)};
spec_stats = 4.collect{Buffer(s)};
loud_stats = 4.collect{Buffer(s)};
mfcc_flat = 4.collect{Buffer(s)};
pitch_flat = 4.collect{Buffer(s)};
spec_flat = 4.collect{Buffer(s)};
loud_flat = 4.collect{Buffer(s)};
mfcc_chans = n_mfccs * 7 * 2; // 40 mfccs * 7 stats * 2 derivatives (no derivative & 1st derivative)
pitch_chans = 2 * 7 * 2;
spec_chans = 7 * 7 * 2;
loud_chans = 2 * 7 * 2;
master_buf = 4.collect{Buffer(s,mfcc_chans + pitch_chans + spec_chans + loud_chans)};
dataSet = FluidDataSet(s);
s.sync;
extractor = FluidProcessSlices({|src,start,num,data|
var label = data.key;
var voice = data.value[\voice];
var t00 = FluidBufMFCC.kr(src,start,num,features:mfccBuf[voice],numCoeffs:n_mfccs);
var t01 = FluidBufPitch.kr(src,start,num,0,1,pitchBuf[voice],trig:Done.kr(t00));
var t02 = FluidBufSpectralShape.kr(src,start,num,0,1,specBuf[voice],trig:Done.kr(t01));
var t03 = FluidBufLoudness.kr(src,start,num,features:loudBuf[voice],trig:Done.kr(t02));
var t04 = FluidBufStats.kr(mfccBuf[voice],stats:mfcc_stats[voice],numDerivs:1,trig:Done.kr(t03));
var t05 = FluidBufStats.kr(pitchBuf[voice],stats:pitch_stats[voice],numDerivs:1,trig:Done.kr(t04));
var t06 = FluidBufStats.kr(specBuf[voice],stats:spec_stats[voice],numDerivs:1,trig:Done.kr(t05));
var t07 = FluidBufStats.kr(loudBuf[voice],stats:loud_stats[voice],numDerivs:1,trig:Done.kr(t06));
var t08 = FluidBufFlatten.kr(mfcc_stats[voice],mfcc_flat[voice],trig:Done.kr(t07));
var t09 = FluidBufFlatten.kr(pitch_stats[voice],pitch_flat[voice],trig:Done.kr(t08));
var t10 = FluidBufFlatten.kr(spec_stats[voice],spec_flat[voice],trig:Done.kr(t09));
var t11 = FluidBufFlatten.kr(loud_stats[voice],loud_flat[voice],trig:Done.kr(t10));
var t12 = FluidBufCompose.kr( mfcc_flat[voice],0,-1,0,-1,1,master_buf[voice],0,0,0,Done.kr(t11));
var t13 = FluidBufCompose.kr(pitch_flat[voice],0,-1,0,-1,1,master_buf[voice],mfcc_chans,0,0,Done.kr(t12));
var t14 = FluidBufCompose.kr( spec_flat[voice],0,-1,0,-1,1,master_buf[voice],mfcc_chans + pitch_chans,0,0,Done.kr(t13));
var t15 = FluidBufCompose.kr(loud_flat[voice], 0,-1,0,-1,1,master_buf[voice],mfcc_chans + pitch_chans + spec_chans,0,0,Done.kr(t14));
FluidDataSetWr.kr(dataSet,label,-1, master_buf[voice], Done.kr(t15));
});
extractor.play(s,buffer,index,{
"feature extraction done".postln;
dataSet.write(folder+/+"03_full_dataset.fl");
names_order = Array.fill(n_mfccs,{arg i; "mfcc%".format(i.asString.padLeft(2,"0"))}) ++
["pitch","pitchConf"] ++
["specCent","specSpread","specSkew","specKurtosis","specRolloff","specFlatness","specCrest"] ++
["loudness","truePeak"];
column_headers = Array.fill(master_buf[0].numFrames,{
arg i;
var stat = stats_order[(i/2).floor.asInteger % stats_order.size];
var name = names_order[(i / 14).floor.asInteger];
var deriv = "deriv-";
if((i % 2) == 0,{deriv = ""});
name = "%-%%".format(name,deriv,stat);
[i,name];
});
ArrayToCSV(column_headers,folder+/+"04_full_dataset_column_headers.csv");
});
}.play;
)