Debian Codegraph @

src/Examples/FLOSS Manual Examples/03 Csound Language/03C18_Timout_random_durations.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -odac
4 </CsOptions>
5 <CsInstruments>
6 sr = 44100
7 ksmps = 32
8 nchnls = 2
9 0dbfs = 1
10
11 giSine ftgen 0, 0, 2^10, 10, 1
12
13 instr 1
14 loop:
15 idur random .5, 3 ;new value between 0.5 and 3 seconds each time
16 timout 0, idur, play
17 reinit loop
18 play:
19 kFreq expseg 400, idur, 600
20 aTone poscil .2, kFreq, giSine
21 outs aTone, aTone
22 endin
23
24 </CsInstruments>
25 <CsScore>
26 i 1 0 20
27 </CsScore>
28 </CsoundSynthesizer>
29 ;example by joachim heintz