[Csnd] calling an instrument many times
Date | 2013-10-29 17:15 |
From | Stefan Thomas |
Subject | [Csnd] calling an instrument many times |
Dear community, I would like to call an instrument with event_i many times, with different parameters.<CsoundSynthesizer> <CsOptions> -odac -m0d </CsOptions> ; ============================================== <CsInstruments> sr = 44100 ksmps = 100 nchnls = 2 0dbfs = 1 gisine ftgen 0,0,2^13, 10, 1 instr 1 iamp = 0.1 iein = 0.01 irel = 0.1 idur = 1 imax = 3 loop: index = 0 icps = 440*cent(100*index) insnum = 100 + 0.1*(index+1) ibeg = index*idur event_i "i", insnum, ibeg, idur,iamp,icps,iein,irel loop_lt index, 1, imax, loop endin instr 100 idur = p3 iamp = p4 icps = p5 iein = p6 irel = p7 aenv linseg 0,iein,1,p3-iein-irel,1,irel,0 aout poscil iamp*aenv, icps, gisine outs aout, aout endin </CsInstruments> ; ============================================== <CsScore> i1 0 30 </CsScore> </CsoundSynthesizer> |