Debian Codegraph @

examples/vrandh.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 vranh.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10 ;Example by Andres Cabrera
11
12 sr=44100
13 ksmps=128
14 nchnls=2
15
16 gitab ftgen 0, 0, 16, -7, 0, 128, 0
17
18
19 instr 1
20 krange init p4
21 kcps init p5
22 ioffset init p6
23
24 kav1 init 0
25 kav2 init 0
26 kcount init 0
27
28 ; table krange kcps ielements idstoffset iseed isize ioffset
29 vrandh gitab, krange, kcps, 3, 3, 2, 0, ioffset
30
31 kfreq1 table 3, gitab
32 kfreq2 table 4, gitab
33 kfreq3 table 5, gitab
34
35 ;Change the frequency of three oscillators according to the random values
36 aosc1 oscili 4000, kfreq1, 1
37 aosc2 oscili 2000, kfreq2, 1
38 aosc3 oscili 4000, kfreq3, 1
39
40 outs aosc1+aosc2, aosc3+aosc2
41 endin
42
43 </CsInstruments>
44 <CsScore>
45 f 1 0 1024 10 1
46 ; krange kcps ioffset
47 i 1 0 5 100 1 300
48 i 1 5 5 300 1 400
49 i 1 10 5 100 2 1000
50 i 1 15 5 400 4 1000
51 i 1 20 5 1000 8 2000
52 i 1 25 5 250 16 300
53 e
54
55 </CsScore>
56 </CsoundSynthesizer>