On Tuesday 14 March 2006 12:11, Victor Lazzarini wrote: > In fact, I was wrong about tablew, it was table that seemed to > have changed. The Rasmus Ekman cs 4 help says > > ar table xndx, ifn [,ixmode][, ixoff][, iwrap] > > and in Csound 4.23 you can use a k-rate index for reading > the table. The same does not seem to apply for Csound 5. > > The UDO below compiles on 4.23 but not on 5: > > ... > > as1 table krp, ifn, 0, 0, 1 /* 'read-head' 1 */ > as2 table krp, ifn, 0, ihl, 1 /* 'read-head' 2 */ > amix = as1*kenv + as2*(1-kenv) /* mixed signal */ Yes, this is the case where table would treat a control rate signal (a single MYFLT value) as if it was audio rate (a vector of MYFLT values), resulting in strange behavior if ksmps is not 1, and is now not allowed. Although in this case you could just use k-rate output variables anyway - which is even slightly more efficient - since the UDO does have setksmps 1: ks1 table krp, ifn, 0, 0, 1 /* 'read-head' 1 */ ks2 table krp, ifn, 0, ihl, 1 /* 'read-head' 2 */ amix = ks1*kenv + ks2*(1-kenv) /* mixed signal */ It is possible however to add code to the a-rate table/tablei/table3 to correctly implement this at a small cost in performance, although reading into an a-rate variable from a k-rate index can be easily avoided as shown above. ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net