This is a simple example how to create a simple acoustic scene in VA using Python.
%% Cell type:markdown id: tags:
#### Prerequisites
You can ignore this part, it is for preparation purposes only.
%% Cell type:code id: tags:
``` python
importsys
sys.path.append('../../Lib/site-packages')
importos
print('Current working directory:',os.getcwd())
importva
print('Successfully loaded VA Python extension')
```
%% Cell type:markdown id: tags:
### Connect
%% Cell type:code id: tags:
``` python
va.connect("localhost");
```
%% Cell type:markdown id: tags:
Reset VA to clear the scene
%% Cell type:code id: tags:
``` python
va.reset()
```
%% Cell type:markdown id: tags:
Control output gain
%% Cell type:code id: tags:
``` python
va.set_output_gain(0.25)
```
%% Cell type:markdown id: tags:
Add the current working directory or any other relative or absolute directory as a search path to your VA application. From now on, only use relative paths or macros to paths.
> Pathes are relevant on server side, not on a remote client. The files must be available on the computer **where the VA application is running**!
%% Cell type:code id: tags:
``` python
va.add_search_path(os.getcwd());
```
%% Cell type:markdown id: tags:
### Signal source
Create a signal source from a file and start playback with looping mode