2018-03-06 20:15:21 +00:00
|
|
|
# Library for Acoustic Signal Processing
|
|
|
|
|
2023-01-13 07:59:22 +00:00
|
|
|
- Master branch: [![Build Status](https://drone.ascee.nl/api/badges/ASCEE/lasp/status.svg?ref=refs/heads/master)](https://drone.ascee.nl/ASCEE/lasp)
|
|
|
|
- Develop branch: [![Build Status](https://drone.ascee.nl/api/badges/ASCEE/lasp/status.svg?ref=refs/heads/develop)](https://drone.ascee.nl/ASCEE/lasp)
|
2023-01-12 21:27:42 +00:00
|
|
|
|
|
|
|
|
2022-10-10 17:17:38 +00:00
|
|
|
Welcome to LASP: Library for Acoustic Signal Processing. LASP is a C++ library
|
2023-01-12 10:50:34 +00:00
|
|
|
with a Python interface which is supposed to acquire and process (multi) sensor data in real time on a PC and output results.
|
2018-03-06 20:15:21 +00:00
|
|
|
|
|
|
|
Current features that are implemented:
|
2023-01-20 13:22:48 +00:00
|
|
|
|
2023-03-13 09:38:09 +00:00
|
|
|
|
2023-01-20 13:22:48 +00:00
|
|
|
- Communication with data acquisition (DAQ) devices, of which:
|
|
|
|
- Internal sound cards via the [RtAudio](http://www.music.mcgill.ca/~gary/rtaudio) backend. Many thanks to Gary P. Scavone et al.
|
|
|
|
- [Measurement Computing](https://www.mccdaq.com) [DT9838A](https://www.mccdaq.com/Products/Sound-Vibration-DAQ/DT9837) signal analyzer.
|
|
|
|
- Configuration of DAQ devices: AC coupling, IEPE, sensitivity physical
|
|
|
|
quantities.
|
|
|
|
- Recording of signals from these DAQ devices, and storing in a HDF5 file.
|
|
|
|
- Filter designers to create A/C sound pressure weighting
|
|
|
|
- Biquad filter designers for low pass, high pass, peaking and notch filters
|
|
|
|
- A Peak Programme Meter (PPM) to monitor signal levels from DAQ and to watch
|
|
|
|
for signal clipping.
|
|
|
|
- A signal generator to create sine waves, sweeps and noise (white / pink).
|
|
|
|
- Equalizers to equalize the output prior to sending.
|
2018-03-06 20:26:08 +00:00
|
|
|
- Averaged power spectra and power spectral density determination
|
|
|
|
using Welch' method. Taper functions of Hann, Hamming, Bartlett and
|
|
|
|
Blackman are provided.
|
2023-01-20 13:22:48 +00:00
|
|
|
- (One third) octave filter bank filters designed to comply with IEC 61260
|
2018-12-29 12:57:32 +00:00
|
|
|
(1995).
|
2018-03-06 20:15:21 +00:00
|
|
|
- Slow and fast time updates of (A/C/Z) weighted sound pressure levels
|
2023-01-20 13:22:48 +00:00
|
|
|
- Full Sound Level Meter implementation
|
|
|
|
- Real time Sound Level meter, Power / Transfer function estimator
|
|
|
|
- Spectra data smoothing algorithms
|
|
|
|
- Sensor calibration for microphones
|
2018-12-29 12:57:32 +00:00
|
|
|
|
2023-03-13 09:38:09 +00:00
|
|
|
|
2018-12-29 12:57:32 +00:00
|
|
|
Future features (wish-list)
|
2023-01-20 13:22:48 +00:00
|
|
|
|
2023-03-13 09:38:09 +00:00
|
|
|
|
2018-12-29 12:57:32 +00:00
|
|
|
- Conventional and delay-and-sum beam-forming algorithms
|
2023-01-20 13:22:48 +00:00
|
|
|
- Impedance tube measurement processing
|
2018-03-06 20:15:21 +00:00
|
|
|
|
2023-01-20 13:22:48 +00:00
|
|
|
For now, the source code is well-documented on [lasp.ascee.nl](https://lasp.ascee.nl) but it requires some
|
|
|
|
additional documentation (the math behind it). This is maintained
|
2023-03-13 09:38:09 +00:00
|
|
|
in a sister repository [lasp-doc](https://code.ascee.nl/ascee/lasp-doc).
|
2018-03-06 20:15:21 +00:00
|
|
|
|
2023-03-13 09:38:09 +00:00
|
|
|
If you have any question(s), please feel free to contact us: [email](info@ascee.nl).
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2023-04-21 11:27:45 +00:00
|
|
|
# Installation - Linux (Debian-based)
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
## Dependencies
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2023-07-14 11:54:26 +00:00
|
|
|
One-liner:
|
|
|
|
|
|
|
|
- `$ sudo apt install python3-pybind11 libopenblas-dev python3-pip python3-scipy libusb-1.0-0-dev libpulse-dev cmake-curses-gui python3-h5py python3-dataclasses-json python3-matplotlib python3-appdirs`
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2022-07-20 12:58:48 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
If building RtAudio with the ALSA backend, you will also require the following packages:
|
2022-01-13 12:59:35 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
- libclalsadrv-dev
|
2022-07-20 12:58:48 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
If building RtAudio with the Jack Audio Connection Kit (JACK) backend, you will also require the following packages:
|
2022-09-22 08:11:47 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
- libjack-jackd2-dev
|
2022-09-22 08:11:47 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
## Download & build
|
2022-09-22 08:11:47 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
- `$ git clone --recursive https://code.ascee.nl/ASCEE/lasp.git`
|
|
|
|
- `$ cd lasp`
|
2022-07-20 12:58:48 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
For a release build:
|
2022-07-20 12:58:48 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
- `$ cmake .`
|
2022-07-20 12:58:48 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
or optionally for a custom build:
|
2022-07-20 12:58:48 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
- `$ ccmake .`
|
2022-07-20 12:58:48 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
Configure and run:
|
2022-01-13 12:59:35 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
- `$ make -j`
|
2022-01-13 12:59:35 +00:00
|
|
|
|
2023-07-14 11:57:02 +00:00
|
|
|
# Installation - (x86_64) Windows (with WinPython), build with MSYS2
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
- Download and install [WinPython](https://winpython.github.io)
|
|
|
|
- Download and install [MSYS2](https://msys2.org). Make sure to install the
|
|
|
|
x86_64 version.
|
|
|
|
- Download and install [Git for Windows](https://git-scm.com)
|
|
|
|
|
|
|
|
- When unzipping WinPython, make sure to choose a proper and simple path, i.e.
|
|
|
|
C:\winpython
|
|
|
|
- Append C:\winpython\ to the PATH environment variable.
|
|
|
|
- Run Python and install Pybind11
|
|
|
|
- `python -m pip install pybind11`
|
|
|
|
|
|
|
|
|
|
|
|
- Open a msys2 **MINGW64** terminal. And run:
|
|
|
|
|
|
|
|
- `pacman -S git`
|
|
|
|
|
|
|
|
- Then clone the LASP repo:
|
|
|
|
|
|
|
|
- `git clone https://code.ascee.nl/ascee/lasp`
|
|
|
|
- `cd lasp`
|
|
|
|
|
|
|
|
- Configure MSYS2 further, and run cmake:
|
|
|
|
|
|
|
|
- `scripts/install_msys2_buiddeps.sh`
|
|
|
|
- `scripts/configur_cmake_msys2.sh`
|
|
|
|
|
|
|
|
|
|
|
|
# Documentation
|
2022-01-13 12:59:35 +00:00
|
|
|
|
2023-01-20 13:22:48 +00:00
|
|
|
In directory:
|
|
|
|
|
|
|
|
`$ sudo apt install doxygen graphviz`
|
|
|
|
`$ pip install doxypypy`
|
2022-01-13 12:59:35 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
While still in lasp dir:
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
`$ doxygen`
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
This will build the documentation. It can be read by:
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
`$ <YOUR-BROWSER> doc/html/index.html`
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2023-01-20 13:22:48 +00:00
|
|
|
Or via docker:
|
|
|
|
|
|
|
|
`$ docker build -t lasp_ascee_nl:latest .`
|
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
## Install
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
For an editable install (while developing):
|
2022-10-10 17:17:38 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
- `$ pip3 install --prefix=$HOME/.local -e .`
|
2022-10-10 17:17:38 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
To install locally, for a fixed version:
|
|
|
|
|
|
|
|
- `$ pip3 install --prefix=$HOME/.local`
|
|
|
|
|
|
|
|
## Usage
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2023-01-12 10:59:10 +00:00
|
|
|
- See examples directories for IPython notebooks.
|
|
|
|
- Please refer to the [documentation](https://lasp.ascee.nl/) for features.
|