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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.