| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;realtime audio out |
| 5 |
;-iadc ;;;uncomment -iadc if RT audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o sfplist.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; By Menno Knevel - 2020 |
| 12 |
|
| 13 |
sr = 44100 |
| 14 |
ksmps = 32 |
| 15 |
nchnls = 2 |
| 16 |
0dbfs = 1 |
| 17 |
|
| 18 |
gisf sfload "sf_GMbank.sf2" |
| 19 |
sfplist gisf ;list all 329 presets of Soundfont |
| 20 |
gir sfpreset 125, 3, gisf, 0 ;choose preset 125 = Car Pass |
| 21 |
|
| 22 |
instr 1 |
| 23 |
|
| 24 |
inum = p4 |
| 25 |
ivel = p5 |
| 26 |
kamp linsegr 1, 1, 1, .1, 0 |
| 27 |
kamp = kamp/700000 ;scale amplitude |
| 28 |
kfreq = 1 ;do not change freq from sf |
| 29 |
a1,a2 sfplay3 ivel, inum, kamp*ivel, kfreq, gir ; make amp velocity dependent |
| 30 |
outs a1, a2 |
| 31 |
|
| 32 |
endin |
| 33 |
|
| 34 |
</CsInstruments> |
| 35 |
<CsScore> |
| 36 |
|
| 37 |
i1 0 1 60 127 |
| 38 |
i1 + 1 62 < |
| 39 |
i1 + 1 65 < |
| 40 |
i1 + 1 69 10 |
| 41 |
|
| 42 |
e |
| 43 |
</CsScore> |
| 44 |
</CsoundSynthesizer> |