[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Sc-devel] Shaper crash



hi, i've noticed Shaper causes a segmentation fault if the input is equal to or rises above 1.0. eg:

(
c = Buffer.alloc(s, 8192, 1, {arg buf; buf.sine1Msg([1])});
{Shaper.ar(c.bufnum,SinOsc.ar(100,0,Line.ar(0,2,5)))}.play;
)

admittedly it's common practice to keep the input quite low but maybe we could note this in the help file. I did manage to make a rudimentary fix in the UGen code that clips the input to a value close to 1.0 although it only works for the .ar version. i've not had time to figure out the .kr version. the fix is commented out here:

LOOP(inNumSamples,
float fin = ZXP(in);
// fin = sc_min(fin, 1.0 - 0.0001); // stops seg fault
float findex = offset + fin * offset;
..

perhaps i'm just fussing anyway.

kernel