Debian Codegraph @

examples/randomh.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in
5 -odac ;;;realtime audio out
6 ; For Non-realtime ouput leave only the line below:
7 ; -o randomh.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; by Kevin Conder & Menno Knevel, adapted for new args by Francois Pinot.
12
13 sr = 44100
14 ksmps = 32
15 nchnls = 2
16 0dbfs = 1
17
18 seed 0
19
20 instr 1
21
22 kmin init 220; Choose a random frequency between 220 and 440 Hz.
23 kmax init 440
24 kcps init 10; Generate new random numbers at 10 Hz.
25 imode = p4
26 ifstval = p5
27
28 printf_i "\nMode: %d\n", 1, imode
29 k1 randomh kmin, kmax, kcps, imode, ifstval
30 printk2 k1
31 asig poscil 1, k1
32 outs asig, asig
33 endin
34
35 </CsInstruments>
36 <CsScore>
37 ; each time with a different mode.
38 i 1 0 1
39 i 1 2 1 2 330
40 i 1 4 1 3
41 e
42 </CsScore>
43 </CsoundSynthesizer>