| Hi jpff,
I've just discovered a bug in negative p3 of f score opcode
(non-pow-of-two function length):
at line 121 of fgens.c there are the following lines:
if ((flen = (long)(e->p[3]+0.5))) { /* if user flen given */
if (flen < 0 ) { /* gab for non-pow-of-two-length */
flen = labs(flen); <=== change this line
lenmask = 0xFFFFFFFF;
lobits = 0; /* Hope this is not needed! */
}
the line must be changed into:
flen = labs(flen-1);
because of the flen = (long)(e->p[3]+0.5))
expression, that adds 0.5.
In fact, in case I want a table of 100 elements i would write the
following line in the score:
f1 0 512 -100 10 1
but instead of 100 elements, the old code allocated a table of 99
elements...
Please, correct it in canonical!
--
Gabriel Maldonado
http://csounds.com/maldonado/home2.htm
-- |