| There are some table functions in the API that might help?
PUBLIC MYFLT csoundTableGet ( CSOUND *,int table, int index)
Returns the value of a slot in a function table. The table number and
index are assumed to be valid.
PUBLIC int csoundTableLength(CSOUND * ,int table )
Returns the length of a function table (not including the guard
point), or -1 if the table does not exist.
PUBLIC void csoundTableSet( CSOUND *,int table,int index, MYFLT value)
Sets the value of a slot in a function table. The table number and
index are assumed to be valid.
PUBLIC int csoundGetTable(CSOUND *, MYFLT ** tablePtr, int tableNum)
Stores pointer to function table 'tableNum' in *tablePtr, and returns
the table length (not including the guard point). If the table does
not exist, *tablePtr is set to NULL and -1 is returned.
Rory.
On 7 June 2011 14:20, peiman khosravi wrote:
> I am wondering if it is possible to access csound tables directly from
> within a python orchestra block. To, for instance, write table values from
> python arrays and so on.
>
> Otherwise what is the best solution for this problem (?):
>
> I would like to read a text-file that contains x, y pairs and use the values
> to fill csound tables (like GEN17). Naturally I cannot simply write the y
> values at x indexes because this leaves the intervening indexes unaltered.
> Any ideas are welcome.
>
> Best,
>
> Peiman
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|