In-house Python Library for Acoustic Signal Processing (LASP): fractional octave filter banks, Fourier analysis, code for doing acoustic measurements and beamforming tools. http://code.ascee.nl/ASCEE/lasp
Go to file
2022-10-16 18:39:55 +02:00
cmake Textual improvements. Formatting (Neoformat) improvements. Let DataTypeDescriptor be a reference (to a global const std map in Daq class. Improved naming of certain functions. Better DaqData implementation, now we make sure memory alignment is good at all times. Switched functions arguments in DaqData constructor to comply with all other cases of first frame, then channel. Better naming of stream in RtAudio. Better handling of faulty function calling in RtAudio start(). Bugfix in RtAudio, did call right Daq::dtypeDescr() function --> result was that only first channel was copied to all channels. Added extra check in StreamMgr. Removed unnecessary TypedDaqData class. Use a safe queue in threaded in data handler. We can now remove the Boost code for that. 2022-10-10 19:17:38 +02:00
examples Cleaned up example code 2022-10-10 19:29:24 +02:00
img Removed old testing code. Improved Doxyfile, added logo to Doxygen. Added pytest testing config. 2022-09-03 16:07:44 +02:00
scripts DaqConfiguration(s) back in place. Time to couple some stuff to ACME 2022-08-01 17:26:22 +02:00
src/lasp Merge branch 'master' into develop 2022-10-16 18:39:55 +02:00
test Added Armadillo backend for Fft's. This one seems to work properly. Added some tests code for daq and StreamMgr in C++. Fixed a stray of a debug dmat somewhere in lasp_daqdata. 2022-10-12 15:02:42 +02:00
third_party Removed Boost dependency 2022-10-11 09:53:50 +02:00
.gitattributes Split up GUI in different Widgets, added revtime, added figure list possibilities, added Qt Resources, added About panel, added lots of comments, export and import of measurements 2018-05-02 16:29:53 +02:00
.gitignore Merged Pybind11 branch. It is more ~ less ready 2022-10-06 21:45:36 +02:00
.gitmodules Added RtAudio and UlDAQ as subprojects that are compiled in. Fixed proper connection of UlDAQ. Set default sensitity to 1.0 for a new DaqChannel. Segfault bug fixed in DaqData::copyToRaw. Scan in background for devices when StreamMgr() is initialized. Fixed bug in storing of DaqConfigs to lasp_shelve. Set RtAudio to 5.2.0. 2022-10-05 11:27:46 +02:00
CMakeLists.txt Added Armadillo backend for Fft's. This one seems to work properly. Added some tests code for daq and StreamMgr in C++. Fixed a stray of a debug dmat somewhere in lasp_daqdata. 2022-10-12 15:02:42 +02:00
Doxyfile Updated pyproject and doxyfile, and readme 2022-09-22 10:11:47 +02:00
LICENSE Initial commit 2018-03-05 20:58:03 +01:00
pyproject.toml Textual improvements. Formatting (Neoformat) improvements. Let DataTypeDescriptor be a reference (to a global const std map in Daq class. Improved naming of certain functions. Better DaqData implementation, now we make sure memory alignment is good at all times. Switched functions arguments in DaqData constructor to comply with all other cases of first frame, then channel. Better naming of stream in RtAudio. Better handling of faulty function calling in RtAudio start(). Bugfix in RtAudio, did call right Daq::dtypeDescr() function --> result was that only first channel was copied to all channels. Added extra check in StreamMgr. Removed unnecessary TypedDaqData class. Use a safe queue in threaded in data handler. We can now remove the Boost code for that. 2022-10-10 19:17:38 +02:00
pytest.ini Removed old testing code. Improved Doxyfile, added logo to Doxygen. Added pytest testing config. 2022-09-03 16:07:44 +02:00
README.md Textual improvements. Formatting (Neoformat) improvements. Let DataTypeDescriptor be a reference (to a global const std map in Daq class. Improved naming of certain functions. Better DaqData implementation, now we make sure memory alignment is good at all times. Switched functions arguments in DaqData constructor to comply with all other cases of first frame, then channel. Better naming of stream in RtAudio. Better handling of faulty function calling in RtAudio start(). Bugfix in RtAudio, did call right Daq::dtypeDescr() function --> result was that only first channel was copied to all channels. Added extra check in StreamMgr. Removed unnecessary TypedDaqData class. Use a safe queue in threaded in data handler. We can now remove the Boost code for that. 2022-10-10 19:17:38 +02:00
setup.py Textual improvements. Formatting (Neoformat) improvements. Let DataTypeDescriptor be a reference (to a global const std map in Daq class. Improved naming of certain functions. Better DaqData implementation, now we make sure memory alignment is good at all times. Switched functions arguments in DaqData constructor to comply with all other cases of first frame, then channel. Better naming of stream in RtAudio. Better handling of faulty function calling in RtAudio start(). Bugfix in RtAudio, did call right Daq::dtypeDescr() function --> result was that only first channel was copied to all channels. Added extra check in StreamMgr. Removed unnecessary TypedDaqData class. Use a safe queue in threaded in data handler. We can now remove the Boost code for that. 2022-10-10 19:17:38 +02:00

Library for Acoustic Signal Processing

Welcome to LASP: Library for Acoustic Signal Processing. LASP is a C++ library with a Python interface which is supposed to process (multi-) microphone acoustic data in real time on a PC and output results.

At the point in time of this writing, we are yet unsure whether the Raspberry PI will have enough computational power to this end, but may be by the time it is finished, we have a new faster generation :).

Current features that are implemented:

  • Compile-time determination of the floating-point accuracy (32/64 bit)
  • Fast convolution FIR filter implementation
  • Sample rate decimation by an integer factor of 4.
  • Octave filterbank FIR filters designed to comply with IEC 61260 (1995).
  • 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
  • Third octave filter bank FIR filters designed to comply with IEC 61260 (1995).
  • Slow and fast time updates of (A/C/Z) weighted sound pressure levels

Future features (wish-list)

  • Conventional and delay-and-sum beam-forming algorithms

For now, the source code is well-documented but it requires some additional documentation (the math behind it). This will be published in a sister repository (https://code.ascee.nl/ascee/lasp-doc).

If you have any question(s), please feel free to contact us: info@ascee.nl.

Building from source

Two commands that install all requirements (for Ubuntu / Linux Mint)

  • pip install scipy numpy build scikit-build appdirs
  • sudo apt install libusb-dev libpulse-dev libboost-dev

Runtime dependencies (Linux)

  • FFTW (For really fast FFT's). If compiled with Ffftpack, this library is not required.
  • libUlDAQ, for the Measurement Computing DT9837A USB DAQ box
    • GNU Autotools, for compiling libUlDAQ
  • RtAudio, for Audio DAQ backends
  • libusb
  • BLAS (OpenBLAS, other).

Editable install

In the root directory of the repository, run:

  • pip3 isntall --user -e .
  • cmake .
  • make -j

Build dependencies

Optional dependencies, which can be turned ON/OFF using CMake:

  • Build tools: compiler http://cmake.org, the Python packages:

    • Scipy
    • Numpy
    • appdirs These can all be installed using:
  • The following Python packages need also be available:

    • Scipy (which includes Numpy). Install with sudo apt install python3-scipy, or pacman -S scipy.
    • appdirs, which can be grabbed from https://pypi.org

Compilation of LASP

Archlinux

Compiling the code on Archlinux requires the following packages to be available:

  • openblas-lapack (AUR)
  • Python>=3.7
  • Numpy (Python-numpy)
  • Cython

Ubuntu / Linux Mint

Only tested with Linux Mint 18.04, we require the following packages for compilation:

  • build-essential
  • cython
  • python3-numpy
  • libopenblas

If building RtAudio with the ALSA backend:

  • libclalsadrv-dev
  • libopenblas-base
  • libopenblas-dev
  • libusb-1.0-dev