pub struct PitchDetector;Expand description
Monophonic pitch detection.
Implementations§
Source§impl PitchDetector
impl PitchDetector
Sourcepub fn yin(
signal: &[f32],
sample_rate: f32,
min_hz: f32,
max_hz: f32,
) -> Option<f32>
pub fn yin( signal: &[f32], sample_rate: f32, min_hz: f32, max_hz: f32, ) -> Option<f32>
YIN algorithm pitch detection.
Sourcepub fn autocorr(signal: &[f32], sample_rate: f32) -> Option<f32>
pub fn autocorr(signal: &[f32], sample_rate: f32) -> Option<f32>
Autocorrelation-based pitch detection.
Sourcepub fn harmonic_product_spectrum(spectrum: &[f32], sample_rate: f32) -> f32
pub fn harmonic_product_spectrum(spectrum: &[f32], sample_rate: f32) -> f32
Harmonic Product Spectrum pitch detection.
Sourcepub fn note_name(midi: f32) -> String
pub fn note_name(midi: f32) -> String
Convert MIDI note to a human-readable name like “A4” or “C#3”.
Auto Trait Implementations§
impl Freeze for PitchDetector
impl RefUnwindSafe for PitchDetector
impl Send for PitchDetector
impl Sync for PitchDetector
impl Unpin for PitchDetector
impl UnsafeUnpin for PitchDetector
impl UnwindSafe for PitchDetector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more