Not yet… I’m running into a crashing bug.
@Sam_Pluta – tried building 64 wavetables of 2048 samples each. OscOS dies when bufloc is nonzero.
(
// 131072 frames, a11wlk01 has 188893 frames, OK
var size = 2048, numTables = 64;
var w = Signal(size * numTables);
var chunk;
var file = SoundFile.openRead(Platform.resourceDir +/+ "sounds/a11wlk01.wav");
if(file.notNil) {
protect {
numTables.do {
chunk = Signal.newClear(size);
file.readData(chunk);
// remove DC and normalize
chunk = (chunk - chunk.mean).normalize;
w.addAll(chunk);
};
b = Buffer.sendCollection(s, w, 1, action: { "done".postln });
} {
file.close
};
} {
"File open failed".warn;
};
)
// wait until done
(
var numTables = 64;
a = {
(OscOS.ar(
b,
Phasor.ar(0, MouseY.kr(200, 800, 1) * SampleDur.ir, 0, 1),
numTables,
MouseX.kr(0, 0.999 /*numTables - 1.001*/),
4
) * 0.1).dup
}.play;
)
gdb says (omitting some of the early frames, just normal stuff):
#0 0x00007fffefa58ecb in OscOS::OscOS::Perform(float const*, float, float, float, int, float) ()
from /home/dlm/.local/share/SuperCollider/Extensions/OversamplingOscillators/BuchlaFoldOS.so
#1 0x00007fffefa59177 in OscOS::OscOS::next_os(float const*, float, float, float, int, float) ()
from /home/dlm/.local/share/SuperCollider/Extensions/OversamplingOscillators/BuchlaFoldOS.so
#2 0x00007fffefa592f6 in OscOS::OscOS::next_aa(int) ()
from /home/dlm/.local/share/SuperCollider/Extensions/OversamplingOscillators/BuchlaFoldOS.so
#3 0x00007fffefa59e1c in OscOS::OscOS::OscOS() ()
from /home/dlm/.local/share/SuperCollider/Extensions/OversamplingOscillators/BuchlaFoldOS.so
#4 0x00005555555b4cf6 in Graph_FirstCalc (inGraph=0x7fff9f306700)
at /home/dlm/share/superc/server/scsynth/SC_Graph.cpp:506
#5 0x00005555555bad5d in Group_Calc (inGroup=<optimized out>)
at /home/dlm/share/superc/server/scsynth/SC_Group.cpp:69
#6 0x00005555555bad5d in Group_Calc (inGroup=<optimized out>)
If I replace the MouseX.kr
with 0, it doesn’t crash. If I replace it with 1, it crashes. 63/64, crashes. 0.000001, no crash.
What is the unit of bufloc
? No documentation and no comment in the class file, I’m stabbing in the dark here.
hjh