2018-03-06 20:15:21 +00:00
|
|
|
# Library for Acoustic Signal Processing
|
|
|
|
|
2023-01-10 20:50:48 +00:00
|
|
|
[![Build Status](https://drone.ascee.nl/api/badges/ASCEE/lasp/status.svg)](https://drone.ascee.nl/ASCEE/lasp)
|
|
|
|
|
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:
|
|
|
|
- Compile-time determination of the floating-point accuracy (32/64 bit)
|
|
|
|
- Fast convolution FIR filter implementation
|
2018-12-29 12:57:32 +00:00
|
|
|
- Sample rate decimation by an integer factor of 4.
|
2018-03-06 20:26:08 +00:00
|
|
|
- Octave filterbank FIR filters designed to comply with IEC 61260
|
2018-03-06 20:15:21 +00:00
|
|
|
(1995).
|
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.
|
|
|
|
- A thread-safe job queue including routines to create worker threads.
|
|
|
|
- Several linear algebra routines (wrappers around BLAS and LAPACK).
|
|
|
|
- A nice debug tracer implementation
|
2018-12-29 12:57:32 +00:00
|
|
|
- Third octave filter bank FIR filters designed to comply with IEC 61260
|
|
|
|
(1995).
|
2018-03-06 20:15:21 +00:00
|
|
|
- Slow and fast time updates of (A/C/Z) weighted sound pressure levels
|
2018-12-29 12:57:32 +00:00
|
|
|
|
|
|
|
Future features (wish-list)
|
|
|
|
- Conventional and delay-and-sum beam-forming algorithms
|
2018-03-06 20:15:21 +00:00
|
|
|
|
|
|
|
For now, the source code is well-documented but it requires some
|
|
|
|
additional documentation (the math behind it). This will be published
|
2022-07-20 12:58:48 +00:00
|
|
|
in a sister repository (https://code.ascee.nl/ascee/lasp-doc).
|
2018-03-06 20:15:21 +00:00
|
|
|
|
2018-12-29 12:57:32 +00:00
|
|
|
If you have any question(s), please feel free to contact us: info@ascee.nl.
|
2019-03-28 20:26:11 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
# Installation
|
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-01-12 10:50:34 +00:00
|
|
|
- `$ sudo apt install libopenblas-dev python3-pip python3-scipy libusb-dev libpulse-dev cmake-curses-gui python3-h5py`
|
|
|
|
- `$ pip3 install --user -r requirements.txt`
|
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-01-12 10:50:34 +00:00
|
|
|
### Build documentation
|
2022-01-13 12:59:35 +00:00
|
|
|
|
2023-01-12 10:50:34 +00:00
|
|
|
`$ sudo apt install doxygen`
|
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-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:50:34 +00:00
|
|
|
See examples directories for IPython notebooks.
|