2023-11-22 13:40:16 +00:00
|
|
|
//! # Library for acoustic signal processing
|
2023-11-25 13:58:20 +00:00
|
|
|
//!
|
2024-07-11 19:10:38 +00:00
|
|
|
//! This crate contains structures and functions to perform acoustic
|
|
|
|
//! measurements, interact with data acquisition devices and apply common
|
|
|
|
//! acoustic analysis operations on them.
|
|
|
|
//!
|
|
|
|
//! You will find the following stuff in this crate:
|
|
|
|
//!
|
|
|
|
//! - Data acquisition, recording, signal generation
|
|
|
|
//! - Power spectra estimation, transfer function estimation tools.
|
|
|
|
//! - Sound Level Meter implementation.
|
|
|
|
//! - Filter design tools, maybe borrowed from other crates?
|
|
|
|
//!
|
|
|
|
//! ## Note to potential users
|
|
|
|
//!
|
|
|
|
//! ** This crate is still under heavy development. API changes happen on the
|
|
|
|
//! fly. Documentation is not finished. Use with caution but except things to be
|
|
|
|
//! broken and buggy. Use at your own risk and responsibility.**
|
|
|
|
//!
|
|
|
|
//! ## Author information
|
|
|
|
//!
|
|
|
|
//! The main developer is J.A. de Jong from [ASCEE](https://www.ascee.nl). In
|
|
|
|
//! case of bug reports, please file them to info@ascee.nl.
|
|
|
|
//!
|
2023-12-13 10:02:06 +00:00
|
|
|
#![warn(missing_docs)]
|
|
|
|
#![allow(non_snake_case)]
|
|
|
|
#![allow(non_upper_case_globals)]
|
|
|
|
#![allow(unused_imports)]
|
|
|
|
|
|
|
|
mod config;
|
2024-04-19 12:09:32 +00:00
|
|
|
use config::*;
|
2023-12-13 10:02:06 +00:00
|
|
|
|
2024-04-19 12:09:32 +00:00
|
|
|
pub use config::Flt;
|
2023-12-13 10:02:06 +00:00
|
|
|
pub mod daq;
|
2024-07-11 19:10:38 +00:00
|
|
|
pub mod filter;
|
2024-06-25 14:20:47 +00:00
|
|
|
pub mod ps;
|
2023-12-13 10:02:06 +00:00
|
|
|
pub mod siggen;
|
2024-04-19 12:09:32 +00:00
|
|
|
use filter::*;
|
2023-12-13 10:02:06 +00:00
|
|
|
|
|
|
|
/// A Python module implemented in Rust.
|
2023-12-20 20:20:10 +00:00
|
|
|
#[cfg(feature = "python-bindings")]
|
2023-12-13 10:02:06 +00:00
|
|
|
#[pymodule]
|
2024-07-11 19:10:38 +00:00
|
|
|
#[pyo3(name = "_lasprs")]
|
2024-05-01 13:25:26 +00:00
|
|
|
fn lasprs(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
2024-07-06 17:36:51 +00:00
|
|
|
daq::add_py_classses(m)?;
|
2023-12-13 10:02:06 +00:00
|
|
|
|
2023-11-25 13:58:20 +00:00
|
|
|
// Add filter submodule
|
2024-05-01 13:25:26 +00:00
|
|
|
m.add_class::<filter::Biquad>()?;
|
|
|
|
m.add_class::<filter::SeriesBiquad>()?;
|
|
|
|
m.add_class::<filter::BiquadBank>()?;
|
2024-05-05 13:01:50 +00:00
|
|
|
m.add_class::<siggen::Siggen>()?;
|
2024-05-01 13:25:26 +00:00
|
|
|
|
2023-11-25 13:58:20 +00:00
|
|
|
Ok(())
|
|
|
|
}
|