| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in |
| 5 |
;-odac -iadc ;;;RT audio I/O |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
-o vbap8.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
sr = 44100 |
| 12 |
kr = 441 |
| 13 |
ksmps = 100 |
| 14 |
nchnls = 4 |
| 15 |
vbaplsinit 2, 8, 0, 45, 90, 135, 200, 245, 290, 315 |
| 16 |
|
| 17 |
instr 1 |
| 18 |
asig oscil 20000, 440, 1 |
| 19 |
a1,a2,a3,a4,a5,a6,a7,a8 vbap8 asig, p4, 0, 20 ;p4 = azimuth |
| 20 |
|
| 21 |
;render twice with alternate outq statements |
| 22 |
; to obtain two 4 channel .wav files: |
| 23 |
|
| 24 |
outq a1,a2,a3,a4 |
| 25 |
; outq a5,a6,a7,a8 |
| 26 |
; or use an 8-channel output for realtime output (set nchnls to 8): |
| 27 |
; outo a1,a2,a3,a4,a5,a6,a7,a8 |
| 28 |
endin |
| 29 |
|
| 30 |
|
| 31 |
</CsInstruments> |
| 32 |
<CsScore> |
| 33 |
f 1 0 8192 10 1 |
| 34 |
; Play Instrument #1 for one second. |
| 35 |
; azimuth |
| 36 |
i 1 0 1 20 |
| 37 |
i 1 + . 40 |
| 38 |
i 1 + . 60 |
| 39 |
i 1 + . 80 |
| 40 |
i 1 + . 100 |
| 41 |
i 1 + . 120 |
| 42 |
i 1 + . 140 |
| 43 |
i 1 + . 160 |
| 44 |
e |
| 45 |
|
| 46 |
|
| 47 |
</CsScore> |
| 48 |
</CsoundSynthesizer> |