RT contract: prepare() and prepare_masked_scratch() allocate storage and must run off the audio thread.
More...
#include <noise_morpher.hpp>
|
| void | prepare (int num_bins, std::uint64_t seed=0x9e3779b97f4a7c15ull) |
| int | num_bins () const |
| void | reset () |
| void | push_envelope (const SampleType *noise_mag) |
| | Set the noise magnitude envelope for the current analysis frame.
|
| void | advance () |
| | Commit the current "to" envelope as the next "from" endpoint.
|
| void | set_synthesis_gain (SampleType g) |
| | Emit one synthesis frame at interpolation position frac in [0,1] between the previous and current envelopes (frac=0 → previous, frac=1 → current).
|
| void | synthesize (SampleType frac, std::complex< SampleType > *out) |
| void | push_masked_envelope (const SampleType *full_mag, const SampleType *noise_mask) |
| | Convenience: pull the noise component out of a full magnitude frame using an STN noise mask, then push it as the envelope.
|
| void | prepare_masked_scratch () |
template<typename SampleType = float>
class pulp::signal::NoiseMorpherT< SampleType >
RT contract: prepare() and prepare_masked_scratch() allocate storage and must run off the audio thread.
After preparation, reset(), push_envelope(), advance(), synthesize(), and push_masked_envelope() allocate no memory for the prepared bin count.
◆ advance()
template<typename SampleType = float>
Commit the current "to" envelope as the next "from" endpoint.
Call once per analysis frame after emitting that frame's synthesis output (so interpolation walks from frame to frame).
◆ checked_retained_bytes()
template<typename SampleType = float>
| bool pulp::signal::NoiseMorpherT< SampleType >::checked_retained_bytes |
( |
int | num_bins, |
|
|
std::uint64_t | target_max_bytes, |
|
|
std::uint64_t & | bytes ) |
|
inlinestaticnoexcept |
◆ num_bins()
template<typename SampleType = float>
◆ prepare()
template<typename SampleType = float>
◆ prepare_masked_scratch()
template<typename SampleType = float>
◆ push_envelope()
template<typename SampleType = float>
Set the noise magnitude envelope for the current analysis frame.
Successive calls advance the interpolation window: the previous envelope becomes the "from" endpoint and this one the "to".
◆ push_masked_envelope()
template<typename SampleType = float>
Convenience: pull the noise component out of a full magnitude frame using an STN noise mask, then push it as the envelope.
◆ reset()
template<typename SampleType = float>
◆ set_synthesis_gain()
template<typename SampleType = float>
Emit one synthesis frame at interpolation position frac in [0,1] between the previous and current envelopes (frac=0 → previous, frac=1 → current).
out holds num_bins complex bins (DC..Nyquist) with magnitude = interpolated envelope and fresh random phase. Compensate the random-phase WOLA energy loss. Random-phase synthesis frames overlap-add INCOHERENTLY (powers add) while the engine's WOLA normalizes for COHERENT summation (amplitudes add), so the rendered noise comes out several dB too quiet — and more so at denser overlap (time compression). Callers that know the synthesis hop set this so the morphed noise hits the target envelope level. Default 1 = uncompensated.
◆ synthesize()
template<typename SampleType = float>
The documentation for this class was generated from the following file: