Struct audio_processor_analysis::transient_detection::stft::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: usizeSize of the FFT windows, defaults to 2048; at 44.1kHz each frame should be ~40ms
fft_overlap_ratio: f32If 0.75 is provided, 3/4 of the windows will overlap. Defaults to 3/4
power_of_change_spectral_spread: usizev 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_factoris 2.0, a frequency bin and itsspectral_spreadneighbours will have to be 2.0 the average of thetime_spreadtime 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: usizeHow 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: usizeN - iteration_count (algorithm 1)
Defaults to 20
Trait Implementations
sourceimpl Clone for IterativeTransientDetectionParams
impl Clone for IterativeTransientDetectionParams
sourcefn clone(&self) -> IterativeTransientDetectionParams
fn clone(&self) -> IterativeTransientDetectionParams
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations
impl RefUnwindSafe for IterativeTransientDetectionParams
impl Send for IterativeTransientDetectionParams
impl Sync for IterativeTransientDetectionParams
impl Unpin for IterativeTransientDetectionParams
impl UnwindSafe for IterativeTransientDetectionParams
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more