csl::AmbisonicDecoder Class Reference

#include <Ambisonic.h>

Inheritance diagram for csl::AmbisonicDecoder:

csl::AmbisonicUnitGenerator csl::UnitGenerator csl::Model

List of all members.

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

PortmInputPort
float mNumChannelsInv
int * mIOChannelMap
SampleBufferVector 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.

References initialize().

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.

References initialize().

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

Initializes with hybrid Ambisonic order.

References initialize().

AmbisonicDecoder::~AmbisonicDecoder (  ) 


Member Function Documentation

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

Does the DSP processing for the Ambisonic Decoder.

Reimplemented from csl::UnitGenerator.

References csl::kLogError, csl::kSamples, csl::logMsg(), csl::Buffer::mBuffers, csl::Buffer::mIsPopulated, csl::Buffer::mNumFrames, and csl::Buffer::mType.

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

void AmbisonicDecoder::asProjection (  )  [protected]

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

build the Decoding matrix D using the projection method D = (1/L) * C'

References makeTransposedReEncodingMatrix(), mDecodingMatrix, csl::UnitGenerator::mNumChannels, mSpeakerLayout, and csl::SpeakerLayout::numSpeakers().

Referenced by initialize().

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/

References testkiss::e, testkiss::j, makeTransposedReEncodingMatrix(), mDecodingMatrix, csl::UnitGenerator::mNumChannels, mSpeakerLayout, csl::UnitGenerator::numChannels(), csl::SpeakerLayout::numSpeakers(), and csl::AmbisonicUnitGenerator::singularValueDecomposition().

Referenced by initialize().

void AmbisonicDecoder::makeInPhase ( unsigned  greaterOrder  )  [protected]

Adjusts the decoding matrix D for in-phase flavour.

Scales the decoding matrix according to the factors for in-phase decoding.

References csl::AmbisonicUnitGenerator::channelsToUniformOrder(), mDecodingMatrix, csl::UnitGenerator::mNumChannels, mSpeakerLayout, and csl::SpeakerLayout::numSpeakers().

Referenced by initialize().

void AmbisonicDecoder::makeMaxRE ( unsigned  greaterOrder  )  [protected]

Adjusts the decoding matrix D for Max rE flavour.

Scales the decoding matrix according to the factors for max rE decoding.

References csl::AmbisonicUnitGenerator::channelsToUniformOrder(), mDecodingMatrix, csl::UnitGenerator::mNumChannels, mSpeakerLayout, and csl::SpeakerLayout::numSpeakers().

Referenced by initialize().

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


Member Data Documentation

Referenced by initialize(), and ~AmbisonicDecoder().

Referenced by initialize(), and ~AmbisonicDecoder().

Referenced by initialize().

Referenced by initialize().


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

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