Skip to content
Snippets Groups Projects
Select Git revision
  • c8077feb2f6e97cc8ac31840f176db5c639d6ce1
  • master default protected
  • gitkeep
  • dev protected
  • Issue/2583-treeBug
  • Hotfix/2504-formGen
  • Issue/2309-docs
  • Issue/2462-removeTraces
  • Hotfix/2459-EncodingPath
  • Hotfix/2452-linkedDeletion
  • Issue/1792-newMetadataStructure
  • Hotfix/2384-guestsAndLinked
  • v2.8.14-Hotfix2365
  • Hotfix/2365-targetClassWorks
  • Hotfix/2371-fixGitLabinRCV
  • Fix/xxxx-activateGitlab
  • Test/xxxx-enablingGitLab
  • Issue/2349-gitlabHttps
  • Issue/2287-guestRole
  • Hotfix/2296-selectedValuesNotReturned
  • Issue/2102-gitLabResTypeRCV
  • v2.11.5
  • v2.11.4
  • v2.11.3
  • v2.11.2
  • v2.11.1
  • v2.11.0
  • v2.10.3
  • v2.10.2
  • v2.10.1
  • v2.10.0
  • v2.9.4
  • v2.9.3
  • v2.9.2
  • v2.9.1
  • v2.9.0
  • v2.8.16
  • v2.8.15
  • v2.8.14
  • v2.8.13
  • v2.8.12
41 results

Tree.csproj

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    FilterGenerator.h 2.55 KiB
    /*
     * ----------------------------------------------------------------
     *
     *		ITA geometrical acoustics
     *		(c) Copyright Institute of Technical Acoustics (ITA)
     *		RWTH Aachen University, Germany, 2015-2018
     *
     * ----------------------------------------------------------------
     *				    ____  __________  _______
     *				   //  / //__   ___/ //  _   |
     *				  //  /    //  /    //  /_|  |
     *				 //  /    //  /    //  ___   |
     *				//__/    //__/    //__/   |__|
     *
     * ----------------------------------------------------------------
     *
     */
    
    #ifndef INCLUDE_WATCHER_ITA_PROPAGATION_MODELS_FILTER_GENERATOR
    #define INCLUDE_WATCHER_ITA_PROPAGATION_MODELS_FILTER_GENERATOR
    
    #include "Base.h"
    #include "Definitions.h"
    #include "DiffractionFilter.h"
    
    // ITA includes
    #include <ITAGeo/Base.h>
    #include <ITAHDFTSpectra.h>
    #include <ITAHDFTSpectrum.h>
    
    // STL includes
    #include <vector>
    
    namespace ITAPropagationModels
    {
    	//! Transfer function filter generator for propagation paths
    	/**
    	  * Generates transfer functions in the frequency-domain that
    	  * can be used as filters, e.g. for auralization.
    	  */
    	class ITA_PROPAGATION_MODELS_API CTFGenerator
    	{
    	public:
    
    		//! Construct a generator with predetermined output channels, e.g. for binaural or SH filters
    		/**
    		  * @param[in] iNumOutputChannels Number of output channels
    		  * @param[in] iDFTSize Length of the DFT used to construct and combine filter components
    		  * @param[in] fSamplingRate Filer sampling rate
    		  */
    		CTFGenerator( const int iNumOutputChannels, const int iDFTSize = 128, const float fSamplingRate = 44100.0f );
    
    		//! Cunstruct a generator with matching properties of a target spectrum
    		inline CTFGenerator( const ITABase::CHDFTSpectrum& pTransferFunction )
    			: CTFGenerator( 1, pTransferFunction.GetDFTSize(), pTransferFunction.GetSampleRate() )
    		{
    		};
    
    		//! Cunstruct a generator with matching properties of multi-channel target spectra
    		CTFGenerator( const ITABase::CHDFTSpectra& pTransferFunctions )
    			: CTFGenerator( pTransferFunctions.GetNumChannels(), pTransferFunctions.GetDFTSize(), pTransferFunctions.GetSampleRate() )
    		{
    		};
    
    		//! Generate a single-channel transfer function
    		inline void GenerateTF( ITABase::CHDFTSpectrum& pTransferFunction )
    		{
    			const std::vector< ITABase::CHDFTSpectrum* > vpSpectra = { &( pTransferFunction ) };
    			ITABase::CHDFTSpectra oTF( vpSpectra );
    			GenerateTF( oTF );
    		};
    
    		//! Generate a multi-channel transfer function
    		inline void GenerateTF( ITABase::CHDFTSpectra& pTransferFunctions );
    
    	private:
    	};
    }
    
    #endif // INCLUDE_WATCHER_ITA_PROPAGATION_MODELS_FILTER_GENERATOR