I don't know if it is correct, because luajit-2 doesn't work well with my gnu/linux 64bit sr = 44100 ksmps = 64 nchnls = 1 lua_opdef "ftgen", {{ local ffi = require("ffi") local cslib = ffi.load('csound64' or 'csound') -- WARNING: csound single float version: replace double with float ffi.cdef[[ int csoundScoreEvent(void *, char, const double *, long); struct ftgen_ct { double pfields[9]; }; ]] function ftgen_init(csound, opcode, carguments) local args = ffi.cast("struct ftgen_ct *", carguments) -- WARNING: no parameters check cslib.csoundScoreEvent(csound, 102, args.pfields, 9) return 0 end ftgen_kontrol = ftgen_init }} instr 1 kh1 expon 0.001, p3, 1 kh2 = kh1*0.5 lua_ikopcall "ftgen", 1, 0, 1024, 10, kh1, 1-kh1, kh2, 0.5-kh2, 0.05 aout oscil 15000, 440, 1 out aout endin i1 0 3 tito On Sat, Dec 03, 2011 at 09:02:20PM +0000, Rory Walsh wrote: > I hadn't spotted that, but it's a-rate only and it looks like it > interpolates between each value in the table. At the moment I'm doing > something like this: > > kTable ctrl7 1,1, 1, 5 > kfreq ctrl7 1, 2, 0, 10 > > kArpIndex phasor kfreq > if(int(kTable)==1) then > kArp tab kArpIndex, 1, 1 > elseif(int(kTable)==2) then > kArp tab kArpIndex, 2, 1 > elseif(int(kTable)==3) then > kArp tab kArpIndex, 3, 1 > elseif(int(kTable)==4) then > kArp tab kArpIndex, 4, 1 > endif 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"