Commit 8f7d99d3 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen

Merge branch 'big_2017_api_change' into develop

parents 2a697adb 250e9c04
setup.py
MANIFEST
build
dist
examples/jupyter/*.ipynb_checkpoints*
*.wav
*.daff
......@@ -17,9 +17,17 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Successfully connected, server core version is: VACore v2017.d (debug)\n"
]
}
],
"source": [
"import sys\n",
"sys.path.append( '../../Lib/site-packages' )\n",
......@@ -27,7 +35,9 @@
"import ipywidgets as widgets\n",
"import va\n",
"if not va.connect() :\n",
" raise 'Could not connect to local VA server'"
" raise 'Could not connect to local VA server'\n",
"else :\n",
" print( 'Successfully connected, server core version is: ' + va.get_version() )"
]
},
{
......@@ -54,9 +64,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ab9e1c96bb1b4c2aaea9c95d6ee930e8",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"A Jupyter Widget"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"mute_output_button = widgets.ToggleButton( description = 'Output muted', value = va.get_output_muted() )\n",
"\n",
......@@ -78,9 +103,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'widgets' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-1-d87da51b8000>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m output_gain_slider = widgets.FloatSlider( \n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mvalue\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mva\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_output_gain\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mdescription\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'Output gain:'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mmin\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m0.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[0mmax\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m1.0\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mNameError\u001b[0m: name 'widgets' is not defined"
]
}
],
"source": [
"output_gain_slider = widgets.FloatSlider( \n",
" value = va.get_output_gain(),\n",
......@@ -103,17 +140,31 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Global auralization mode"
"#### Global auralization mode\n",
"\n",
"The auralization mode is a bundle of flags to control the acoustic phenomena that should be considered during audio rendering. It's purpose is to demonstrate the audibility of certain aspects, like sound source directivity.\n",
"Auralization mode can be set globally, but also individually for rendering modules, sources and receivers."
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DS, ER, DD, DIR, AA, TV, SC, DIF, NF, DP, SL, TR, AB\n",
"Direct sound, early reflections, diffuse decay, source directivity, air absorption, atmospheric temporal variations, scattering, diffraction, near-field effects, doppler shifts, spherical spreading loss, transmission, absorption\n"
]
}
],
"source": [
"global_am = va.get_global_auralization_mode()\n",
"va.get_auralization_mode_str( global_am )"
"print( global_am )\n",
"global_am_long = va.get_global_auralization_mode( False )\n",
"print( global_am_long )"
]
},
{
......@@ -127,9 +178,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"$(DefaultHRIR): HRIR\\\\ITA-Kunstkopf_HRIR_AP11_Pressure_Equalized_3x3_256.v17.ir.daff\n",
"$(ProjectName): MyVirtualAcousticsProject\n",
"$(data): $(data)\n",
"$(big_data_dir): C:\\\\data\n",
"$(conf): $(conf)\n"
]
}
],
"source": [
"print( '$(DefaultHRIR): ' + va.substitute_macro( '$(DefaultHRIR)' ) )\n",
"print( '$(ProjectName): ' + va.substitute_macro( '$(ProjectName)' ) )\n",
......@@ -138,6 +201,38 @@
"print( '$(conf): ' + va.substitute_macro( '$(conf)' ) )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Paths\n",
"\n",
"Using search path is encouraged, as it makes it easier to move from one PC to another. You can get the available search paths and also add new search paths. Paths are always bound to the server PC."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'path_0': 'C:/data', 'path_1': 'C:/dev/VA/VACore/conf', 'path_2': 'C:/dev/VA/VACore/data', 'path_3': 'C:/data/InsideSceneData'}\n",
"client working directory: C:\\dev\\VA\\VAPython\\examples\\jupyter\n"
]
}
],
"source": [
"print( va.get_search_paths() )\n",
"\n",
"import os\n",
"current_working_dir = os.getcwd()\n",
"print( \"client working directory: \" + current_working_dir )\n",
"va.add_search_path( current_working_dir ); # only makes sense if client and server are running on same PC"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -148,9 +243,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f7649c3b43d646d88712e9fea5ad8094",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"A Jupyter Widget"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"reset_button = widgets.Button( description = 'Reset VA server' )\n",
"\n",
......@@ -171,9 +281,33 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "fb3c42c0da5f463c98a2f51e91095964",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"A Jupyter Widget"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Calling BinauralFreeField:MyBinauralFreeField\n",
"Module returned an exception, could not get help\n",
"Calling VACore\n"
]
}
],
"source": [
"allmods = va.get_modules()\n",
"\n",
......@@ -204,26 +338,172 @@
"metadata": {},
"source": [
"### Rendering modules\n",
"Rendering modules are special modules that can also be listed using `get_rendering_modules`. They are called through the module interface just as described above, however the module name has to be assembled by the type of renderer followed by a semicolon `:` and the name of the rendering module."
"Rendering modules are special modules that can also be listed using `get_rendering_modules`. They can be muted/unmuted individually and also have an own output gain control. Additionally all rendering modules have specialized parameter setter and getter."
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5a0ed7d50a8146ab8e54740b6f2c44c4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"A Jupyter Widget"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"allrmods = va.get_rendering_modules()\n",
"for rmod in allrmods :\n",
" print( rmod )\n",
" rmod_id = str( rmod[ 'class' ] + ':' + rmod[ 'name' ] )\n",
" try :\n",
" magic_return = va.call_module( rmod_id, { 'help': True } )\n",
" print( magic_return )\n",
" except:\n",
" print( 'Module call failed, could not get help' )\n",
"allrendmods = va.get_rendering_modules();\n",
"\n",
"\n",
"# Dropdown menu\n",
"rendmodnames = list()\n",
"for mod in allrendmods[:] :\n",
" rendmodnames.append( mod[\"id\"] )\n",
"rendmods_dropdown_menu = widgets.Dropdown( options=rendmodnames )\n",
"\n",
"\n",
"# Mute toggle button\n",
"rendmod_mute_button = widgets.ToggleButton( description = 'Mute' )\n",
"\n",
"def on_rendmod_mute_button_clicked( b ) :\n",
" rendmod = allrendmods[ rendmods_dropdown_menu.index ]\n",
" if b.name == 'value' :\n",
" va.set_rendering_module_muted( mod[\"id\"], b.new )\n",
" \n",
"rendmod_mute_button.observe( on_rendmod_mute_button_clicked )\n",
"\n",
"\n",
"# Gain slider\n",
"rendmod_gain_slider = widgets.FloatSlider( \n",
" value = 1.0,\n",
" description = 'Gain:',\n",
" min = 0.0,\n",
" max = 1.0,\n",
" step = 0.1,\n",
" readout = True,\n",
" readout_format = '.1f' )\n",
"\n",
"def on_rendmod_gain_changed( s ) :\n",
" rendmod = allrendmods[ rendmods_dropdown_menu.index ]\n",
" if s.name == 'value' :\n",
" va.set_rendering_module_gain( rendmod[\"id\"], s.new )\n",
"\n",
"rendmod_gain_slider.observe( on_rendmod_gain_changed )\n",
"\n",
"\n",
"# Parameter getter\n",
"rendmod_button_params = widgets.Button( description = 'Parameters' )\n",
"\n",
"def on_rendmod_parameter( b ) :\n",
" rendmod = allrendmods[ rendmods_dropdown_menu.index ]\n",
" print( va.get_rendering_module_parameters( rendmod[\"id\"] ) )\n",
" \n",
"rendmod_button_params.on_click( on_rendmod_parameter )\n",
"\n",
"\n",
"# Horizontal box with widgets\n",
"rendmod_widget_box = widgets.HBox( [ rendmods_dropdown_menu, rendmod_mute_button, rendmod_gain_slider, rendmod_button_params ] )\n",
"display( rendmod_widget_box )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Reproduction modules\n",
"Reproduction modules are special modules that can also be listed using `get_reproduction_modules`. They can be muted/unmuted individually and also have an own output gain control. Additionally all reproduction modules have specialized parameter setter and getter."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "217211a8a5db48f3808a95f22bcdc056",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"A Jupyter Widget"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"{}\n"
]
}
],
"source": [
"allrepmods = va.get_reproduction_modules();\n",
"\n",
"\n",
"# Dropdown menu\n",
"repmodnames = list()\n",
"for mod in allrepmods[:] :\n",
" repmodnames.append( mod[\"id\"] )\n",
"repmods_dropdown_menu = widgets.Dropdown( options=repmodnames )\n",
"\n",
"\n",
"# Mute toggle button\n",
"repmod_mute_button = widgets.ToggleButton( description = 'Mute' )\n",
"\n",
"def on_repmod_mute_button_clicked( b ) :\n",
" repmod = allrepmods[ repmods_dropdown_menu.index ]\n",
" if b.name == 'value' :\n",
" va.set_reproduction_module_muted( mod[\"id\"], b.new )\n",
" \n",
"repmod_mute_button.observe( on_repmod_mute_button_clicked )\n",
"\n",
"\n",
"# Gain slider\n",
"repmod_gain_slider = widgets.FloatSlider( \n",
" value = 1.0,\n",
" description = 'Gain:',\n",
" min = 0.0,\n",
" max = 1.0,\n",
" step = 0.1,\n",
" readout = True,\n",
" readout_format = '.1f' )\n",
"\n",
"def on_repmod_gain_changed( s ) :\n",
" repmod = allrepmods[ repmods_dropdown_menu.index ]\n",
" if s.name == 'value' :\n",
" va.set_reproduction_module_gain( repmod[\"id\"], s.new )\n",
"\n",
"repmod_gain_slider.observe( on_repmod_gain_changed )\n",
"\n",
"\n",
"# Parameter getter\n",
"repmod_button_params = widgets.Button( description = 'Parameters' )\n",
"\n",
"def on_repmod_parameter( b ) :\n",
" repmod = allrepmods[ repmods_dropdown_menu.index ]\n",
" print( va.get_reproduction_module_parameters( repmod[\"id\"] ) )\n",
" \n",
"repmod_button_params.on_click( on_repmod_parameter )\n",
"\n",
"\n",
"# todo implement in VAPy"
"# Horizontal box with widgets\n",
"repmod_widget_box = widgets.HBox( [ repmods_dropdown_menu, repmod_mute_button, repmod_gain_slider, repmod_button_params ] )\n",
"display( repmod_widget_box )"
]
}
],
......
......@@ -21,27 +21,27 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Connected.\n"
"Successfully connected, server core version is: VACore v2017.d (debug)\n"
]
}
],
"source": [
"import sys\n",
"sys.path.append( '../../Lib/site-packages' )\n",
"#sys.path.append( '../../Lib/site-packages' )\n",
"sys.path.append( '../../dist/Lib/site-packages' )\n",
"import ipywidgets as widgets\n",
"import va\n",
"if not va.connect() :\n",
" raise 'Could not connect to local VA server'\n",
"else :\n",
" print( 'Connected.' )\n",
"va.reset()"
" print( 'Successfully connected, server core version is: ' + va.get_version() )"
]
},
{
......@@ -57,22 +57,22 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"PrototypeGenericPath:Experimental\n"
"Experimental\n"
]
}
],
"source": [
"for rmod in va.get_rendering_modules() :\n",
" if rmod['class'] == 'PrototypeGenericPath' :\n",
" print( rmod['class'] + ':' + rmod['id'] )\n",
"rmod_name = 'PrototypeGenericPath:Experimental' # alter this if you are using a different name"
" print( rmod['id'] )\n",
"rmod_name = 'Experimental' # alter this if you are using a different name"
]
},
{
......@@ -85,14 +85,14 @@
},
{
"cell_type": "code",
"execution_count": 120,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
" --- GenericPath renderer instance 'PrototypeGenericPath:Experimental' ---\n",
" --- GenericPath renderer instance 'Experimental' ---\n",
"\n",
"[help]\n",
"If the call module struct contains a key with the name 'help', this help text will be shown and the return struct will be returned with the key name 'help'.\n",
......@@ -101,11 +101,11 @@
"If the call module struct contains a key with the name 'info', information on the static configuration of the renderer will be returned.\n",
"\n",
"[update]\n",
"For every successful path update, the VA source and listener ID has to be passed like this:\n",
" listener: <int>, the number of the listener identifier\n",
"For every successful path update, the VA source and sound receiver ID has to be passed like this:\n",
" receiver: <int>, the number of the sound receiver identifier\n",
" source: <int>, the number of the source identifier\n",
"\n",
"Updating the path filter (impulse response in time domain) for a listener and a source can be performed in two ways:\n",
"Updating the path filter (impulse response in time domain) for a sound receiver and a source can be performed in two ways:\n",
" a) using a path to a multi-channel WAV file:\n",
" Provide a key with the name 'filepath' and the path to the WAV file (absolute or containing the macro '$(VADataDir)' or relative to the executable) [priority given to 'filepath' if b) also applies]\n",
" b) sending floating-point data for each channel\n",
......@@ -122,7 +122,8 @@
}
],
"source": [
"rmod_generic_info = va.call_module( rmod_name, {} )\n",
"rmod_generic_info = va.get_rendering_module_parameters( rmod_name )\n",
"\n",
"from IPython.display import Markdown, display\n",
"display( Markdown( rmod_generic_info[ 'help' ] ) )"
]
......@@ -136,7 +137,7 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 4,
"metadata": {},
"outputs": [
{
......@@ -148,13 +149,13 @@
" 'numpaths': 0}"
]
},
"execution_count": 45,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"va.call_module( rmod_name, { 'info' : True } )"
"va.get_rendering_module_parameters( rmod_name, { 'info' : True } )"
]
},
{
......@@ -163,19 +164,21 @@
"source": [
"### Input data preparation\n",
"Let us quickly set up a virtual scene using input data from the Internet.\n",
"Download for example anechoic recordings directly from [here](http://www.openairlib.net/sites/default/files/anechoic/data/judebrereton/modern-clarinet-bb/mono/cl-mod-bb-piece-32.wav) and a binaural impulse response from [here](http://www.openairlib.net/sites/default/files/auralization/data/audiolab/lady-chapel-st-albans-cathedral/stereo/stalbans_a_binaural.wav). Either add the download folder as search path, or put the files where VA can find it."
"Download for example anechoic recordings directly from [here](http://www.openairlib.net/sites/default/files/anechoic/data/judebrereton/modern-clarinet-bb/mono/cl-mod-bb-piece-32.wav) and a binaural impulse response from [here](http://www.openairlib.net/sites/default/files/auralization/data/audiolab/lady-chapel-st-albans-cathedral/stereo/stalbans_a_binaural.wav). Either add the download folder as search path, or put the files where VA can find it (e.g. in the `data` folder)."
]
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"va.add_search_path( 'C:/Users/jonas/Downloads' )\n",
"signal_source_id = va.create_audio_file_signal_source( 'cl-mod-bb-piece-32.wav' )\n",
"va.set_audio_file_signal_source_playback_action_str( signal_source_id, 'play' )\n",
"va.set_audio_file_signal_source_playback_is_looping( signal_source_id, True )"
"va.add_search_path( '../../../VACore/data' )\n",
"va.add_search_path( 'C:\\dev\\VA\\VACore\\data' )\n",
"\n",
"signal_source_id = va.create_signal_source_buffer_from_file( 'cl-mod-bb-piece-32.wav' )\n",
"va.set_signal_source_buffer_playback_action_str( signal_source_id, 'play' )\n",
"va.set_signal_source_buffer_looping( signal_source_id, True )"
]
},
{
......@@ -188,7 +191,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": 6,
"metadata": {},
"outputs": [
{
......@@ -204,7 +207,7 @@
"sound_source_id = va.create_sound_source( 'PyExperimentalSoundSource' )\n",
"print( 'Experimental sound source id: ' + str( sound_source_id ) )\n",
"va.set_sound_source_signal_source( sound_source_id, signal_source_id )\n",
"listener_id = va.create_listener( 'PyExperimentalListener' )\n",
"receiver_id = va.create_sound_receiver( 'PyExperimentalListener' )\n",
"print( 'Experimental listener id: ' + str( sound_source_id ) )"
]
},
......@@ -220,20 +223,20 @@
},
{
"cell_type": "code",
"execution_count": 134,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'listener': 1, 'source': 1, 'ch1': [0.9, 0.0, 0.0, 0.0], 'ch2': [0.0, 0.0, -0.4, 0.0], 'verbose': True}\n"
"{'receiver': 1, 'source': 1, 'ch1': [0.9, 0.0, 0.0, 0.0], 'ch2': [0.0, 0.0, -0.4, 0.0], 'verbose': True}\n"
]
}
],
"source": [
"update_dirac = dict()\n",
"update_dirac[ 'listener' ] = listener_id\n",
"update_dirac[ 'receiver' ] = receiver_id\n",
"update_dirac[ 'source' ] = sound_source_id\n",
"update_dirac[ 'ch1' ] = [ 0.9, 0.0, 0.0, 0.0 ] # Length of samples is arbitrary, here\n",
"update_dirac[ 'ch2' ] = [ 0.0, 0.0, -0.4, 0.0 ] # Length of samples is arbitrary, here\n",
......@@ -250,22 +253,11 @@
},
{
"cell_type": "code",
"execution_count": 135,
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Updated sound path <L1, S1, C1> with 4 new samples\n",
"Updated sound path <L1, S1, C2> with 4 new samples\n"
]
}
],
"outputs": [],
"source": [
"msg = va.call_module( rmod_name, update_dirac )\n",
"print( msg[ 'info_ch1' ] )\n",
"print( msg[ 'info_ch2' ] )"
"va.set_rendering_module_parameters( rmod_name, update_dirac )"
]
},
{
......@@ -279,20 +271,20 @@
},
{
"cell_type": "code",
"execution_count": 125,
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'listener': 1, 'source': 1, 'filepath': 'stalbans_a_binaural.wav', 'verbose': True}\n"
"{'receiver': 1, 'source': 1, 'filepath': 'stalbans_a_binaural.wav', 'verbose': True}\n"
]
}
],
"source": [
"update_filepath = dict()\n",
"update_filepath[ 'listener' ] = listener_id\n",
"update_filepath[ 'receiver' ] = receiver_id\n",
"update_filepath[ 'source' ] = sound_source_id\n",
"update_filepath[ 'filepath' ] = 'stalbans_a_binaural.wav'\n",
"#update_filepath[ 'channel' ] = 2 # ... in case you explicitly want to update a single channel with a mono IR file\n",
......@@ -302,20 +294,11 @@
},
{
"cell_type": "code",
"execution_count": 136,
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Updated sound path <L1, S1> using (unrolled) file path 'C:\\Users\\jonas\\Downloads\\stalbans_a_binaural.wav'\n"
]
}
],
"outputs": [],
"source": [
"msg = va.call_module( rmod_name, update_filepath )\n",
"print( msg[ 'info' ] )"
"va.set_rendering_module_parameters( rmod_name, update_filepath )"
]
},
{
......@@ -330,7 +313,7 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 18,
"metadata": {},
"outputs": [
{
......@@ -366,29 +349,25 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Updated sound path <L1, S1, C1> with 88200 new samples\n",
"Updated sound path <L1, S1, C2> with 88200 new samples\n"
]
}
],
"outputs": [],
"source": [
"update_ir = dict()\n",
"update_ir[ 'listener' ] = listener_id\n",
"update_ir[ 'receiver' ] = receiver_id\n",
"update_ir[ 'source' ] = sound_source_id\n",
"update_ir[ 'ch1' ] = ir[ 0 ]; # Requires ir samples to be floating point, so sample type conversion might be required\n",
"update_ir[ 'ch2' ] = ir[ 1 ]; # Requires ir samples to be floating point, so sample type conversion might be required\n",
"update_ir[ 'verbose' ] = True;\n",
"\n",
"msg = va.call_module( rmod_name, update_ir )\n",
"print( msg[ 'info_ch1'] )\n",
"print( msg[ 'info_ch2'] )"
"update_ir[ 'verbose' ] = True;"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"va.set_rendering_module_parameters( rmod_name, update_ir )"
]
}
],
......@@ -397,6 +376,18 @@
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",