Explaining how to set recording output file name and base folder with new a2018b version

parent 4ba6270c
......@@ -432,8 +432,14 @@ The section <code>Reproductions</code> describes how to configure connections to
Enabled = true
OutputDetectorEnabled = false
RecordOutputEnabled = false
RecordOutputFilePath = MyRenderer_filename_may_including_$(ProjectName)_macro.wav
RecordOutputFileName = renderer_out.wav
RecordOutputBaseFolder = recordings/MyRenderer
</pre></code>
<blockquote>
Note: until version 2018a, the record output file was only controlled by a file path key named <code>RecordOutputFilePath</code>. The file name and base folder has been introduced in 2018b. Now, the folder and file name can be modified during runtime, see <a href="#simulation_recording">simulation and recording</a> section.
</blockquote>
Rendering modules can be <i>enabled and disabled</i> to speed up setup changes without copying & pasting larger parts of a configuration section, as especially reproduction modules can only be instantiated if the sound card provides enough channels. This makes testing on a desktop PC and switching to a laboratory environment easier.
<br />
For rendering modules, only the <i>output</i> can be observed. A stream detector for the output can be activated that will produce level meter values, for example, for a GUI widget. The output of the active listener can also be recorded and exported as a WAV file. Recording starts with initialization and is exported to the hard disc drive after finalization impliciting that data is kept in the RAM. If a high channel number is required and/or long recording sessions are planned it is recommended to route the output through a DAW, instead, i.e. with ASIO re-routing software devices like Reapers ReaRoute ASIO driver. To include a more versatile output file name (macros are allowed).
......@@ -651,9 +657,18 @@ InputDetectorEnabled = false
RecordInputEnabled = false
RecordInputFilePath = MyReproInput_filename_may_including_$(ProjectName)_macro.wav
OutputDetectorEnabled = false
RecordInputEnabled = false
RecordInputFileName = reproduction_in.wav
RecordInputBaseFolder = recordings/MyReproduction
RecordOutputEnabled = false
RecordOutputFilePath = MyReproOutput_filename_may_including_$(ProjectName)_macro.wav
RecordOutputFileName = reproduction_out.wav
RecordOutputBaseFolder = recordings/MyReproduction
</pre></code>
<blockquote>
Note: until version 2018a, the record input / output file was only controlled by a file path key named <code>RecordInputFilePath</code> / <code>RecordOutputFilePath</code>. The file name and base folder has been introduced in 2018b. Now, the folder and file name can be modified during runtime, see <a href="#simulation_recording">simulation and recording</a> section.
</blockquote>
Reproduction modules can be <i>enabled and disabled</i> to speed up setup changes without copy & pasting larger parts of a configuration section as especially output groups can only be instantiated if the sound card provides enough channels. This makes testing on a desktop and switching to a lab environment easier.
<br />
For reproduction modules, the <i>input and output</i> can be observed. A stream detector on input and output can be activated that will produce level meter values, to be used in a GUI widget or so. The input of a reproduction module may include several superposed rendering streams (in constrast to the rendering output), for example, for direct sound and reverberant sound. The output of a reproduction can also be recorded and exported to a WAV file. The recording starts at initialization and is exported to hard drive after finalization implicating that data is kept in the RAM. If a lot of channel numbers are required and/or long recording sessions are planned it is recommended to route the output through a DAW using, for example, ASIO re-routing software devices like Reapers ReaRoute ASIO driver. Macros are useful to include a more versatile output file name.
......@@ -1377,13 +1392,13 @@ To connect an HMD, set up a Unity scene and connect the tracked GameObject (usua
<h3>Simulation and recording</h3>
<p>
As already pointed out, VA can be used to record simulated acoustic environments. The only requirement is to activate the output recording flag in the configuration and add a target file path where to store the recordings, as described in the <a href="#configuration_rendering">rendering</a> and <a href="#configuration_reproduction">reproduction</a> module setup sections. Outputs from the rendering modules can be used to record spatial audio samples (like binaural clips or Ambisonics B-format / HOA tracks). Outputs from reproductions can be used for offline playback over the given loudspeaker setup for (audio-visual) demonstrations or for non-interactive listening experiments.<br /><br />
As already pointed out, VA can be used to record simulated acoustic environments. The only requirement is to activate the output recording flag in the configuration and add a target file name and base folder where to store the recordings, as described in the <a href="#configuration_rendering">rendering</a> and <a href="#configuration_reproduction">reproduction</a> module setup sections. Outputs from the rendering modules and inputs to reproduction modules can be used to record spatial audio samples (like binaural clips or Ambisonics B-format / HOA tracks). Outputs from reproductions can be used for offline playback over the given loudspeaker setup, e.g. for (audio-visual) demonstrations or non-interactive listening experiments.<br /><br />
Two different approaches can be used:
<ul>
a) <strong>capturing the real-time audio streams</strong><br />
b) <strong>emulating a sound card</strong> and <strong>process the audio stream offline</strong>
b) <strong>emulating a sound card</strong> and <strong>processing the audio stream offline</strong>
</ul>
......@@ -1400,7 +1415,7 @@ A virtual sound device can be activated that suspends the timeout-driven block p
<h5>Virtual sound card audio driver configuration</h5>
<p>
To enable the emulated sound card and set it up for the Matlab example script <code>itaVA_example_offline_simulation.m</code> and <code>itaVA_example_offline_simulation_ir.m</code>, modify your configuration as follows
To enable the emulated sound card and set it up for the Matlab example script <code>itaVA_example_offline_simulation.m</code> (<a target="_blank" href="https://git.rwth-aachen.de/ita/VAMatlab/blob/master/matlab/itaVA_example_offline_simulation.m">open in git</a>) and <code>itaVA_example_offline_simulation_ir.m</code> (<a href="https://git.rwth-aachen.de/ita/VAMatlab/blob/master/matlab/itaVA_example_offline_simulation_ir.m" target="_blank">open in git</a>), modify your configuration as follows
<pre><code>[Audio driver]
Driver = Virtual
Device = Trigger
......@@ -1423,6 +1438,33 @@ va.call_module( 'virtualaudiodevice', struct( 'trigger', true ) );
</code></pre>
<br />
These incrementations are usually called at the end of a simulation processing loop. Any scene change prior to that will be effectively auralized. For example to implement a dynamic room acoustics situation with an animation path, a generic path renderer can be used and a full room acoustics simulation of 10 seconds runtime can be executed prior and the filter exchange, making every simulation step change audible.
</p>
<h5>Changing the recording file paths during runtime (<code>Matlab</code> example)</h5>
<p>
When recording offline simulations, it is often helpful to store the recorded audio file to a different folder each time a script is executed. To do so, VA accepts a parameter call to modify the base folder and the file name as follows:
<br />
<pre><code>% Single-line calls
va.set_rendering_module_parameters( 'MyRenderer', struct( 'RecordOutputFileName', 'modified_reproduction_out.wav' ) );
va.set_rendering_module_parameters( 'MyRenderer', struct( 'RecordOutputBaseFolder', ...
fullfile( 'recordings/MyRenderer', datestr( datetime( 'now' ) ) ) ) ); % with date and time folder
% Struct call
mStruct = struct();
mStruct.RecordOutputFileName = 'modified_rendering_out.wav';
mStruct.RecordOutputBaseFolder = fullfile( 'recordings/MyRenderer', datestr( datetime( 'now' ) ) ); % with date and time folder
va.set_rendering_module_parameters( 'MyRenderer', mStruct );
</code></pre>
<br />
For reproduction modules, the same parameter update is possible including the input stream file name and base folder:
<pre><code>% Struct call
mStruct = struct();
mStruct.RecordInputFileName = 'modified_reproduction_in.wav';
mStruct.RecordInputBaseFolder = fullfile( 'recordings/MyReproduction', datestr( datetime( 'now' ) ) ); % with date and time folder
mStruct.RecordOutputFileName = 'modified_reproduction_out.wav';
mStruct.RecordOutputBaseFolder = fullfile( 'recordings/MyReproduction', datestr( datetime( 'now' ) ) ); % with date and time folder
va.set_reproduction_module_parameters( 'MyReproduction', mStruct );
</code></pre>
</p>
</section>
......
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