Debian Codegraph @

src/Examples/FLOSS Manual Examples/04 Sound Synthesis/04D11_Phase modulation and Feedback FM.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 giSine ftgen 0, 0, 8192, 10, 1
13
14 instr PM
15 kCarFreq = 200
16 kModFreq = 280
17 kModFactor = kCarFreq/kModFreq
18 kIndex = 12/6.28 ; 12/2pi to convert from radians to norm. table index
19 aEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
20 aModulator poscil kIndex*aEnv, kModFreq
21 aPhase phasor kCarFreq
22 aCarrier tablei aPhase+aModulator, giSine, 1, 0, 1
23 out aCarrier*aEnv, aCarrier*aEnv
24 endin
25
26 </CsInstruments>
27 <CsScore>
28 i "PM" 0 9
29 </CsScore>
30 </CsoundSynthesizer>
31 ;example by Alex Hofmann