| 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 fluidAllOut.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 |
isfnum1 fluidLoad "sf_GMbank.sf2", giengine1, 1 |
| 18 |
fluidProgramSelect giengine1, 1, isfnum1, 0, 0 |
| 19 |
|
| 20 |
giengine2 fluidEngine |
| 21 |
; soundfont path to manual/examples |
| 22 |
isfnum2 fluidLoad "22Bassoon.sf2", giengine2, 1 |
| 23 |
fluidProgramSelect giengine2, 1, isfnum2, 0, 70 |
| 24 |
|
| 25 |
instr 1 |
| 26 |
|
| 27 |
mididefault 60, p3 |
| 28 |
midinoteonkey p4, p5 |
| 29 |
ikey init p4 |
| 30 |
ivel init p5 |
| 31 |
fluidNote giengine1, 1, ikey, ivel |
| 32 |
|
| 33 |
endin |
| 34 |
|
| 35 |
instr 2 |
| 36 |
|
| 37 |
mididefault 60, p3 |
| 38 |
midinoteonkey p4, p5 |
| 39 |
ikey init p4 |
| 40 |
ivel init p5 |
| 41 |
fluidNote giengine2, 1, ikey, ivel |
| 42 |
|
| 43 |
endin |
| 44 |
|
| 45 |
instr 100 |
| 46 |
|
| 47 |
imvol init 7 ;amplify a bit |
| 48 |
asigl, asigr fluidAllOut |
| 49 |
outs asigl*imvol, asigr*imvol |
| 50 |
|
| 51 |
endin |
| 52 |
</CsInstruments> |
| 53 |
<CsScore> |
| 54 |
|
| 55 |
i 1 0 2 60 127 ;play one note on instr 1 |
| 56 |
i 2 2 2 60 127 ;play another note on instr 2 and... |
| 57 |
i 100 0 60 ;play virtual midi keyboard |
| 58 |
e |
| 59 |
</CsScore> |
| 60 |
</CsoundSynthesizer> |