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 itsspectral_spread
neighbours will have to be 2.0 the average of thetime_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
impl Clone for IterativeTransientDetectionParams
Source§fn clone(&self) -> IterativeTransientDetectionParams
fn clone(&self) -> IterativeTransientDetectionParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for IterativeTransientDetectionParams
impl RefUnwindSafe for IterativeTransientDetectionParams
impl Send for IterativeTransientDetectionParams
impl Sync for IterativeTransientDetectionParams
impl Unpin for IterativeTransientDetectionParams
impl UnwindSafe for IterativeTransientDetectionParams
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