File: fluidOut.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 (72 lines) | stat: -rw-r--r-- 1,592 bytes parent folder | download | duplicates (6)
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
<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac   -+rtmidi=virtual  -M0    ;;;realtime audio out and realtime midi in
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
;-o fluidOut.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

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

giengine1 fluidEngine
; soundfont path to manual/examples
isfnum1	 fluidLoad "01hpschd.sf2", giengine1, 1
	 fluidProgramSelect giengine1, 1, isfnum1, 0, 0

giengine2 fluidEngine
; soundfont path to manual/examples
isfnum2	 fluidLoad "22Bassoon.sf2", giengine2, 1
	 fluidProgramSelect giengine2, 1, isfnum2, 0, 70

instr 1

	mididefault   60, p3
	midinoteonkey p4, p5
ikey	init p4
ivel	init p5
	fluidNote giengine1, 1, ikey, ivel

endin

instr 2

	mididefault   60, p3
	midinoteonkey p4, p5
ikey	init p4
ivel	init p5
	fluidNote giengine2, 1, ikey, ivel

endin

instr 98

imvol  init 7
asigl, asigr fluidOut giengine1
       outs asigl*imvol, asigr*imvol
endin

instr 99

imvol init 4
asigl, asigr fluidOut giengine2		 ;add a stereo flanger
adelL linseg 0, p3*.5, 0.02, p3*.5, 0	 ;max delay time =20ms
adelR linseg 0.02, p3*.5, 0, p3*.5, 0.02 ;max delay time =20ms		
asigL flanger asigl, adelL, .6
asigR flanger asigr, adelR, .6
      outs asigL*imvol, asigR*imvol
endin
</CsInstruments>
<CsScore>

i 1 0 2 60 100 ;play one note of instr 1
i 2 2 2 60 100 ;play another note of instr 2 and...
i 98 0 60      ;play virtual keyboard for 60 sec.
i 99 0 60
e
</CsScore>
</CsoundSynthesizer>