Csound Csound-dev Csound-tekno Search About

table opcode with negative index

Date2017-02-26 16:08
FromRichard
Subjecttable opcode with negative index
I am studying Victor's SigReverse UDO. (I need to make my own version of 
this, working only on sections of a table.)
I noticed lines like the following:

as1 table  -kwp, ifn, 0, 0, 1  /* reverse tap 1 */
as2 table  -kwp, ifn, 0, ilen/2, 1 /* reverse tap 2 */

A negative index seems to reverse the writing. But this is not mentioned 
in the manual:

http://www.csounds.com/manual/html/table.html

Does the reverse writing work from the end of the table back to the 
start, if the mode is 0, like in the first line ?

Richard

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

Date2017-02-26 16:39
FromVictor Lazzarini
SubjectRe: table opcode with negative index
If wraparound is turned on, the index is wrapped around the edges of the table,
ie. read modulus (generalise) the table len.

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

> On 26 Feb 2017, at 16:08, Richard  wrote:
> 
> I am studying Victor's SigReverse UDO. (I need to make my own version of this, working only on sections of a table.)
> I noticed lines like the following:
> 
> as1 table  -kwp, ifn, 0, 0, 1  /* reverse tap 1 */
> as2 table  -kwp, ifn, 0, ilen/2, 1 /* reverse tap 2 */
> 
> A negative index seems to reverse the writing. But this is not mentioned in the manual:
> 
> http://www.csounds.com/manual/html/table.html
> 
> Does the reverse writing work from the end of the table back to the start, if the mode is 0, like in the first line ?
> 
> Richard
> 
> 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