| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in No messages |
| 5 |
-odac -iadc -d ;;;RT audio I/O |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o locsend_quad.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; Initialize the global variables. |
| 12 |
sr = 44100 |
| 13 |
kr = 4410 |
| 14 |
ksmps = 10 |
| 15 |
nchnls = 4 |
| 16 |
|
| 17 |
ga1 init 0 |
| 18 |
ga2 init 0 |
| 19 |
ga3 init 0 |
| 20 |
ga4 init 0 |
| 21 |
; Instrument #1 |
| 22 |
instr 1 |
| 23 |
; Use the "drumsMlp.wav" audio file. |
| 24 |
aout diskin2 "drumsMlp.wav", 1, 0, 1 |
| 25 |
kdegree line 0, p3, 360 |
| 26 |
kdistance line 1, p3 , 10 |
| 27 |
a1, a2, a3, a4 locsig aout, kdegree, kdistance, .1 |
| 28 |
ar1, ar2, ar3, ar4 locsend |
| 29 |
ga1 = ga1+ar1 |
| 30 |
ga2 = ga2+ar2 |
| 31 |
ga3 = ga3+ar3 |
| 32 |
ga4 = ga4+ar4 |
| 33 |
|
| 34 |
outq a1, a2, a3, a4 |
| 35 |
endin |
| 36 |
|
| 37 |
instr 99 ; reverb instrument |
| 38 |
a1 reverb2 ga1, 3.5, .5 |
| 39 |
a2 reverb2 ga2, 3.5, .5 |
| 40 |
a3 reverb2 ga3, 3.5, .5 |
| 41 |
a4 reverb2 ga4, 3.5, .5 |
| 42 |
|
| 43 |
outq a1, a2, a3, a4 |
| 44 |
|
| 45 |
ga1 = 0 |
| 46 |
ga2 = 0 |
| 47 |
ga3 = 0 |
| 48 |
ga4 = 0 |
| 49 |
|
| 50 |
endin |
| 51 |
</CsInstruments> |
| 52 |
<CsScore> |
| 53 |
|
| 54 |
; Table #1, a sine wave. |
| 55 |
f 1 0 16384 10 1 |
| 56 |
|
| 57 |
i 1 0 2 |
| 58 |
i99 0 5 |
| 59 |
e |
| 60 |
|
| 61 |
|
| 62 |
</CsScore> |
| 63 |
</CsoundSynthesizer> |