Debian Codegraph @

examples/event_i.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;RT audio out
5 ;-iadc ;;;uncomment -iadc if RT audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o event_i.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14 0dbfs = 1
15
16 seed 0
17 gisine ftgen 0, 0, 2^10, 10, 1
18
19 instr 1 ;master instrument
20
21 ininstr = 10 ;number of called instances
22 indx = 0
23 loop:
24 ipan random 0, 1
25 ifreq random 100, 1000
26 iamp = 1/ininstr
27 event_i "i", 10, 0, p3, iamp, ifreq, ipan
28 loop_lt indx, 1, ininstr, loop
29
30 endin
31
32 instr 10
33
34 print p4, p5, p6
35 ipeak random 0, 1 ;where is the envelope peak
36 asig poscil3 p4, p5, gisine
37 aenv transeg 0, p3*ipeak, 6, 1, p3-p3*ipeak, -6, 0
38 aL,aR pan2 asig*aenv, p6
39 outs aL, aR
40
41 endin
42
43 </CsInstruments>
44 <CsScore>
45 i1 0 10
46 i1 8 10
47 i1 16 15
48 e
49 </CsScore>
50 </CsoundSynthesizer>