Update of /cvsroot/pure-data/externals/nusmuk/line3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13313
Modified Files: line3.c Log Message: bugfix with [0,1 100< message
Index: line3.c =================================================================== RCS file: /cvsroot/pure-data/externals/nusmuk/line3/line3.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** line3.c 27 Jan 2005 12:03:45 -0000 1.1.1.1 --- line3.c 16 Jul 2005 22:02:12 -0000 1.2 *************** *** 69,79 **** else { ! t = (timenow - x->x_prevtime);
! tmp = x->a * t * t * t + x->b * t * t + x->setderiv * t + x->x_setval;
! outlet_float(x->x_obj.ob_outlet, tmp); ! clock_delay(x->x_clock, ! (x->x_grain > msectogo ? msectogo : x->x_grain)); } } --- 69,78 ---- else { ! t = (timenow - x->x_prevtime);
! tmp = x->a * t * t * t + x->b * t * t + x->setderiv * t + x->x_setval;
! outlet_float(x->x_obj.ob_outlet, tmp); ! clock_delay(x->x_clock, (x->x_grain > msectogo ? msectogo : x->x_grain)); } } *************** *** 84,91 **** if (x->x_gotinlet && x->x_in1val > 0) { ! if (timenow > x->x_targettime) { x->x_setval = x->x_targetval; ! x->setderiv = 0; } else --- 83,90 ---- if (x->x_gotinlet && x->x_in1val > 0) { ! if (timenow >= x->x_targettime) { x->x_setval = x->x_targetval; ! x->setderiv = 0; } else *************** *** 95,100 **** x->setderiv = 3 * x->a * (timenow - x->x_prevtime) * (timenow - x->x_prevtime) + 2 * x->b * (timenow - x->x_prevtime) + x->setderiv;
! } ! x->x_prevtime = timenow; x->x_targettime = clock_getsystimeafter(x->x_in1val); --- 94,98 ---- x->setderiv = 3 * x->a * (timenow - x->x_prevtime) * (timenow - x->x_prevtime) + 2 * x->b * (timenow - x->x_prevtime) + x->setderiv;
! } x->x_prevtime = timenow; x->x_targettime = clock_getsystimeafter(x->x_in1val); *************** *** 120,123 **** --- 118,122 ---- clock_unset(x->x_clock); x->x_targetval = x->x_setval = f; + x->x_targettime = timenow; outlet_float(x->x_obj.ob_outlet, f); }