A possible solution is a ftable that contains the numbers of the used instruments, for example -d -odac sr = 44100 ksmps = 64 nchnls = 1 0dbfs = 1 ginstab ftgen 0, 0, 4, -2, 143, 221, 39 opcode turnoff_all, 0, ii imode, irelease xin ilen = ftlen(ginstab) kndx init 0 if (kndx < ilen) then kinsno table kndx, ginstab turnoff2 kinsno, imode, irelease else turnoff endif kndx = kndx + 1 endop instr 143, 221, 39 kamp expsegr 0.001, 0.1, 0.2, p3-0.1, 0.2, 0.1, 0.001 aout poscil3 kamp, p4, 1 out aout endin instr stop turnoff_all 0, 1 endin f1 0 8192 10 1 i143 0 36000 440 i221 1 36000 660 i39 2 36000 880 i "stop" 4 0.1 e tito