pub struct DenoiseSignal<'model, S: Signal> { /* private fields */ }
Expand description

Applies denoising to a Signal (from the dasp crate).

Instantiate one of these with a Signal as input, and you’ll get a Signal that yields denoised audio. Note that the denoised Signal will be in floating-point, even if the original signal wasn’t.

Example

use nnnoiseless::dasp::signal::{self, Signal};
use nnnoiseless::dasp::sample::Sample;
use nnnoiseless::DenoiseSignal;

let noise = signal::noise(0);
let mut denoised = DenoiseSignal::new(noise);
for n in denoised.take(10_000) {
// ... do something with your denoised noise.
}

Implementations§

Creates a new DenoiseSignal using the built-in default noise model.

Creates a new DenoiseSignal using a custom noise model.

The main difference between this method and DenoiseSignal::from_model is that here DenoiseSignal will borrow the model and reuse it for the different channels in the signal.

Creates a new DenoiseSignal owning a custom noise model.

The main difference between this method and DenoiseSignal::with_model is that here DenoiseSignal will take ownership of the model and make a clone for each channel in the signal. If the model is cheap to clone (for example, because it was created with RnnModel::from_static_bytes then this is fine.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
The Frame type returned by the Signal.
Whether or not the signal is exhausted of meaningful frames. Read more
Yield the next Frame in the Signal. Read more
A signal that maps one set of frames to another. Read more
A signal that maps one set of frames to another. Read more
Provides an iterator that yields the sum of the frames yielded by both other and self in lock-step. Read more
Provides an iterator that yields the product of the frames yielded by both other and self in lock-step. Read more
Provides an iterator that offsets the amplitude of every channel in each frame of the signal by some sample value and yields the resulting frames. Read more
Produces an Iterator that scales the amplitude of the sample of each channel in every Frame yielded by self by the given amplitude. Read more
Produces a new Signal that offsets the amplitude of every Frame in self by the respective amplitudes in each channel of the given amp_frame. Read more
Produces a new Signal that scales the amplitude of every Frame in self by the respective amplitudes in each channel of the given amp_frame. Read more
Multiplies the rate at which frames of self are yielded by the given signal. Read more
Converts the rate at which frames of the Signal are yielded using interpolation. Read more
Multiplies the rate at which frames of the Signal are yielded by the given value. Read more
Delays the Signal by the given number of frames. Read more
Converts a Signal into a type that yields the interleaved Samples. Read more
Clips the amplitude of each channel in each Frame yielded by self to the given threshold amplitude. Read more
Create a new Signal that calls the enclosing function on each iteration. Read more
Forks Self into two signals that produce the same frames. Read more
Converts the Signal into an Iterator that will yield the given number for Frames before returning None. Read more
Converts the Signal into an Iterator yielding frames until the signal.is_exhausted() returns true. Read more
Buffers the signal using the given ring buffer. Read more
Borrows a Signal rather than consuming it. 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.