bformdec — Deprecated. Decodes an ambisonic B format signal.
Decodes an ambisonic B format signal into loudspeaker specific signals. Note that this opcode is deprecated as it is inaccurate, and is replaced by the much better opcode bformdec1 which replicates all the important features.
ao1, ao2 bformdec isetup, aw, ax, ay, az [, ar, as, at, au, av \
[, abk, al, am, an, ao, ap, aq]]
ao1, ao2, ao3, ao4 bformdec isetup, aw, ax, ay, az [, ar, as, at, \
au, av [, abk, al, am, an, ao, ap, aq]]
ao1, ao2, ao3, ao4, ao5 bformdec isetup, aw, ax, ay, az [, ar, as, \
at, au, av [, abk, al, am, an, ao, ap, aq]]
ao1, ao2, ao3, ao4, ao5, ao6, ao7, ao8 bformdec isetup, aw, ax, ay, az \
[, ar, as, at, au, av [, abk, al, am, an, ao, ap, aq]]]
isetup –- loudspeaker setup. There are five supported setups: 1 denotes stereo setup. There must be two output cells with loudspeaker positions assumed to be (330/0, 30/0).
2 denotes quad setup. There must be four output cells. Loudspeaker positions assumed to be (45°/0), (135°/0), (225/0), (315/0).
3 is a 5.1 surround setup. There must be five output cells. LFE channel is not supported. Loudspeaker positions assumed to be (330/0), (30/0), (0/0), (250/0), (110/0).
4 denotes eight loudspeaker circle setup. There must be eight output cells. Loudspeaker positions assumed to be (22.5/0), (67.5/0), (112.5/0), (157.5/0), (202.5/0), (247.5/0), (292.5/0), (337.5/0).
5 means an eight loudspeaker cubic setup. There must be eight output cells. Loudspeaker positions assumed to be (45/0), (45/30), (135/0), (135/30), (225/0), (225/30), (315/0), (315/30).
aw, ax, ay, ... -- input signal in the B format.
ao1 .. ao8 -– loudspeaker specific output signals.
Here is an example of the bformdec opcode. It uses the file bformenc.csd.
Example 1328. Example of the bformdec opcode.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform ; Audio out Audio in No messages ;-odac -iadc -d ;;;RT audio I/O ; For Non-realtime ouput leave only the line below: -o bformenc.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> sr = 44100 kr = 4410 ksmps = 10 nchnls = 8 ;bformenc is deprecated, please use bformenc1 instr 1 ; generate pink noise anoise pinkish 1000 ; two full turns kalpha line 0, p3, 720 kbeta = 0 ; fade ambisonic order from 2nd to 0th during second turn kord0 = 1 kord1 linseg 1, p3 / 2, 1, p3 / 2, 0 kord2 linseg 1, p3 / 2, 1, p3 / 2, 0 ; generate B format aw, ax, ay, az, ar, as, at, au, av bformenc anoise, kalpha, kbeta, kord0, kord1, kord2 ; decode B format for 8 channel circle loudspeaker setup a1, a2, a3, a4, a5, a6, a7, a8 bformdec 4, aw, ax, ay, az, ar, as, at, au, av ; write audio out outo a1, a2, a3, a4, a5, a6, a7, a8 endin </CsInstruments> <CsScore> ; Play Instrument #1 for 20 seconds. i 1 0 20 e </CsScore> </CsoundSynthesizer>