Struct IterativeTransientDetectionParams

Source
pub struct IterativeTransientDetectionParams {
    pub fft_size: usize,
    pub fft_overlap_ratio: f32,
    pub power_of_change_spectral_spread: usize,
    pub threshold_time_spread: usize,
    pub threshold_time_spread_factor: f32,
    pub frequency_bin_change_threshold: usize,
    pub iteration_magnitude_factor: f32,
    pub iteration_count: usize,
}

Fields§

§fft_size: usize

Size of the FFT windows, defaults to 2048; at 44.1kHz each frame should be ~40ms

§fft_overlap_ratio: f32

If 0.75 is provided, 3/4 of the windows will overlap. Defaults to 3/4

§power_of_change_spectral_spread: usize

v in the paper (equation 5)

Defaults to 3 frequency bins or roughly 60Hz at 44.1kHz sample rate

§threshold_time_spread: usize

τ in the paper (equation 7)

  • When calculating dynamic thresholds, controls how many neighbouring time frames are considered
  • For example, if threshold_time_spread_factor is 2.0, a frequency bin and its spectral_spread neighbours will have to be 2.0 the average of the time_spread time frames’ rate of change for this bin

Defaults to 3

§threshold_time_spread_factor: f32

β - threshold_time_spread_factor (equation 7)

  • Internal multiplier of dynamic thresholds
  • This nº affects by what factor a frequency bin needs to change in relation to what it has changed in neighboring frames to be considered a transient
  • Higher nºs means sensitivity is decreased

Defaults to 2.0

§frequency_bin_change_threshold: usize

How many bins should change for a frame to be considered a transient

Defaults to 1/4 of the fft_size

§iteration_magnitude_factor: f32

δ - iteration_magnitude_factor (equation 10)

  • What factor of the magnitude is collected onto the output per iteration

Defaults to 0.1

§iteration_count: usize

N - iteration_count (algorithm 1)

Defaults to 20

Trait Implementations§

Source§

impl Clone for IterativeTransientDetectionParams

Source§

fn clone(&self) -> IterativeTransientDetectionParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IterativeTransientDetectionParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IterativeTransientDetectionParams

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.