Debian Codegraph @

examples/vrandi.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in No messages
5 -odac -iadc -d ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o vrandi.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr=44100
12 ksmps=128
13 nchnls=2
14
15 ;Example by Andres Cabrera
16
17 gitab ftgen 0, 0, 16, -7, 0, 128, 0
18
19 instr 1
20 krange init p4
21 kcps init p5
22 ioffset init p6
23 ; table krange kcps ielements idstoffset iseed isize ioffset
24 vrandi gitab, krange, kcps, 3, 3, 2, 1, ioffset
25
26 kfreq1 table 3, gitab
27 kfreq2 table 4, gitab
28 kfreq3 table 5, gitab
29
30 ;Change the frequency of three oscillators according to the random values
31 aosc1 oscili 4000, kfreq1, 1
32 aosc2 oscili 2000, kfreq2, 1
33 aosc3 oscili 4000, kfreq3, 1
34
35 outs aosc1+aosc2, aosc3+aosc2
36 endin
37
38 </CsInstruments>
39 <CsScore>
40
41 f 1 0 2048 10 1
42
43 ; krange kcps ioffset
44 i 1 0 5 100 1 300
45 i 1 5 5 5 1 400
46 i 1 10 5 100 2 1000
47 i 1 15 5 400 4 1000
48 i 1 20 5 1000 8 2000
49 i 1 20 5 300 32 350
50
51 e
52
53 </CsScore>
54 </CsoundSynthesizer>