Commit 9f15cbcf authored by Michael Kohnen's avatar Michael Kohnen
Browse files

Finished basic implementation, Remax is running, pseudo-inverse is running,...

Finished basic implementation, Remax is running, pseudo-inverse is running, short testing performed, configuration is messy
parent 1d461858
......@@ -120,7 +120,7 @@ CVAAmbisonicsBinauralMixdownReproduction::CVAAmbisonicsBinauralMixdownReproducti
dAzimuth = GetAzimuthOnTarget_DEG(va3Origin, va3View, va3Up, pDevice->vPos) / 180 * ITAConstants::PI_D;
dElevation = GetElevationOnTarget_DEG(va3Origin, va3View, va3Up, pDevice->vPos) / 180 * ITAConstants::PI_D;
vdYParts = SHRealvaluedBasefunctions(dElevation, dAzimuth, m_iAmbisonicsTruncationOrder);
vdYParts = SHRealvaluedBasefunctions(ITAConstants::PI_D/2-dElevation, dAzimuth, m_iAmbisonicsTruncationOrder);
for (int l = 0; l < vdYParts.size(); l++)
{
matY(k,l)=vdYParts[l];
......@@ -129,12 +129,15 @@ CVAAmbisonicsBinauralMixdownReproduction::CVAAmbisonicsBinauralMixdownReproducti
Eigen::MatrixXd matYinv = CalculatePseudoInverse(matY);
std::vector<double> vdRemaxWeights = HOARemaxWeights(m_iAmbisonicsTruncationOrder);
// Matrix
for( int i=0; i < GetNumInputChannels(); i++ )
{
int iCurrentOrder = floor(sqrt(i));
for( int j=0; j < GetNumVirtualLoudspeaker(); j++ )
{
double dGain = matYinv(i, j); // todo calculate from LS setup @mko
double dGain = matYinv(i, j)*vdRemaxWeights[iCurrentOrder];
m_pDecoderMatrixPatchBay->ConnectChannels( 0, i, 0, j, dGain );
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment