Debian Codegraph @

examples/fluidOut.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac -+rtmidi=virtual -M0 ;;;realtime audio out and realtime midi in
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ;-o fluidOut.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14 0dbfs = 1
15
16 giengine1 fluidEngine
17 ; soundfont path to manual/examples
18 isfnum1 fluidLoad "01hpschd.sf2", giengine1, 1
19 fluidProgramSelect giengine1, 1, isfnum1, 0, 0
20
21 giengine2 fluidEngine
22 ; soundfont path to manual/examples
23 isfnum2 fluidLoad "22Bassoon.sf2", giengine2, 1
24 fluidProgramSelect giengine2, 1, isfnum2, 0, 70
25
26 instr 1
27
28 mididefault 60, p3
29 midinoteonkey p4, p5
30 ikey init p4
31 ivel init p5
32 fluidNote giengine1, 1, ikey, ivel
33
34 endin
35
36 instr 2
37
38 mididefault 60, p3
39 midinoteonkey p4, p5
40 ikey init p4
41 ivel init p5
42 fluidNote giengine2, 1, ikey, ivel
43
44 endin
45
46 instr 98
47
48 imvol init 7
49 asigl, asigr fluidOut giengine1
50 outs asigl*imvol, asigr*imvol
51 endin
52
53 instr 99
54
55 imvol init 4
56 asigl, asigr fluidOut giengine2 ;add a stereo flanger
57 adelL linseg 0, p3*.5, 0.02, p3*.5, 0 ;max delay time =20ms
58 adelR linseg 0.02, p3*.5, 0, p3*.5, 0.02 ;max delay time =20ms
59 asigL flanger asigl, adelL, .6
60 asigR flanger asigr, adelR, .6
61 outs asigL*imvol, asigR*imvol
62 endin
63 </CsInstruments>
64 <CsScore>
65
66 i 1 0 2 60 100 ;play one note of instr 1
67 i 2 2 2 60 100 ;play another note of instr 2 and...
68 i 98 0 60 ;play virtual keyboard for 60 sec.
69 i 99 0 60
70 e
71 </CsScore>
72 </CsoundSynthesizer>