Csound Csound-dev Csound-tekno Search About

[XTCSOUND] tables

Date1998-05-27 18:19
FromErez Webman
Subject[XTCSOUND] tables
Hi. My name is Erez Webman. I'm a musician and an experienced Csound user.
I've been working with Extended Csound for about 3 month. What I do mostly
is developing synthesis algorithms, mainly in the "physical modelling" and
"arithmetic instruments" domains. In the next days, I'll send to this list
quite a few bug reports. Well, let's start:


A-RATE TABLE & TABLEI
=====================

The opcodes table and tablei seems not to work correctly when used in
a-rate. This can be demonstrated by the following csound program:


~~~ SCO file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i1 0 5
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~ ORC file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sr     =  44100
kr     =  441
ksmps  =  100
nchnls =  2

gifn      ftgen     0, 0, 4097, 7, 0, 4097, 1

instr     1 
aindex    line      -1000,p3,5000
aout      tablei    aindex,gifn,0,0,0
          outs      aindex,aout*30000
endin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Incorrect output is also presented if you replace the line:
    aout      tablei    aindex,gifn,0,0,0

with the line:    aout tablei aindex,gifn,0,0,1
or with the line: aout table  aindex,gifn,0,0,0

However, if you replace it with the line: aout table aindex,gifn,0,0,1
the output is OK...

k-rate table (and tablei) doesn't suffer from this problem. However, they
do suffer from another problem, which is described in the next item.


K-RATE TABLES LARGER THAN 8192
==============================

Consider the following Csound program:

~~~ SCO file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i1 0 5
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~ ORC file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sr     =  44100
kr     =  44100
ksmps  =  1  
nchnls =  2

gifn      ftgen     0, 0, 16385, 7, 0, 16384, 1

instr     1 

kindex    line      -4000,p3,20000

kout      tablei    kindex,gifn,0,0,0
aout      =         kout
aindex    =         kindex
          outs      aindex,aout*30000
endin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The output (aout) is a stream of zeros. If you make the table
smaller (8192 or less), the output is fine. This bug probably
exists also for a-rate tables, but I didn't test it.


Regards,
Erez Webman