Debian Codegraph @

examples/virtual.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>; Select audio/midi flags here according to platform
3 ; Audio out Audio in Virtual MIDI -M0 is needed anyway
4 -odac -iadc -+rtmidi=virtual -M0
5 </CsOptions>
6
7 <CsInstruments>
8 ; By Mark Jamerson 2007
9
10 sr=44100
11 ksmps=10
12 nchnls=2
13
14 massign 1,1
15 prealloc 1,10
16
17 instr 1 ;Midi FM synth
18
19 inote cpsmidi
20 iveloc ampmidi 10000
21 idur = 2
22 xtratim 1
23
24 kgate oscil 1,10,2
25 anoise noise 100*inote,.99
26 acps samphold anoise,kgate
27 aosc oscili 1000,acps,1
28 aout = aosc
29
30 ; Use controller 7 to control volume
31 kvol ctrl7 1, 7, 0.2, 1
32
33 outs kvol * aout, kvol * aout
34
35 endin
36
37 </CsInstruments>
38
39 <CsScore>
40 f0 3600
41 f1 0 1024 10 1
42 f2 0 16 7 1 8 0 8
43 f3 0 1024 10 1 .5 .6 .3 .2 .5
44
45 e
46 </CsScore>
47 </CsoundSynthesizer>