| yes, I rewrote these for 6 to remove the need for power of two. I think floor is the correct operation; in any case, if we change it, we will change behaviour.
Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
> On 23 Dec 2018, at 20:11, John wrote:
>
> More code study shows that if we have a power-of-two table it uses the
> fact, but if not resorts to more expensive ways. So despite the
> manual the opcodes are save for any table. What they do is use floor
> operation on the index so small rounding error as in the example in
> question give unexpected results.
>
> We could replace all floor operations by a round -- not sure
>
> I notice that
> giTable ftgen 0, 0, 13, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
>
> instr Test
> indx = 0
> while indx < 26 do
> iVal table indx, giTable, 0, 0, 1
> print iVal
> indx += 1
> od
> endin
> schedule "Test", 0, 0
>
> produces unexpected results, at least to me.
>
> ==John ffitch
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
> https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |