pub struct StftConfig<T: Float> {
pub fft_size: usize,
pub hop_size: usize,
pub window: WindowType,
pub reconstruction_mode: ReconstructionMode,
/* private fields */
}Fields§
§fft_size: usize§hop_size: usize§window: WindowType§reconstruction_mode: ReconstructionModeImplementations§
Source§impl<T: Float + FromPrimitive + Debug> StftConfig<T>
impl<T: Float + FromPrimitive + Debug> StftConfig<T>
pub fn new( fft_size: usize, hop_size: usize, window: WindowType, reconstruction_mode: ReconstructionMode, ) -> Result<Self, ConfigError<T>>
👎Deprecated since 0.4.0: Use
StftConfig::builder() instead for a more flexible APISourcepub fn builder() -> StftConfigBuilder<T>
pub fn builder() -> StftConfigBuilder<T>
Create a new builder for StftConfig
Sourcepub fn default_4096() -> Self
pub fn default_4096() -> Self
Default: 4096 FFT, 1024 hop, Hann window, OLA mode
pub fn freq_bins(&self) -> usize
pub fn overlap_percent(&self) -> T
Sourcepub fn validate_nola(&self) -> Result<(), ConfigError<T>>
pub fn validate_nola(&self) -> Result<(), ConfigError<T>>
Validate NOLA condition: sum(w^2) > threshold everywhere
Sourcepub fn validate_cola(&self) -> Result<(), ConfigError<T>>
pub fn validate_cola(&self) -> Result<(), ConfigError<T>>
Validate weak COLA condition: sum(w) is constant (within relative tolerance)
Trait Implementations§
Source§impl<T: Clone + Float> Clone for StftConfig<T>
impl<T: Clone + Float> Clone for StftConfig<T>
Source§fn clone(&self) -> StftConfig<T>
fn clone(&self) -> StftConfig<T>
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 moreimpl<T: Float> StructuralPartialEq for StftConfig<T>
Auto Trait Implementations§
impl<T> Freeze for StftConfig<T>
impl<T> RefUnwindSafe for StftConfig<T>where
T: RefUnwindSafe,
impl<T> Send for StftConfig<T>where
T: Send,
impl<T> Sync for StftConfig<T>where
T: Sync,
impl<T> Unpin for StftConfig<T>where
T: Unpin,
impl<T> UnwindSafe for StftConfig<T>where
T: UnwindSafe,
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