autopitch

Crates.ioautopitch
lib.rsautopitch
version0.1.0
created_at2025-12-11 16:38:56.125545+00
updated_at2025-12-11 16:38:56.125545+00
descriptionA modular pitch detection library
homepage
repositoryhttps://github.com/paramako/autopitch
max_upload_size
id1980069
size15,819
Yurii (paramako)

documentation

README

autopitch

Crates.io Docs.rs License: MIT Changelog

A modular pitch detection library for Rust.

Lightweight, fast, and suitable for real-time audio analysis.

Features

  • Zero dependencies
  • Designed for real-time use (no heap allocations during detection)
  • Simple PitchDetector trait for pluggable algorithms

Algorithms

Algorithm Status Description
Autocorrelation Available Time-domain autocorrelation with first-peak detection and parabolic interpolation
More algorithms Coming soon

Usage

use autopitch::algorithm::Autocorrelation;
use autopitch::detect::PitchDetector;

let mut detector = Autocorrelation::default();
let samples: Vec<f32> = /* your audio samples */;
let sample_rate = 44100.0;

if let Some(pitch) = detector.detect(&samples, sample_rate) {
    println!("Detected pitch: {:.2} Hz", pitch);
}

License

MIT

Commit count: 0

cargo fmt