| 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 gen01.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 |
instr 1 ;plays deferred and non-deferred sounds with loscil |
| 17 |
|
| 18 |
ifn = p4 |
| 19 |
ibas = 1 |
| 20 |
|
| 21 |
asig loscil 1, 1, ifn, ibas |
| 22 |
outs asig, asig |
| 23 |
|
| 24 |
endin |
| 25 |
|
| 26 |
instr 2 ;plays only non-deffered sound |
| 27 |
|
| 28 |
isnd = p4 |
| 29 |
aread line sr*p3, p3, 0 ;play this backward |
| 30 |
asig tablei aread, isnd ;use table 1 |
| 31 |
outs asig, asig |
| 32 |
|
| 33 |
endin |
| 34 |
</CsInstruments> |
| 35 |
<CsScore> |
| 36 |
f 1 0 131072 1 "drumsMlp.wav" 0 0 0 ;non-deferred sound |
| 37 |
f 2 0 0 1 "flute.aiff" 0 0 0 ;& deferred sounds in |
| 38 |
f 3 0 0 1 "drumsMlp.ogg" 0 0 0 ;different formats |
| 39 |
|
| 40 |
i 1 0 1 1 |
| 41 |
i 1 + 1 2 |
| 42 |
i 1 + 1 3 |
| 43 |
|
| 44 |
i 2 4 2 1 ;non-deffered sound for instr. 2 |
| 45 |
e |
| 46 |
</CsScore> |
| 47 |
</CsoundSynthesizer> |
| 48 |
|