Debian Codegraph @

src/Examples/FLOSS Manual Examples/04 Sound Synthesis/04C03_RingMod.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -o dac
4 </CsOptions>
5 <CsInstruments>
6
7 sr = 44100
8 ksmps = 32
9 nchnls = 2
10 0dbfs = 1
11
12 instr Carrier
13 aPartial_1 poscil .2, 400
14 aPartial_2 poscil .2, 800
15 aPartial_3 poscil .2, 1200
16 gaCarrier sum aPartial_1, aPartial_2, aPartial_3
17 ;only output this signal if RM is not playing
18 if (active:k("RM") == 0) then
19 out gaCarrier, gaCarrier
20 endif
21 endin
22
23 instr RM
24 iModFreq = p4
25 aRM = gaCarrier * poscil:a(1,iModFreq)
26 out aRM, aRM
27 endin
28
29 </CsInstruments>
30 <CsScore>
31 i "Carrier" 0 14
32 i "RM" 3 3 100
33 i "RM" 9 3 50
34 </CsScore>
35 </CsoundSynthesizer>
36 ;example by joachim heintz