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 vbap4move.wav -W ;;; for file output any platform
8</CsOptions>
9<CsInstruments>
10
11sr = 48000
12ksmps = 10
13nchnls = 8
14
15;Example by Hector Centeno 2007
16
17vbaplsinit    2, 8, 15, 65, 115, 165, 195, 245, 295, 345
18
19    instr 1
20ifldnum = 9
21ispread = 30
22idur = p3
23
24;; Generate a sound source
25kenv loopseg 10, 0, 0, 0, 0.5, 1, 10, 0
26a1 pinkish 3000*kenv
27
28;; Move circling around once all the speakers
29aout1, aout2, aout3, aout4, aout5, aout6, aout7, aout8 vbap8move a1, idur, ispread, ifldnum, 15, 65, 115, 165, 195, 245, 295, 345, 15
30
31;; Speaker mapping
32aFL = aout8 ; Front Left
33aFR = aout1 ; Front Right
34aMFL = aout7 ; Mid Front Left
35aMFR = aout2 ; Mid Front Right
36aMBL = aout6 ; Mid Back Left
37aMBR = aout3 ; Mid Back Right
38aBL = aout5 ; Back Left
39aBR = aout4 ; Back Right
40
41outo aFL, aFR, aMFL, aMFR, aMBL, aMBR, aBL, aBR
42
43    endin
44
45</CsInstruments>
46<CsScore>
47i1 0 30
48e
49</CsScore>
50</CsoundSynthesizer>
51