File: fof.csd

package info (click to toggle)
csound-manual 1%3A6.02~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 28,052 kB
  • ctags: 234
  • sloc: xml: 179,174; python: 1,198; makefile: 570
file content (82 lines) | stat: -rw-r--r-- 1,945 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac     ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o fof.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32  
nchnls = 2

instr 1
  ; Combine five formants together to create 
  ; a transformation from an alto-"a" sound
  ; to an alto-"i" sound.
  ; Values common to all of the formants.
  kfund init 261.659
  koct init 0
  kris init 0.003
  kdur init 0.02
  kdec init 0.007
  iolaps = 100
  ifna = 1
  ifnb = 2
  itotdur = p3

  ; First formant.
  k1amp = ampdb(0)
  k1form line 800, p3, 350
  k1band line 80, p3, 50

  ; Second formant.
  k2amp line ampdb(-4), p3, ampdb(-20)
  k2form line 1150, p3, 1700
  k2band line 90, p3, 100

  ; Third formant.
  k3amp line ampdb(-20), p3, ampdb(-30)
  k3form line 2800, p3, 2700
  k3band init 120

  ; Fourth formant.
  k4amp init ampdb(-36)
  k4form line 3500, p3, 3700
  k4band line 130, p3, 150

  ; Fifth formant.
  k5amp init ampdb(-60)
  k5form init 4950
  k5band line 140, p3, 200

  a1 fof k1amp, kfund, k1form, koct, k1band, kris, \
         kdur, kdec, iolaps, ifna, ifnb, itotdur
  a2 fof k2amp, kfund, k2form, koct, k2band, kris, \
         kdur, kdec, iolaps, ifna, ifnb, itotdur
  a3 fof k3amp, kfund, k3form, koct, k3band, kris, \
         kdur, kdec, iolaps, ifna, ifnb, itotdur
  a4 fof k4amp, kfund, k4form, koct, k4band, kris, \
         kdur, kdec, iolaps, ifna, ifnb, itotdur
  a5 fof k5amp, kfund, k5form, koct, k5band, kris, \
         kdur, kdec, iolaps, ifna, ifnb, itotdur

  ; Combine all of the formants together
asig sum (a1+a2+a3+a4+a5) * 13000
     outs asig, asig

endin
</CsInstruments>
<CsScore>
; sine wave
f 1 0 4096 10 1
; sigmoid wave
f 2 0 1024 19 0.5 0.5 270 0.5

i 1 0 1
i 1 2 5	; same but slower
e
</CsScore>
</CsoundSynthesizer>