Adding more notebook control widgets

parent 01cacdbf
......@@ -157,23 +157,77 @@
"display( output_gain_slider )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Macros\n",
"\n",
"Macros can be defined to make your life easier. Don't mess around with file pathes too much, use macros. Don't rename output file names for recording and other exported information, use macros. You can test your macros using th method `substitute_macro` (see below), but you don't have to do it yourself. VA will always substitute macros where possible."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
"execution_count": 42,
"metadata": {},
"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",
"print( '$(data): ' + va.substitute_macro( '$(data)' ) )\n",
"print( '$(big_data_dir): ' + va.substitute_macro( '$(big_data_dir)' ) )\n",
"print( '$(conf): ' + va.substitute_macro( '$(conf)' ) )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Reset\n",
"Use `reset` to reset the entire scene."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
"execution_count": 47,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d008b4bac6c14a21ad1956680f4b7645",
"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",
"def on_reset_button_clicked( b ) :\n",
" va.reset()\n",
" \n",
"reset_button.on_click( on_reset_button_clicked )\n",
"display( reset_button )"
]
}
],
"metadata": {
......
......@@ -16,6 +16,7 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true,
"scrolled": false
},
"outputs": [],
......@@ -90,7 +91,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"connected = va.is_connected()\n",
......@@ -122,7 +125,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import os\n",
......@@ -151,7 +156,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"vamods = va.enumerate_modules()\n",
......@@ -173,6 +180,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",
"version": "3.6.2"
}
},
"nbformat": 4,
......
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