Debian Codegraph @

src/Examples/FLOSS Manual Examples/03 Csound Language/03I07_functional_syntax_udo_2.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -odac
4 </CsOptions>
5 <CsInstruments>
6 sr = 44100
7 nchnls = 2
8 ksmps = 32
9 0dbfs = 1
10
11 opcode FourModes, a, akk[]
12 aIn, kBasFreq, kFQ[] xin
13 aOut1 = mode:a(aIn,kBasFreq*kFQ[0],kFQ[1])
14 aOut2 = mode:a(aIn,kBasFreq*kFQ[2],kFQ[3])
15 aOut3 = mode:a(aIn,kBasFreq*kFQ[4],kFQ[5])
16 aOut4 = mode:a(aIn,kBasFreq*kFQ[6],kFQ[7])
17 xout (aOut1+aOut2+aOut3+aOut4) / 4
18 endop
19
20 instr 1
21 kArr[] = fillarray(1, 2000, 2.8, 2000, 5.2, 2000, 8.2, 2000)
22 aImp = mpulse:a(.3, 1)
23 aOut = FourModes(aImp, randomh:k(200,195,1), kArr)
24 out(aOut, aOut)
25 endin
26
27 </CsInstruments>
28 <CsScore>
29 i 1 0 10
30 </CsScore>
31 </CsoundSynthesizer>
32 ;example by joachim heintz, based on an example of iain mccurdy