use-acoustics
Composable primitive acoustics utilities for Rust.
use-acoustics provides a small, self-contained v0.1 API for common sound-domain calculations:
frequency and period helpers, wavelength conversions, decibel conversions, sound pressure level,
sound intensity level, and simple speed of sound approximations.
Relationship To RustUse
use-wave is the broader wave utility set. use-acoustics is the sound-specific sibling that
focuses on reusable primitives and small formulas for acoustics-oriented applications.
Warning
The formulas in this crate are general-purpose approximations and convenience conversions. They are not a replacement for specialized acoustic engineering software, calibrated measurements, or standards-driven analysis.
Installation
Crates.io:
[]
= "0.1"
Local path:
[]
= { = "crates/use-acoustics" }
Examples
use *;
let wavelength = wavelength_meters.unwrap;
assert!;
let spl = sound_pressure_level_db.unwrap;
assert!;
use *;
let amplitude_ratio = db_to_amplitude_ratio.unwrap;
let power_ratio = db_to_power_ratio.unwrap;
assert!;
assert!;
Module Overview
| Module | Purpose |
|---|---|
decibel |
Decibel ratios plus SPL and SIL conversions |
frequency |
Frequency newtype, period, and angular frequency helpers |
wavelength |
Frequency and wavelength conversion helpers |
pressure |
Sound pressure newtype and SPL inverse conversion |
intensity |
Sound intensity newtype and SIL inverse conversion |
speed |
Speed of sound helpers |
prelude |
Re-exports for the main public API |
Scope
- decibels and ratios
- sound pressure level and sound intensity level
- frequency, period, and angular frequency
- wavelength conversions
- speed of sound approximations
Status
Early v0.1 API.