nsrt

Crates.ionsrt
lib.rsnsrt
version0.1.0
created_at2025-05-02 22:25:33.259688+00
updated_at2025-05-02 22:25:33.259688+00
descriptionA Rust driver for the NSRT_mk4 sound level meter
homepage
repositoryhttps://github.com/brandonweeks/nsrt
max_upload_size
id1658272
size337,393
Brandon Weeks (brandonweeks)

documentation

README

NSRT

A Rust driver for the NSRT_mk4 sound level meter from Convergence Instruments.

Features

  • Read sound pressure levels (SPL) in dB
  • Read LEQ (Equivalent Continuous Sound Level)
  • Configure weighting curves (A, C, Z)
  • Set sampling frequency and time constants
  • Read device information and temperature
  • Fluent API for device configuration

Usage

use nsrt::{NSRT, Weighting, SamplingFrequency};

fn main() -> nsrt::Result<()> {
    // Connect to the device and configure it in a single chain
    let mut nsrt = NSRT::open()?
        .weighting(Weighting::A)?
        .time_constant(1.0)?
        .sampling_frequency(SamplingFrequency::Freq48kHz)?
        .apply()?;

    // Read measurements
    let level = nsrt.read_level()?;
    println!("Current sound level: {:.1} dBA", level);

    Ok(())
}

See examples/simple_monitor.rs for a more complete example.

Commit count: 4

cargo fmt