On Monday 20 February 2006 23:31, Tobiah wrote: > Is something like this possible with csound? > > aout = 0 > > for rep in range(100): > > pitch = rnd(1000) + 100 > > asig oscil 1000 pitch 1 > > aout = aout + asig > > out aout If you mean 100 parallel instances of the oscillator, then you can get that with a recursive user defined opcode (although not quite as elegant as the above Python-like syntax, and for a static number of oscillators is also not as efficient as just using macros): sr = 48000 ksmps = 32 nchnls = 1 opcode oscilArray, a, i icnt xin ipitch = rnd(1000) + 100 aout oscils 1000, ipitch, 0 if (icnt > 1) then atmp oscilArray icnt - 1 vincr aout, atmp endif xout aout endop instr 1 a1 oscilArray 100 out a1 * 0.4 endin i 1 0 3 e