Wiki » History » Version 2

Emmanouil Theofanis Chourdakis, 2017-10-04 07:32 PM

1 2 Emmanouil Theofanis Chourdakis
h1. SimScene.py - An acoustic pattern generation tool
2 1 Emmanouil Theofanis Chourdakis
3 1 Emmanouil Theofanis Chourdakis
Copyright (c) Emmanouil Theofanis Chourdakis <e.t.chourdakis@qmul.ac.uk>
4 1 Emmanouil Theofanis Chourdakis
5 1 Emmanouil Theofanis Chourdakis
SimScene.py is a collection of tools to synthesize an audio scene from independent sound events. 
6 1 Emmanouil Theofanis Chourdakis
It is inspired by Lagrange et al. simScene (https://bitbucket.org/mlagrange/simscene) but takes
7 1 Emmanouil Theofanis Chourdakis
a different direction. The goal of simScene.py is to (1) have a python implementation of such a 
8 1 Emmanouil Theofanis Chourdakis
system since python is the platform of choice for developers accustomed with deep learning packages
9 1 Emmanouil Theofanis Chourdakis
or other python package candy and (2) to allow generating audio scenes from graph-based patterns.
10 1 Emmanouil Theofanis Chourdakis
11 2 Emmanouil Theofanis Chourdakis
*Currently it can only batch-generate acoustic scenes with target EBRs*
12 2 Emmanouil Theofanis Chourdakis
13 1 Emmanouil Theofanis Chourdakis
Please direct any comments, suggestions, etc. to Emmanouil Chourdakis <e.t.chourdakis@qmul.ac.uk>
14 1 Emmanouil Theofanis Chourdakis
15 1 Emmanouil Theofanis Chourdakis
This code is licensed under GPLv3. Please see LICENSE for more info.
16 1 Emmanouil Theofanis Chourdakis
17 2 Emmanouil Theofanis Chourdakis
h2. Usage
18 1 Emmanouil Theofanis Chourdakis
19 2 Emmanouil Theofanis Chourdakis
The best way to show usage of the tool is through an example of generating 10 scenes of bird sounds in the forest.  First, clone this repository in a directory (requires mercurial):
20 1 Emmanouil Theofanis Chourdakis
21 2 Emmanouil Theofanis Chourdakis
@hg clone https://code.soundsoftware.ac.uk/hg/simscene-py@
22 2 Emmanouil Theofanis Chourdakis
23 2 Emmanouil Theofanis Chourdakis
Then install the necessary libraries
24 2 Emmanouil Theofanis Chourdakis
25 2 Emmanouil Theofanis Chourdakis
@pip install -r requirements.txt@
26 2 Emmanouil Theofanis Chourdakis
27 2 Emmanouil Theofanis Chourdakis
Then open the files _forest_backgrounds.xls_ and _forest_events.xls_ in the _examples_ folder which contain information about the event and background tracks (for now do not change them, just see that you can open them). Note that you can view the same files as _.txt_ files in the same directory. SimScene.py allows both formats. 
28 2 Emmanouil Theofanis Chourdakis
29 2 Emmanouil Theofanis Chourdakis
Here is a preview of the _forest_backgrounds.xls_ in Calc:
30 2 Emmanouil Theofanis Chourdakis
!forest_backgrounds.png!
31 2 Emmanouil Theofanis Chourdakis
32 2 Emmanouil Theofanis Chourdakis
An explanation of the fields follows:
33 2 Emmanouil Theofanis Chourdakis
*  *label* - The name of the track
34 2 Emmanouil Theofanis Chourdakis
*  *sampleid* - Prefix of the filename the track uses. If there are many files with _sampleid_ as their prefix, one as random is picked and used for generation.
35 2 Emmanouil Theofanis Chourdakis
*  *snr* - For the first row, it is just the amplitude of that track. For the second row and below, it is the SNR (not dB) of the track of that row, relative to the sum of the other tracks.
36 2 Emmanouil Theofanis Chourdakis
37 2 Emmanouil Theofanis Chourdakis
38 2 Emmanouil Theofanis Chourdakis
 
39 2 Emmanouil Theofanis Chourdakis