[][src]Struct gaborator::Gaborator

pub struct Gaborator(_);

Main type of the crate. Represents C++'s gaborator::analyzer<float>.

Implementations

impl Gaborator[src]

pub fn new(params: &GaboratorParams) -> Self[src]

Create new instance of Gaborator analyzer/synthesizer based on supplied parameters

pub fn analysis_support_len(&self) -> usize[src]

Returns the one-sided worst-case time domain support of any of the analysis filters. When calling analyze() with a sample at time t, only spectrogram coefficients within the time range t ± support will be significantly changed. Coefficients outside the range may change, but the changes will sufficiently small that they may be ignored without significantly reducing accuracy.

pub fn synthesis_support_len(&self) -> usize[src]

Returns the one-sided worst-case time domain support of any of the reconstruction filters. When calling synthesize() to synthesize a sample at time t, the sample will only be significantly affected by spectrogram coefficients in the time range t ± support. Coefficients outside the range may be used in the synthesis, but substituting zeroes for the actual coefficient values will not significantly reduce accuracy.

pub fn bandpass_bands_begin(&self) -> i32[src]

Return the smallest valid bandpass band number, corresponding to the highest-frequency bandpass filter.

The frequency bands of the analysis filter bank are numbered by nonnegative integers that increase towards lower (sic) frequencies. There is a number of bandpass bands corresponding to the logarithmically spaced bandpass analysis filters, from near 0.5 (half the sample rate) to near fmin, and a single lowpass band containing the residual signal from frequencies below fmin.

pub fn bandpass_bands_end(&self) -> i32[src]

Return the bandpass band number one past the highest valid bandpass band number, corresponding to one past the lowest-frequency bandpass filter.

pub fn band_lowpass(&self) -> i32[src]

Return the band number of the lowpass band.

pub fn band_ref(&self) -> i32[src]

Return the band number corresponding to the reference frequency ff_ref. If ff_ref falls within the frequency range of the bandpass filter bank, this will be a valid bandpass band number, otherwise it will not.

pub fn band_ff(&self, band: i32) -> f64[src]

Return the center frequency of band number band, in units of the sampling frequency.

pub fn analyze(
    &self,
    signal: &[f32],
    signal_begin_sample_number: i64,
    coefs: &mut Coefs
)
[src]

Spectrum analyze the samples at signal and add the resulting coefficients to coefs. t1 parameter from Gaborator's analyze method is caluclated based on supplied slice size.

If the coefs object already contains some coefficients, the new coefficients are summed to those already present.

pub fn synthesize(
    &self,
    coefs: &Coefs,
    signal_begin_sample_number: i64,
    signal: &mut [f32]
)
[src]

Synthesize signal samples from the coefficients coef and store them at signal. t1 parameter from Gaborator's synthesize method is caluclated based on supplied slice size.

The time range may extend outside the range analyzed using analyze(), in which case the signal is assumed to be zero in the un-analyzed range.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.