Debian Codegraph @

examples/fluidSetInterpMethod.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;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 fluidSetInterpMethod.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 giengine fluidEngine
17 ; soundfont path to manual/examples
18 isfnum fluidLoad "07AcousticGuitar.sf2", giengine, 1
19 fluidProgramSelect giengine, 1, isfnum, 0, 0
20
21 instr 1
22
23 mididefault 60, p3
24 midinoteonkey p4, p5
25 ikey init p4
26 ivel init p5
27 iInterpMethod = p6
28 fluidSetInterpMethod giengine, 1, iInterpMethod
29 fluidNote giengine, 1, ikey, ivel
30
31 endin
32
33 instr 99
34
35 imvol init 7
36 asigl, asigr fluidOut giengine
37 outs asigl*imvol, asigr*imvol
38
39 endin
40 </CsInstruments>
41 <CsScore>
42 ;hear the difference
43 i 1 0 2 60 120 0 ;no interpolation
44 i 1 3 2 72 120 0
45 i 1 6 2 60 120 7 ;7th order interpolation
46 i 1 9 2 72 120 7
47
48 i 99 0 12
49
50 e
51 </CsScore>
52 </CsoundSynthesizer>