Csound Csound-dev Csound-tekno Search About

Re: [Csnd] table opcodes

Date2018-12-24 10:48
FromAndrea Strappa
SubjectRe: [Csnd] table opcodes
yes, in my gen02 example
itabndx =frac(ipch)*100
don't work, it give unexpected results, but
itabndx = round(frac(ipch)*100)
work well.
Maybe it is enough to add a note in the manual.

----- Original Message ----- 
From: "Victor Lazzarini" 
To: 
Sent: Sunday, December 23, 2018 9:36 PM
Subject: Re: [Csnd] table opcodes


But that's surely user error, is it not? If floor is not wanted, then 
interpolation is what is
needed. Truncating table lookup uses floor not round.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 23 Dec 2018, at 20:20, jpff  wrote:
>
> The trouble with floor is rounding error as in the original message of 
> this thread.
>
> At least we should correct the manual and give a warning.
>
>> On Sun, 23 Dec 2018, Victor Lazzarini wrote:
>>
>> 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.
>>>
>
> 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 


---
Questa e-mail รจ stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus

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