| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in |
| 5 |
-odac ;;;RT audio out |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o nstance.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 |
|
| 17 |
instr 1 ; Instrument #1 - oscillator with a high note. |
| 18 |
|
| 19 |
iHandle nstance 2, .3, p3 ; Play Instrument #2 0.3 seconds later |
| 20 |
a1 oscils .5, 880, 1 ; a high note |
| 21 |
outs a1 * .5, a1 ; ... a bit to the right |
| 22 |
print iHandle |
| 23 |
endin |
| 24 |
|
| 25 |
|
| 26 |
instr 2 ; Instrument #2 - oscillator with a low note. |
| 27 |
|
| 28 |
a1 oscils .5, 110, 1 ; a low note |
| 29 |
outs a1, a1 * .5 ; ... a bit to the left |
| 30 |
endin |
| 31 |
|
| 32 |
|
| 33 |
</CsInstruments> |
| 34 |
<CsScore> |
| 35 |
f 1 0 16384 10 1 ; a sine wave. |
| 36 |
|
| 37 |
i 1 0 1 |
| 38 |
i 1 2 .5 |
| 39 |
e |
| 40 |
</CsScore> |
| 41 |
</CsoundSynthesizer> |
| 42 |
|