| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac -+rtmidi=virtual -M0 ;;;realtime audio out and 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 foutir.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 |
gihand fiopen "foutir.sco", 0 |
| 17 |
|
| 18 |
instr 1 ; play virtual midi keyboard |
| 19 |
|
| 20 |
inot notnum ;just for priting on screen |
| 21 |
icps cpsmidi |
| 22 |
iamp ampmidi 1 |
| 23 |
|
| 24 |
foutir gihand, 0, 1, icps, iamp |
| 25 |
prints "WRITING:\n" |
| 26 |
prints "note = %f,velocity = %f\n", icps, iamp ;prints them |
| 27 |
ficlose gihand |
| 28 |
asig pluck iamp, icps, 1000, 0, 1 |
| 29 |
outs asig, asig |
| 30 |
|
| 31 |
endin |
| 32 |
</CsInstruments> |
| 33 |
<CsScore> |
| 34 |
|
| 35 |
f 0 10 |
| 36 |
|
| 37 |
e |
| 38 |
</CsScore> |
| 39 |
</CsoundSynthesizer> |