| 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 bformenc.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
sr = 44100 |
| 11 |
kr = 4410 |
| 12 |
ksmps = 10 |
| 13 |
nchnls = 8 |
| 14 |
|
| 15 |
;bformenc is deprecated, please use bformenc1 |
| 16 |
|
| 17 |
instr 1 |
| 18 |
; generate pink noise |
| 19 |
anoise pinkish 1000 |
| 20 |
|
| 21 |
; two full turns |
| 22 |
kalpha line 0, p3, 720 |
| 23 |
kbeta = 0 |
| 24 |
|
| 25 |
; fade ambisonic order from 2nd to 0th during second turn |
| 26 |
kord0 = 1 |
| 27 |
kord1 linseg 1, p3 / 2, 1, p3 / 2, 0 |
| 28 |
kord2 linseg 1, p3 / 2, 1, p3 / 2, 0 |
| 29 |
|
| 30 |
; generate B format |
| 31 |
aw, ax, ay, az, ar, as, at, au, av bformenc anoise, kalpha, kbeta, kord0, kord1, kord2 |
| 32 |
|
| 33 |
; decode B format for 8 channel circle loudspeaker setup |
| 34 |
a1, a2, a3, a4, a5, a6, a7, a8 bformdec 4, aw, ax, ay, az, ar, as, at, au, av |
| 35 |
|
| 36 |
; write audio out |
| 37 |
outo a1, a2, a3, a4, a5, a6, a7, a8 |
| 38 |
endin |
| 39 |
|
| 40 |
</CsInstruments> |
| 41 |
<CsScore> |
| 42 |
|
| 43 |
; Play Instrument #1 for 20 seconds. |
| 44 |
i 1 0 20 |
| 45 |
e |
| 46 |
|
| 47 |
|
| 48 |
</CsScore> |
| 49 |
</CsoundSynthesizer> |