-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added class and function docstrings * Updated docstrings and README * Linting and fixed tests * Added docs and README * Linting
- Loading branch information
Showing
16 changed files
with
4,650 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,74 @@ | ||
# uas-sound-event | ||
Render movement events from static hover UAS source recordings | ||
Simulates simple atmospheric acoustic | ||
propagation effects for rendering multichannel auralisations of | ||
unmanned aerial systems (UAS - drones), or other airborne sources, | ||
in motion. | ||
|
||
The model assumes that input source signals have been recorded at a fixed | ||
distance and with a fixed rotational speed. Auralisations are created | ||
assuming free-field propagation and account for the following: | ||
* Doppler effect | ||
* Distance-dependent atmospheric absorption of high frequencies | ||
* Ground reflection (including path length difference and | ||
angle-dependent high-frequency absorption) | ||
* Distance-based amplitude panning (DBAP) to spatialise source in 3D | ||
loudspeaker array (direct sound and ground reflection spatialised | ||
separately). | ||
|
||
**Author**: Marc C. Green ([email protected]) | ||
|
||
**Affiliation**: University of Salford (Acoustics Research Centre) | ||
|
||
**Copyright statement**: This file and code is part of work undertaken within | ||
the REFMAP project (www.refmap.eu), and is subject to license. | ||
|
||
Based on method detailed in: [_Heutschi, K., Ott, B., Nussbaumer, T., and Wellig, P., | ||
"Synthesis of real world drone signals based on lab recordings," | ||
Acta Acustica, Vol. 4, No. 6, 2020, p. 24._](https://doi.org/10.1051/aacus/2020023) | ||
|
||
## Usage | ||
The main object implementing the propagation model is `UASEventRenderer`. This | ||
object is initialised using CSV files defining flightpaths in segments. Each | ||
segment requires the definition of start and end points in cartesian | ||
co-ordinates, along with starting and ending speeds in meters per second. | ||
The following is an example flightpath configuration file with four segments. | ||
Further examples can be found in the `flights/` directory. | ||
|
||
``` | ||
segment, startxyz, endxyz, speeds | ||
constant-speed flyby, 10 -200 30, 10 180 30, 30 30 | ||
decelerate, 10 180 30, 10 200 30, 30 0 | ||
accelerate, 10 200 30, 10 180 30, 0 30 | ||
flyby back, 10 180 30, 10 -200 30, 30 30 | ||
``` | ||
|
||
Using these CSV flightpath definitions, `UASEventRenderer` calculates the | ||
position of the source at every sample time. These positions are used to | ||
calculate the delays, distances, and angles required to render the propagation | ||
effects based on a listener located at the origin of the co-ordinate system. | ||
|
||
The listener height is set to 1.5 m by default. This affects the calculation | ||
of the ground reflection signal in particular. Additional parameters include | ||
the ground material, which can be selected from `'grass'`, `'soil'`, or | ||
`'asphalt'`, and the loudspeaker layout to target with the DBAP panning | ||
(currently only `'Octagon + Cube'` is implemented). | ||
|
||
The object's `render()` method can then be used to generate a time-series | ||
signal at the receiver point. The input source used should be sufficient in | ||
length to cover the time taken to cover the entire defined flightpath. | ||
|
||
The following is a basic script for rendering an event: | ||
|
||
``` | ||
import soundfile as sf | ||
from uasevent.environment import UASEventRenderer | ||
from uasevent.utils import load_params | ||
x, fs = sf.read('example_source.wav') | ||
renderer = UASEventRenderer( | ||
load_params('flightpath.csv'), | ||
receiver_height=1.5, | ||
fs=fs) | ||
output = renderer.render(x) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="refresh" content="0; url=./uasevent.html"/> | ||
</head> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
segment, startxyz, endxyz, speeds | ||
constant-speed flyby, -200 0 30, 200 0 30, 30 30 | ||
constant-speed flyby, -200 0 10, 200 0 10, 15 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
segment, startxyz, endxyz, speeds | ||
constant-speed flyby, 0 -200 30, 0 200 30, 30 30 | ||
constant-speed flyby, 0 -200 10, 0 200 10, 15 15 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.