#include <Ambisonic.h>

Public Member Functions | |
| AmbisonicUnitGenerator (unsigned order=0) | |
| Initialize with uniform Ambisonic order. Defaults to zeroth order. | |
| AmbisonicUnitGenerator (unsigned horder, unsigned vorder) | |
| Initialize with hybrid Ambisonic order. | |
| AmbisonicUnitGenerator (AmbisonicOrder order) | |
| virtual | ~AmbisonicUnitGenerator () |
| AmbisonicOrder | order () |
Protected Member Functions | |
| void | setOrder (AmbisonicOrder order) |
| Returns the Ambisonic order. | |
| unsigned | channelsToUniformOrder (const unsigned channels) |
| unsigned | greaterOrder (const AmbisonicOrder order) |
| Compares the horizontal and vertical Ambisonic order of a hybrid order and returns the largest. | |
| unsigned | orderToChannels (const AmbisonicOrder order) |
| Returns the number of Ambisonic channels from a hybrid Ambisonic order: N = 2*M_h + 1 + (M_v + 1)^2 - (2*M_v + 1). | |
| unsigned | orderToChannels (unsigned order) |
| Returns the number of Ambisonic channels corresponding to a uniform Ambisonic order: N = (M+1)^2. | |
| unsigned | orderToHorizontalChannels (const AmbisonicOrder order) |
| Returns the number of horizontal Ambisonic channels from a hybrid Ambisonic order: N_h = 2*M_h + 1. | |
| unsigned | orderToVerticalChannels (const AmbisonicOrder order) |
| Returns the number of vertical Ambisonic channels from a hybrid Ambisonic order: N_v = (M_v + 1)^2 - (2*M_v + 1). | |
| void | channelIndexer (unsigned *indexArray) |
| Calculates a lookup table to map Ambisonic channel index to actually used UnitGenerator channel. | |
| void | invChannelIndexer (unsigned *indexArray) |
| Calculates a lookup table to map actually used UnitGenerator channel to Ambisonic channel index. | |
Protected Attributes | |
| AmbisonicOrder | mOrder |
| the order of the Unit Generator | |
Private Member Functions | |
| void | initOrder () |
Related Functions | |
| (Note that these are not member functions.) | |
| void | singularValueDecomposition (sample **a, int m, int n, sample *w, sample **v) |
| void | fumaEncodingWeights (SampleBuffer weights, const AmbisonicOrder &order, float azimuth, float elevation) |
| void | fumaIndexedEncodingWeights (SampleBuffer weights, const AmbisonicOrder &order, sample &azimuth, sample &elevation) |
| AmbisonicUnitGenerator::AmbisonicUnitGenerator | ( | unsigned | order = 0 |
) |
| AmbisonicUnitGenerator::AmbisonicUnitGenerator | ( | unsigned | horder, | |
| unsigned | vorder | |||
| ) |
Initialize with hybrid Ambisonic order.
References initOrder(), mOrder, and csl::AmbisonicOrder::verticalOrder.
| AmbisonicUnitGenerator::AmbisonicUnitGenerator | ( | AmbisonicOrder | order | ) |
References initOrder().
| AmbisonicUnitGenerator::~AmbisonicUnitGenerator | ( | ) | [virtual] |
| AmbisonicOrder csl::AmbisonicUnitGenerator::order | ( | ) | [inline] |
References mOrder.
Referenced by csl::AmbisonicMixer::addInput(), channelIndexer(), invChannelIndexer(), and csl::AmbisonicDecoder::makeTransposedReEncodingMatrix().
| void AmbisonicUnitGenerator::setOrder | ( | AmbisonicOrder | order | ) | [protected] |
| unsigned AmbisonicUnitGenerator::channelsToUniformOrder | ( | const unsigned | channels | ) | [protected] |
Referenced by csl::AmbisonicDecoder::makeInPhase(), and csl::AmbisonicDecoder::makeMaxRE().
| unsigned AmbisonicUnitGenerator::greaterOrder | ( | const AmbisonicOrder | order | ) | [protected] |
Compares the horizontal and vertical Ambisonic order of a hybrid order and returns the largest.
References csl::AmbisonicOrder::horizontalOrder, and csl::AmbisonicOrder::verticalOrder.
Referenced by channelIndexer(), csl::AmbisonicRotator::initialize(), and csl::AmbisonicDecoder::initialize().
| unsigned AmbisonicUnitGenerator::orderToChannels | ( | const AmbisonicOrder | order | ) | [protected] |
Returns the number of Ambisonic channels from a hybrid Ambisonic order: N = 2*M_h + 1 + (M_v + 1)^2 - (2*M_v + 1).
References csl::AmbisonicOrder::horizontalOrder, and csl::AmbisonicOrder::verticalOrder.
Referenced by channelIndexer(), csl::AmbisonicRotator::initialize(), csl::AmbisonicDecoder::initialize(), initOrder(), and invChannelIndexer().
| unsigned AmbisonicUnitGenerator::orderToChannels | ( | unsigned | order | ) | [protected] |
Returns the number of Ambisonic channels corresponding to a uniform Ambisonic order: N = (M+1)^2.
| unsigned AmbisonicUnitGenerator::orderToHorizontalChannels | ( | const AmbisonicOrder | order | ) | [protected] |
Returns the number of horizontal Ambisonic channels from a hybrid Ambisonic order: N_h = 2*M_h + 1.
References csl::AmbisonicOrder::horizontalOrder.
| unsigned AmbisonicUnitGenerator::orderToVerticalChannels | ( | const AmbisonicOrder | order | ) | [protected] |
Returns the number of vertical Ambisonic channels from a hybrid Ambisonic order: N_v = (M_v + 1)^2 - (2*M_v + 1).
References csl::AmbisonicOrder::verticalOrder.
| void AmbisonicUnitGenerator::channelIndexer | ( | unsigned * | indexArray | ) | [protected] |
Calculates a lookup table to map Ambisonic channel index to actually used UnitGenerator channel.
References greaterOrder(), csl::AmbisonicOrder::horizontalOrder, mOrder, csl::UnitGenerator::numChannels(), order(), orderToChannels(), and csl::AmbisonicOrder::verticalOrder.
Referenced by csl::AmbisonicRotator::initialize(), and csl::AmbisonicDecoder::initialize().
| void AmbisonicUnitGenerator::invChannelIndexer | ( | unsigned * | indexArray | ) | [protected] |
Calculates a lookup table to map actually used UnitGenerator channel to Ambisonic channel index.
References csl::AmbisonicOrder::horizontalOrder, mOrder, csl::UnitGenerator::numChannels(), order(), orderToChannels(), and csl::AmbisonicOrder::verticalOrder.
Referenced by csl::AmbisonicDecoder::initialize().
| void AmbisonicUnitGenerator::initOrder | ( | ) | [private] |
Given a matrix a[m][n], this routine computes its singular value decomposition, A = U*W*V^{T}. The matrix U replaces a on output. The diagonal matrix of singular values W is output as a vector w[n]. The matrix V (not the transpose V^{T}) is output as v[n][n]. m must be greater or equal to n; if it is smaller, then a should be filled up to square with zero rows.
References h, testkiss::j, MAX, PYTHAG, SIGN, and x.
Referenced by csl::AmbisonicDecoder::asPseudoInverse().
| void fumaEncodingWeights | ( | SampleBuffer | weights, | |
| const AmbisonicOrder & | order, | |||
| float | azimuth, | |||
| float | elevation | |||
| ) | [related] |
References h, csl::AmbisonicOrder::horizontalOrder, csl::AmbisonicOrder::verticalOrder, x, and y2.
Referenced by csl::AmbisonicDecoder::makeTransposedReEncodingMatrix().
| void fumaIndexedEncodingWeights | ( | SampleBuffer | weights, | |
| const AmbisonicOrder & | order, | |||
| sample & | azimuth, | |||
| sample & | elevation | |||
| ) | [related] |
References h, csl::AmbisonicOrder::horizontalOrder, csl::AmbisonicOrder::verticalOrder, x, and y2.
AmbisonicOrder csl::AmbisonicUnitGenerator::mOrder [protected] |
the order of the Unit Generator
Referenced by csl::AmbisonicMixer::addInput(), AmbisonicUnitGenerator(), channelIndexer(), csl::AmbisonicRotator::initialize(), csl::AmbisonicMixer::initialize(), csl::AmbisonicDecoder::initialize(), initOrder(), invChannelIndexer(), csl::AmbisonicDecoder::makeTransposedReEncodingMatrix(), order(), csl::AmbisonicRotator::rotateFirstOrderHorizontal(), csl::AmbisonicRotator::rotateSecondOrderHorizontal(), csl::AmbisonicRotator::rotateSecondOrderVertical(), setOrder(), csl::AmbisonicRotator::setTilt(), and csl::AmbisonicRotator::setTumble().
1.5.8