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

Re: [Sc-devel] Shaper crash

Hmm... not sure if I would clip the value, or perhaps wrap it? I think a comment in the helpfile makes sense at least. I'll add this in, and if others have ideas about the way it should work, let me know and I will commit a fix.



On Dec 6, 2007, at 5:08 PM, kernel wrote:

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])});

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:

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.

Sc-devel mailing list

/* Joshua D. Parmenter

“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono