Commit c076cd92 authored by henryjandrew's avatar henryjandrew

wip

parent 051a29be
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
// VA Includes // VA Includes
#include <VA.h> #include <VA.h>
#include "../../VAAudioRenderer.h" #include "../../VAAudioRenderer.h"
#include <ITAThirdOctaveFilterbank.h>
// ITA includes // ITA includes
#include <ITADataSourceRealization.h> #include <ITADataSourceRealization.h>
...@@ -29,6 +32,7 @@ ...@@ -29,6 +32,7 @@
#include "../Clustering/Receiver/VABinauralClusteringDirectionReceiver.h" #include "../Clustering/Receiver/VABinauralClusteringDirectionReceiver.h"
class CVABinauralOutdoorWaveFront; class CVABinauralOutdoorWaveFront;
class CVABinauralOutdoorSource;
//! A binaural outdoor noise renderer that handles propagation paths efficiently //! A binaural outdoor noise renderer that handles propagation paths efficiently
/** /**
...@@ -60,8 +64,10 @@ public: ...@@ -60,8 +64,10 @@ public:
private: private:
const CVAAudioRendererInitParams m_oParams; const CVAAudioRendererInitParams m_oParams;
std::map< int, CVABinauralOutdoorWaveFront* > m_mWaveFronts; std::map< int, CVABinauralOutdoorSource* > m_mSources;
std::map< int, CVABinauralClusteringDirectionReceiver* > m_mBinauralReceivers; std::map< int, CVABinauralClusteringDirectionReceiver* > m_mBinauralReceivers;
std::map< int, CVABinauralOutdoorWaveFront* > m_mPaths; // All path of entire scene for all sources and receivers
CVABinauralClusteringEngine* m_pClusterEngine; CVABinauralClusteringEngine* m_pClusterEngine;
...@@ -96,6 +102,14 @@ private: ...@@ -96,6 +102,14 @@ private:
void UpdateMotionStates(); void UpdateMotionStates();
void UpdateTrajectories( double dTime ); void UpdateTrajectories( double dTime );
int mNumberofPaths;
std::vector<ITABase::CThirdOctaveGainMagnitudeSpectrum> mMags; //internal vector of target magnitude spectrums for IIR filter design
//vector elements correspond to the path number
std::map< int, CVABinauralOutdoorWaveFront* > m_mCurrentWaveFronts;
}; };
#endif // VACORE_WITH_RENDERER_BINAURAL_OUTDOOR_NOISE #endif // VACORE_WITH_RENDERER_BINAURAL_OUTDOOR_NOISE
......
#include "VABinauralOutdoorWaveFront.h" #include "VABinauralOutdoorWaveFront.h"
#include "VABinauralOutdoorSource.h"
#include "../Clustering/VARelationMetrics.h" #include "../Clustering/VARelationMetrics.h"
#include "../Clustering/VAConfig.h" #include "../Clustering/VAConfig.h"
...@@ -71,6 +73,10 @@ void CVABinauralOutdoorWaveFront::GetOutput( ITASampleBuffer* pfLeftChannel, ITA ...@@ -71,6 +73,10 @@ void CVABinauralOutdoorWaveFront::GetOutput( ITASampleBuffer* pfLeftChannel, ITA
//vdlChL->SetDelayTime( toaDistance ); //vdlChL->SetDelayTime( toaDistance );
//vdlChR->SetDelayTime( toaDistance ); //vdlChR->SetDelayTime( toaDistance );
iCursorID;
int iNumSamples;
//pSource->pVDL->Read( iCursorID, iNumSamples); // take data from VDL to be forwarded to IIR
vdlChL->Process( pData->pSignalSourceInputBuf, pfLeftChannel ); vdlChL->Process( pData->pSignalSourceInputBuf, pfLeftChannel );
vdlChL->Process( pData->pSignalSourceInputBuf, pfRightChannel ); vdlChL->Process( pData->pSignalSourceInputBuf, pfRightChannel );
...@@ -85,3 +91,9 @@ void CVABinauralOutdoorWaveFront::SetClusteringPose( const VAVec3& v3Pos, const ...@@ -85,3 +91,9 @@ void CVABinauralOutdoorWaveFront::SetClusteringPose( const VAVec3& v3Pos, const
m_v3PredictedClusteringView = v3View; m_v3PredictedClusteringView = v3View;
m_v3PredictedClusteringUp = v3Up; m_v3PredictedClusteringUp = v3Up;
} }
void CVABinauralOutdoorWaveFront::setParameters(const CVAStruct &oInArgs) {
}
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#include <VAPoolObject.h> #include <VAPoolObject.h>
#include "../Clustering/WaveFront/VABinauralWaveFront.h" #include "../Clustering/WaveFront/VABinauralWaveFront.h"
#include <ITAThirdOctaveMagnitudeSpectrum.h>
// Forwards // Forwards
class CVASoundSourceState; class CVASoundSourceState;
...@@ -13,6 +15,7 @@ class CVASoundSourceDesc; ...@@ -13,6 +15,7 @@ class CVASoundSourceDesc;
class CVASharedMotionModel; class CVASharedMotionModel;
class CITAVariableDelayLine; class CITAVariableDelayLine;
class ITASampleBuffer; class ITASampleBuffer;
class CVABinauralOutdoorSource;
//! Represents a wave front emitted from a sound source for an outdoor scenario //! Represents a wave front emitted from a sound source for an outdoor scenario
/** /**
...@@ -22,6 +25,10 @@ class CVABinauralOutdoorWaveFront : public IVABinauralWaveFront, public CVAPoolO ...@@ -22,6 +25,10 @@ class CVABinauralOutdoorWaveFront : public IVABinauralWaveFront, public CVAPoolO
{ {
public: public:
CVABinauralOutdoorSource* pSource;
int iCursorID;
bool hasValidTrajectory; bool hasValidTrajectory;
const CVABinauralWaveFrontBase::Config oConf; const CVABinauralWaveFrontBase::Config oConf;
...@@ -46,6 +53,8 @@ public: ...@@ -46,6 +53,8 @@ public:
void GetOutput( ITASampleBuffer* pfLeftChannel, ITASampleBuffer* pfRightChannel ); void GetOutput( ITASampleBuffer* pfLeftChannel, ITASampleBuffer* pfRightChannel );
void SetClusteringPose( const VAVec3& v3Pos, const VAVec3& v3View, const VAVec3& v3Up ); void SetClusteringPose( const VAVec3& v3Pos, const VAVec3& v3View, const VAVec3& v3Up );
void setParameters( const CVAStruct &oInArgs );
virtual bool GetValidTrajectory() const virtual bool GetValidTrajectory() const
{ {
return hasValidTrajectory; return hasValidTrajectory;
...@@ -70,6 +79,8 @@ private: ...@@ -70,6 +79,8 @@ private:
double m_dCreationTimeStamp; double m_dCreationTimeStamp;
CITAVariableDelayLine* vdlChL; // Substitute with SIMO VDL (must be extended with a non-interpolating output) CITAVariableDelayLine* vdlChL; // Substitute with SIMO VDL (must be extended with a non-interpolating output)
CITAVariableDelayLine* vdlChR; // Remove, use eparate SIMO VDL cursor for L/R channels CITAVariableDelayLine* vdlChR; // Remove, use eparate SIMO VDL cursor for L/R channels
ITABase::CThirdOctaveGainMagnitudeSpectrum fMags;
}; };
#endif // IW_VACORE_BINAURAL_OUTDOOR_WAVE_FRONT #endif // IW_VACORE_BINAURAL_OUTDOOR_WAVE_FRONT
...@@ -6,6 +6,8 @@ set( DirFiles ...@@ -6,6 +6,8 @@ set( DirFiles
VABinauralOutdoorNoiseAudioRenderer.cpp VABinauralOutdoorNoiseAudioRenderer.cpp
VABinauralOutdoorWaveFront.h VABinauralOutdoorWaveFront.h
VABinauralOutdoorWaveFront.cpp VABinauralOutdoorWaveFront.cpp
VABinauralOutdoorSource.h
VABinauralOutdoorSource.cpp
VABinauralOutdoorWaveFrontPoolFactory.h VABinauralOutdoorWaveFrontPoolFactory.h
VABinauralOutdoorWaveFrontPoolFactory.cpp VABinauralOutdoorWaveFrontPoolFactory.cpp
_SourceFiles.cmake _SourceFiles.cmake
......
...@@ -98,7 +98,9 @@ int main() ...@@ -98,7 +98,9 @@ int main()
// Just name a folder with a lot ofs WAV clips // Just name a folder with a lot ofs WAV clips
va->AddSearchPath( "../data" ); va->AddSearchPath( "../data" );
std::string sWAVCLipsFolder = "C:/Users/jonas/sciebo/ITA/Lehre/Masterarbeiten/2018 Lucas Msch/2018 MA Lucas Msch Auralization/input_files"; // no tailing '/' //std::string sWAVCLipsFolder = "C:/Users/jonas/sciebo/ITA/Lehre/Masterarbeiten/2018 Lucas Msch/2018 MA Lucas Msch Auralization/input_files"; // no tailing '/'
std::string sWAVCLipsFolder = "C:/Users/andrew/input_files"; // no tailing '/'
va->AddSearchPath( sWAVCLipsFolder ); va->AddSearchPath( sWAVCLipsFolder );
std::vector<std::string> vFileNames = GetFileNamesInDirectory( sWAVCLipsFolder + "/*.wav" ); std::vector<std::string> vFileNames = GetFileNamesInDirectory( sWAVCLipsFolder + "/*.wav" );
......
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