File: osciln.csd

package info (click to toggle)
csound-manual 1%3A6.08.0~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 34,580 kB
  • sloc: xml: 193,471; python: 1,332; makefile: 783
file content (48 lines) | stat: -rw-r--r-- 1,074 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
<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 osciln.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

gione ftgen 1, 0, 1024, 7, 0, 1,   1, 1024, 0
gitwo ftgen 2, 0, 1024, 7, 0, 512, 1, 512,  0

instr 1	;very simple waveguide system

ifn     = p4
ipitch  = p5
itimes  = p6
iperiod = 1000/ipitch

afeed   init   0
aimpl   osciln 1, ipitch, ifn, itimes   ;use as excitation signal
arefl   tone   aimpl + afeed, 4000
aout    atone  arefl, 5000
afeed   vdelay arefl, iperiod, 10
        outs   aout*3, aout*3
          
endin
</CsInstruments>
<CsScore>

i 1 0  4 1 110 1	;use different tables,
i 1 5  4 2 110 1	;& different pitch
i 1 10 4 1 110 10	;& different number of times the table is read
i 1 15 4 2 110 10
i 1 20 6 1 880 1	
i 1 25 3 2 880 1
i 1 30 3 1 880 10
i 1 35 3 2 880 10

e
</CsScore>
</CsoundSynthesizer>