Debian Codegraph @

examples/randc.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime 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 randc.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 ; by Menno Knevel - 2024
17
18 instr 1 ;same values every time
19
20 krnd randc 100, 10
21 printk .5, krnd ; look
22 aout oscili 0.8, 440+krnd ; & listen
23 outs aout, aout
24
25 endin
26
27 instr 2 ;different values every time
28
29 krnd randc 100, 10, 10 ; seed from system clock
30 printk .5, krnd ; look
31 aout oscili 0.8, 440+krnd ; & listen
32 outs aout, aout
33
34 endin
35 </CsInstruments>
36 <CsScore>
37 i 1 0 3
38 i 2 4 3
39 e
40 </CsScore>
41 </CsoundSynthesizer>