[][src]Struct aubio_rs::Pitch

pub struct Pitch { /* fields omitted */ }

Pitch detection object

Methods

impl Pitch[src]

pub fn new(
    method: PitchMode,
    buf_size: usize,
    hop_size: usize,
    sample_rate: u32
) -> Result<Self>
[src]

Creation of the pitch detection object

  • method Pitch detection algorithm
  • buf_size Size of the input buffer to analyse
  • hop_size Step size between two consecutive analysis instant
  • sample_rate Sampling rate of the signal

pub fn with_tolerance(self, tolerance: f32) -> Self[src]

Change yin or yinfft tolerance threshold

pub fn with_silence(self, silence: f32) -> Self[src]

Set the silence threshold of the pitch detection object

pub fn with_unit(self, unit: PitchUnit) -> Self[src]

Set the output unit of the pitch detection object

pub fn get_hop(&self) -> usize[src]

Get hop size

pub fn do_<'i, 'o, I, O>(&mut self, input: I, output: O) -> Status where
    I: Into<FVec<'i>>,
    O: Into<FVecMut<'o>>, 
[src]

Execute pitch detection on an input signal frame

  • input Input signal of size hop_size
  • output Output pitch candidates of size 1

pub fn do_result<'i, I>(&mut self, input: I) -> Result<f32> where
    I: Into<FVec<'i>>, 
[src]

Execute pitch detection on an input signal frame

  • input Input signal of size hop_size

pub fn set_tolerance(&mut self, tolerance: f32)[src]

Change yin or yinfft tolerance threshold

pub fn get_tolerance(&self) -> f32[src]

Get yin or yinfft tolerance threshold

pub fn set_silence(&mut self, silence: f32)[src]

Set the silence threshold of the pitch detection object

pub fn get_silence(&self) -> f32[src]

Get the silence threshold of the pitch detection object

pub fn set_unit(&mut self, unit: PitchUnit)[src]

Set the output unit of the pitch detection object

pub fn get_confidence(&self) -> f32[src]

Get the current confidence of the pitch algorithm

Trait Implementations

impl Drop for Pitch[src]

Auto Trait Implementations

impl RefUnwindSafe for Pitch

impl !Send for Pitch

impl !Sync for Pitch

impl Unpin for Pitch

impl UnwindSafe for Pitch

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.