csl::AmbisonicDecoder Class Reference

#include <Ambisonic.h>

Inheritance diagram for csl::AmbisonicDecoder:

csl::AmbisonicUnitGenerator csl::UnitGenerator List of all members.

Detailed Description

AmbisonicDecoder -- Higher Order Ambisonic Decoding class

Higher Order Ambisonic class for decoding an Ambisonic encoded soundfield (e.g. the output of the AmbisonicEncoder or the AmbisonicRotator) to a loudspeaker layout specified by SpeakerLayout. The Ambisonic order at which the decoder oprates is derived by the following criteria: If no order is specified in the constructor, the order of the Ambisonic encoded input is used. This order can be downgraded either by specifying a lower order in the constructor (obviously, it cannot be increased). The decoder might further decrease the given order to match the maximum order reproducable on the available loudspeaker layout. One out of two different decoding methods can be chosen by using the flags kPROJECTION, kPSEUDOINVERSE in the constructor. One out of three available decoder flavors can be applied by using the flags kBASIC, kINPHASE, kMAXRE.


Public Member Functions

 AmbisonicDecoder (AmbisonicUnitGenerator &input, SpeakerLayout *layout=SpeakerLayout::defaultSpeakerLayout(), AmbisonicDecoderMethod method=kPROJECTION, AmbisonicDecoderFlavour flavour=kBASIC)
 Defaults to standard speaker layout as defined in "HOA_SpeakerLayout" class and to Ambisonic order of encoded input.
 AmbisonicDecoder (UnitGenerator &input, unsigned order, SpeakerLayout *layout=SpeakerLayout::defaultSpeakerLayout(), AmbisonicDecoderMethod method=kPROJECTION, AmbisonicDecoderFlavour flavour=kBASIC)
 Initializes with uniform Ambisonic order, defaults to standard speaker layout as defined in "HOA_SpeakerLayout" class.
 AmbisonicDecoder (UnitGenerator &input, unsigned hOrder, unsigned vOrder, SpeakerLayout *layout=SpeakerLayout::defaultSpeakerLayout(), AmbisonicDecoderMethod method=kPROJECTION, AmbisonicDecoderFlavour flavour=kBASIC)
 Initializes with hybrid Ambisonic order.
 ~AmbisonicDecoder ()
 Destructor.
virtual void nextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException)
 Does the DSP processing for the Ambisonic Decoder.

Protected Member Functions

void initialize (UnitGenerator &input, AmbisonicDecoderMethod method, AmbisonicDecoderFlavour flavour)
 initializing method called by constructors
void asProjection ()
 Create the decoding matrix "D" using the projection method.
void asPseudoInverse ()
 create the decoding matrix "D" using the pseudoinverse method
void makeInPhase (unsigned greaterOrder)
 Adjusts the decoding matrix D for in-phase flavour.
void makeMaxRE (unsigned greaterOrder)
 Adjusts the decoding matrix D for Max rE flavour.
void makeTransposedReEncodingMatrix (float **transposeMatrix)
 Utility method that creates the transposed re-encoding matrix C'.

Protected Attributes

UGenPort * mInputPort
float mNumChannelsInv
int * mIOChannelMap
sample ** mDecodingMatrix
SpeakerLayoutmSpeakerLayout
AmbisonicDecoderMethod mDecodingMethod
AmbisonicDecoderFlavour mDecoderFlavour


Constructor & Destructor Documentation

AmbisonicDecoder::AmbisonicDecoder AmbisonicUnitGenerator input,
SpeakerLayout layout = SpeakerLayout::defaultSpeakerLayout(),
AmbisonicDecoderMethod  method = kPROJECTION,
AmbisonicDecoderFlavour  flavour = kBASIC
 

Defaults to standard speaker layout as defined in "HOA_SpeakerLayout" class and to Ambisonic order of encoded input.

AmbisonicDecoder::AmbisonicDecoder UnitGenerator input,
unsigned  order,
SpeakerLayout layout = SpeakerLayout::defaultSpeakerLayout(),
AmbisonicDecoderMethod  method = kPROJECTION,
AmbisonicDecoderFlavour  flavour = kBASIC
 

Initializes with uniform Ambisonic order, defaults to standard speaker layout as defined in "HOA_SpeakerLayout" class.

AmbisonicDecoder::AmbisonicDecoder UnitGenerator input,
unsigned  hOrder,
unsigned  vOrder,
SpeakerLayout layout = SpeakerLayout::defaultSpeakerLayout(),
AmbisonicDecoderMethod  method = kPROJECTION,
AmbisonicDecoderFlavour  flavour = kBASIC
 

Initializes with hybrid Ambisonic order.

AmbisonicDecoder::~AmbisonicDecoder  ) 
 

Destructor.


Member Function Documentation

void AmbisonicDecoder::nextBuffer Buffer outputBuffer,
unsigned  outBufNum
throw (CException) [virtual]
 

Does the DSP processing for the Ambisonic Decoder.

void AmbisonicDecoder::initialize UnitGenerator input,
AmbisonicDecoderMethod  method,
AmbisonicDecoderFlavour  flavour
[protected]
 

initializing method called by constructors

void AmbisonicDecoder::asProjection  )  [protected]
 

Create the decoding matrix "D" using the projection method.

void AmbisonicDecoder::asPseudoInverse  )  [protected]
 

create the decoding matrix "D" using the pseudoinverse method

Build the Decoding matrix D using the pseudo inverse method
D = pinv(C) = C' * inv(C * C').
Pseudo inverse code based on the matrix library found at: http://home1.gte.net/edwin2/Matrix/

void AmbisonicDecoder::makeInPhase unsigned  greaterOrder  )  [protected]
 

Adjusts the decoding matrix D for in-phase flavour.

void AmbisonicDecoder::makeMaxRE unsigned  greaterOrder  )  [protected]
 

Adjusts the decoding matrix D for Max rE flavour.

void AmbisonicDecoder::makeTransposedReEncodingMatrix float **  transposeMatrix  )  [protected]
 

Utility method that creates the transposed re-encoding matrix C'.


Member Data Documentation

UGenPort* csl::AmbisonicDecoder::mInputPort [protected]
 

float csl::AmbisonicDecoder::mNumChannelsInv [protected]
 

int* csl::AmbisonicDecoder::mIOChannelMap [protected]
 

sample** csl::AmbisonicDecoder::mDecodingMatrix [protected]
 

SpeakerLayout* csl::AmbisonicDecoder::mSpeakerLayout [protected]
 

AmbisonicDecoderMethod csl::AmbisonicDecoder::mDecodingMethod [protected]
 

AmbisonicDecoderFlavour csl::AmbisonicDecoder::mDecoderFlavour [protected]
 


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