Commit 5ec1782e authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen

Merge branch 'develop' of https://git.rwth-aachen.de/ita/VAMatlab into develop

parents 888f9972 bab409fb
......@@ -9,7 +9,7 @@ if( NOT DEFINED ITA_VA_MATLAB_BUILD_WITH_INTERNAL_CORE )
endif( NOT DEFINED ITA_VA_MATLAB_BUILD_WITH_INTERNAL_CORE )
if( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR )
set( ITA_VAMATLAB_VERSION_MAJOR "v2019" CACHE STRING "VAMatlab version major (usually 'v' and year)" )
set( ITA_VAMATLAB_VERSION_MAJOR "v2020" CACHE STRING "VAMatlab version major (usually 'v' and year)" )
endif( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR )
if( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR )
......
Copyright 2015-2018 Institute of Technical Acoustics (ITA), RWTH Aachen University
Copyright 2015-2020 Institute of Technical Acoustics (ITA), RWTH Aachen University
Licensed under the Apache License, Version 2.0 (the "License");
you may not use files of this project except in compliance with the License.
......
......@@ -5,7 +5,7 @@ VAMatlab is a binding to the VA interface for Matlab. It uses the VA network con
### License
Copyright 2015-2018 Institute of Technical Acoustics (ITA), RWTH Aachen University
Copyright 2015-2020 Institute of Technical Acoustics (ITA), RWTH Aachen University
Licensed under the Apache License, Version 2.0 (the "License");
you may not use files of this project except in compliance with the License.
......
%% VA signal source jet engine example
% Preparations
va = VA;
va.connect
va.reset
va.set_output_gain( .25 )
L = va.create_sound_receiver( 'listener' );
va.set_sound_receiver_position( L, [ 0 1.7 0 ] );
H = va.create_directivity_from_file( '$(DefaultHRIR)' );
va.set_sound_receiver_directivity( L, H );
% Jet engine signal
sspt_jet_engine_conf.class = 'jet_engine';
JE = va.create_signal_source_prototype_from_parameters( sspt_jet_engine_conf );
% Far-away jet engine sound source with 120 dB SWL re 12pW
S = va.create_sound_source( 'jet engine' );
va.set_sound_source_position( S, [ 0 1.7 -300 ] );
va.set_sound_source_sound_power( S, 10^(130/10) * 1e-12 );
va.set_sound_source_signal_source( S, JE );
%% GUI
va.set_signal_source_parameters( JE, struct( 'rpm', 1500 ) )
pause( 2 )
va.set_signal_source_parameters( JE, struct( 'rpm', 1600 ) )
pause( 0.2 )
va.set_signal_source_parameters( JE, struct( 'rpm', 1700 ) )
pause( 0.2 )
va.set_signal_source_parameters( JE, struct( 'rpm', 1800 ) )
pause( 0.4 )
va.set_signal_source_parameters( JE, struct( 'rpm', 2100 ) )
pause( 1.4 )
va.set_signal_source_parameters( JE, struct( 'rpm', 3800 ) )
pause( 4 )
va.set_signal_source_parameters( JE, struct( 'rpm', 5000 ) )
......@@ -4,7 +4,7 @@
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2019
* VVV VVV AAA Copyright 2015-2020
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
......
......@@ -4,7 +4,7 @@
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2019
* VVV VVV AAA Copyright 2015-2020
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
......
......@@ -4,7 +4,7 @@
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2019
* VVV VVV AAA Copyright 2015-2020
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
......@@ -160,7 +160,7 @@ void banner()
mexPrintf( " * VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org\n" );
mexPrintf( " * VVV VVV AAA Licensed under the Apache License, Version 2.0\n" );
mexPrintf( " * VVV VVV AAA\n" );
mexPrintf( " * VVV VVV AAA Copyright 2015-2019\n" );
mexPrintf( " * VVV VVV AAA Copyright 2015-2020\n" );
mexPrintf( " * VVVVVV AAA Institute of Technical Acoustics (ITA)\n" );
mexPrintf( " * VVVV AAA RWTH Aachen University\n" );
mexPrintf( " *\n" );
......@@ -1194,6 +1194,25 @@ void create_signal_source_network_stream( int nlhs, mxArray *plhs[], int nrhs, c
plhs[ 0 ] = mxCreateString( sID.c_str() );
}
REGISTER_PUBLIC_FUNCTION( create_signal_source_prototype_from_parameters, "Creates a prototype signal source, provide 'class' parameter!", "" );
DECLARE_FUNCTION_REQUIRED_INARG( create_signal_source_prototype_from_parameters, params, "struct", "Parameters" );
DECLARE_FUNCTION_OPTIONAL_INARG( create_signal_source_prototype_from_parameters, name, "string", "Displayed name", "''" );
DECLARE_FUNCTION_OUTARG( create_signal_source_prototype_from_parameters, signalSourceID, "string", "Signal source ID" );
void create_signal_source_prototype_from_parameters( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 3 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
CVAStruct oParams = matlabGetStruct( prhs[ 1 ], "params" );
std::string sName = matlabGetString( prhs[ 2 ], "name" );
std::string sID = pConnection->pCoreInterface->CreateSignalSourcePrototypeFromParameters( oParams, sName );
plhs[ 0 ] = mxCreateString( sID.c_str() );
}
// ------------------------------------------------------------
REGISTER_PUBLIC_FUNCTION( delete_signal_source, "Deletes a signal source", "A signal source can only be deleted, if it is not in use." );
......
......@@ -4,7 +4,7 @@
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2019
* VVV VVV AAA Copyright 2015-2020
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
......
......@@ -4,7 +4,7 @@
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2019
* VVV VVV AAA Copyright 2015-2020
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
......
......@@ -4,7 +4,7 @@
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2019
* VVV VVV AAA Copyright 2015-2020
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
......
......@@ -4,7 +4,7 @@
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2019
* VVV VVV AAA Copyright 2015-2020
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
......
......@@ -4,7 +4,7 @@
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2019
* VVV VVV AAA Copyright 2015-2020
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
......
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