Commit 4c460587 authored by Jonas Stienen's avatar Jonas Stienen

Improving generic path example for VA (real-time filter exchange in VA from Matlab)

parent 038ff1eb
......@@ -2,7 +2,10 @@
va = itaVA( 'localhost' )
va.reset();
X = va.createAudiofileSignalSource( 'Audiofiles/Bauer.wav' );
ita_write_wav( ita_demosound, 'ita_demosound.wav', 'overwrite' );
va.addSearchPath( pwd );
X = va.createAudiofileSignalSource( 'ita_demosound.wav' );
va.setAudiofileSignalSourcePlaybackAction( X, 'play' );
va.setAudiofileSignalSourceIsLooping( X, true );
S = va.createSoundSource( 'itaVA_Source' );
......@@ -21,23 +24,23 @@ for n = size( mMods, 1 )
end
if strcmp( modname, 'none' )
disp( 'Could not find a generic path module, not activated in VA core configuration?' )
error( 'Could not find a generic path module, not activated in VA core configuration?' )
end
% How to get help
%% How to get help
mStruct = struct;
mStruct.help = ''; % or true or anything
mRes = va.callModule( modname, mStruct );
disp( mRes.help )
% How to get infos
%% How to get infos
mStruct = struct;
mStruct.info = ''; % or true or anything
mRes = va.callModule( modname, mStruct )
% How to update using a file with two channels (matching channels required)
a = ita_merge( ita_amplify( ita_generate_impulse, '-21dB' ), ita_amplify( ita_generate_impulse, '-12dB' ) );
%% How to update using a file with two channels (matching channels required)
a = ita_merge( ita_amplify( ita_generate_impulse, '-12dB' ), ita_amplify( ita_generate_impulse, '-21dB' ) );
ita_write_wav( a, 'unequal_dirac.wav', 'overwrite' );
mStruct = struct;
mStruct.verbose = ''; % Verbose output for testing only, costly ...
......@@ -46,13 +49,11 @@ mStruct.source = S;
mStruct.filepath = fullfile( pwd, 'unequal_dirac.wav' );
mRes = va.callModule( modname, mStruct )
% How to update a path sending floating point data (separate channels possible)
b = ita_generate_impulse( 'fftDegree', 12 );
%% How to update a path sending floating point data (separate channels possible)
b = ita_generate_impulse( 'fftDegree', 15 );
mStruct = struct;
mStruct.verbose = true; % ... remove line if verbosity not required anymore.
mStruct.listener = L;
mStruct.source = S;
mStruct.ch2 = b.timeData / 4; % here, only update channel 2
mRes = va.callModule( modname, mStruct ) % Currently under testing, use short IRs only
va.disconnect()
mStruct.ch2 = b.timeData / 2; % here, only update channel 2
mRes = va.callModule( modname, mStruct )
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