Debian Codegraph @

examples/fof.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 realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o fof.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14
15 instr 1
16 ; Combine five formants together to create
17 ; a transformation from an alto-"a" sound
18 ; to an alto-"i" sound.
19 ; Values common to all of the formants.
20 kfund init 261.659
21 koct init 0
22 kris init 0.003
23 kdur init 0.02
24 kdec init 0.007
25 iolaps = 100
26 ifna = 1
27 ifnb = 2
28 itotdur = p3
29
30 ; First formant.
31 k1amp = ampdb(0)
32 k1form line 800, p3, 350
33 k1band line 80, p3, 50
34
35 ; Second formant.
36 k2amp line ampdb(-4), p3, ampdb(-20)
37 k2form line 1150, p3, 1700
38 k2band line 90, p3, 100
39
40 ; Third formant.
41 k3amp line ampdb(-20), p3, ampdb(-30)
42 k3form line 2800, p3, 2700
43 k3band init 120
44
45 ; Fourth formant.
46 k4amp init ampdb(-36)
47 k4form line 3500, p3, 3700
48 k4band line 130, p3, 150
49
50 ; Fifth formant.
51 k5amp init ampdb(-60)
52 k5form init 4950
53 k5band line 140, p3, 200
54
55 a1 fof k1amp, kfund, k1form, koct, k1band, kris, \
56 kdur, kdec, iolaps, ifna, ifnb, itotdur
57 a2 fof k2amp, kfund, k2form, koct, k2band, kris, \
58 kdur, kdec, iolaps, ifna, ifnb, itotdur
59 a3 fof k3amp, kfund, k3form, koct, k3band, kris, \
60 kdur, kdec, iolaps, ifna, ifnb, itotdur
61 a4 fof k4amp, kfund, k4form, koct, k4band, kris, \
62 kdur, kdec, iolaps, ifna, ifnb, itotdur
63 a5 fof k5amp, kfund, k5form, koct, k5band, kris, \
64 kdur, kdec, iolaps, ifna, ifnb, itotdur
65
66 ; Combine all of the formants together
67 asig sum (a1+a2+a3+a4+a5) * 13000
68 outs asig, asig
69
70 endin
71 </CsInstruments>
72 <CsScore>
73 ; sine wave
74 f 1 0 4096 10 1
75 ; sigmoid wave
76 f 2 0 1024 19 0.5 0.5 270 0.5
77
78 i 1 0 1
79 i 1 2 5 ; same but slower
80 e
81 </CsScore>
82 </CsoundSynthesizer>