#include <Ambisonic.h>

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 | |
| Port * | mInputPort |
| float | mNumChannelsInv |
| int * | mIOChannelMap |
| SampleBufferVector | mDecodingMatrix |
| SpeakerLayout * | mSpeakerLayout |
| AmbisonicDecoderMethod | mDecodingMethod |
| AmbisonicDecoderFlavour | mDecoderFlavour |
| 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 | |||
| ) |
| AmbisonicDecoder::~AmbisonicDecoder | ( | ) |
Destructor.
References mDecodingMatrix, mInputPort, mIOChannelMap, mSpeakerLayout, csl::Port::mUGen, csl::SpeakerLayout::numSpeakers(), and csl::UnitGenerator::removeOutput().
| 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] |
initializing method called by constructors
References csl::UnitGenerator::addOutput(), asProjection(), asPseudoInverse(), csl::AmbisonicUnitGenerator::channelIndexer(), csl::AmbisonicUnitGenerator::greaterOrder(), csl::AmbisonicOrder::horizontalOrder, csl::AmbisonicUnitGenerator::invChannelIndexer(), csl::AmbisonicOrder::isUniform, csl::kINPHASE, csl::kLogWarning, csl::kMAXRE, csl::kPSEUDOINVERSE, csl::logMsg(), makeInPhase(), makeMaxRE(), mDecoderFlavour, mDecodingMatrix, mDecodingMethod, mInputPort, mIOChannelMap, csl::UnitGenerator::mNumChannels, csl::AmbisonicUnitGenerator::mOrder, mSpeakerLayout, csl::UnitGenerator::numChannels(), csl::SpeakerLayout::numSpeakers(), csl::AmbisonicUnitGenerator::orderToChannels(), and csl::AmbisonicOrder::verticalOrder.
Referenced by AmbisonicDecoder().
| 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] |
Utility method that creates the transposed re-encoding matrix C'.
References AMBI_INVSQRT2, csl::Speaker::azimuth(), csl::Speaker::elevation(), csl::AmbisonicUnitGenerator::fumaEncodingWeights(), csl::AmbisonicUnitGenerator::mOrder, mSpeakerLayout, csl::SpeakerLayout::numSpeakers(), csl::AmbisonicUnitGenerator::order(), and csl::SpeakerLayout::speakerAtIndex().
Referenced by asProjection(), and asPseudoInverse().
Port* csl::AmbisonicDecoder::mInputPort [protected] |
Referenced by initialize(), and ~AmbisonicDecoder().
float csl::AmbisonicDecoder::mNumChannelsInv [protected] |
int* csl::AmbisonicDecoder::mIOChannelMap [protected] |
Referenced by initialize(), and ~AmbisonicDecoder().
Referenced by asProjection(), asPseudoInverse(), initialize(), makeInPhase(), makeMaxRE(), and ~AmbisonicDecoder().
SpeakerLayout* csl::AmbisonicDecoder::mSpeakerLayout [protected] |
Referenced by asProjection(), asPseudoInverse(), initialize(), makeInPhase(), makeMaxRE(), makeTransposedReEncodingMatrix(), and ~AmbisonicDecoder().
Referenced by initialize().
Referenced by initialize().
1.5.8