csl::AmbisonicUnitGenerator Class Reference

Ambisonic Abstract Base Class. More...

#include <Ambisonic.h>

Inheritance diagram for csl::AmbisonicUnitGenerator:

csl::UnitGenerator csl::Model csl::AmbisonicDecoder csl::AmbisonicEncoder csl::AmbisonicMixer csl::AmbisonicRotator

List of all members.

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)


Detailed Description

Ambisonic Abstract Base Class.

Constructor & Destructor Documentation

AmbisonicUnitGenerator::AmbisonicUnitGenerator ( unsigned  order = 0  ) 

Initialize with uniform Ambisonic order. Defaults to zeroth order.

References initOrder().

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]


Member Function Documentation

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

void AmbisonicUnitGenerator::setOrder ( AmbisonicOrder  order  )  [protected]

Returns the Ambisonic order.

References initOrder(), and mOrder.

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.

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]

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]


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.

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]

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


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Thu Sep 17 23:14:17 2009 for CSL by  doxygen 1.5.8