csl::AmbisonicUnitGenerator Class Reference

#include <Ambisonic.h>

Inheritance diagram for csl::AmbisonicUnitGenerator:

csl::UnitGenerator csl::AmbisonicDecoder csl::AmbisonicEncoder csl::AmbisonicMixer csl::AmbisonicRotator List of all members.

Detailed Description

Ambisonic Abstract Base Class.


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 (sample *weights, const AmbisonicOrder &order, float azimuth, float elevation)
void fumaIndexedEncodingWeights (sample *weights, const AmbisonicOrder &order, sample &azimuth, sample &elevation)


Constructor & Destructor Documentation

AmbisonicUnitGenerator::AmbisonicUnitGenerator unsigned  order = 0  ) 
 

Initialize with uniform Ambisonic order. Defaults to zeroth order.

AmbisonicUnitGenerator::AmbisonicUnitGenerator unsigned  horder,
unsigned  vorder
 

Initialize with hybrid Ambisonic order.

AmbisonicUnitGenerator::AmbisonicUnitGenerator AmbisonicOrder  order  ) 
 

AmbisonicUnitGenerator::~AmbisonicUnitGenerator  )  [virtual]
 


Member Function Documentation

AmbisonicOrder csl::AmbisonicUnitGenerator::order  )  [inline]
 

void AmbisonicUnitGenerator::setOrder AmbisonicOrder  order  )  [protected]
 

Returns the Ambisonic order.

unsigned AmbisonicUnitGenerator::channelsToUniformOrder const unsigned  channels  )  [protected]
 

unsigned AmbisonicUnitGenerator::greaterOrder const AmbisonicOrder  order  )  [protected]
 

Compares the horizontal and vertical Ambisonic order of a hybrid order and returns the largest.

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).

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.

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).

void AmbisonicUnitGenerator::channelIndexer unsigned *  indexArray  )  [protected]
 

Calculates a lookup table to map Ambisonic channel index to actually used UnitGenerator channel.

void AmbisonicUnitGenerator::invChannelIndexer unsigned *  indexArray  )  [protected]
 

Calculates a lookup table to map actually used UnitGenerator channel to Ambisonic channel index.

void AmbisonicUnitGenerator::initOrder  )  [private]
 


Friends And Related Function Documentation

void singularValueDecomposition sample **  a,
int  m,
int  n,
sample w,
sample **  v
[related]
 

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.

void fumaEncodingWeights sample weights,
const AmbisonicOrder order,
float  azimuth,
float  elevation
[related]
 

void fumaIndexedEncodingWeights sample weights,
const AmbisonicOrder order,
sample azimuth,
sample elevation
[related]
 


Member Data Documentation

AmbisonicOrder csl::AmbisonicUnitGenerator::mOrder [protected]
 

the order of the Unit Generator


The documentation for this class was generated from the following files:
Generated on Fri Apr 6 20:18:21 2007 for CSL by  doxygen 1.4.5-20051010