Debian Codegraph @

examples/sfinstr3m.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o sfinstr3m.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 ; By Menno Knevel - 2020
17
18 gisf sfload "07AcousticGuitar.sf2"
19 sfilist gisf
20
21 instr 1
22
23 inum = p4
24 ivel = p5
25 kamp linsegr 1, 1, 1, .1, 0
26 kamp = kamp/900000 ;scale amplitude, small value because of 0dbfs = 1
27 kfreq = 1 ;do not change freq from sf
28 aout sfinstr3m ivel, inum, kamp*ivel, kfreq, 0, gisf
29 outs aout, aout
30 endin
31
32 </CsInstruments>
33 <CsScore>
34
35 i1 0 1 60 127
36 i1 + 1 62 <
37 i1 + 1 65 <
38 i1 + 1 69 10
39
40 e
41 </CsScore>
42 </CsoundSynthesizer>