|
sfFDN
|
A time-varying parallel gains processor. More...
#include <parallel_gains.h>
Public Member Functions | |
| TimeVaryingParallelGains (const ParallelGainsOptions &options) | |
| Constructs a TimeVaryingParallelGains processor. | |
| void | SetMode (ParallelGainsMode mode) |
| Sets the processing mode. | |
| void | SetCenterGains (std::span< const float > gains) |
| Sets the center gains for each channel. | |
| void | GetCenterGains (std::span< float > gains) const |
| Gets the center gains for each channel. | |
| void | SetModulation (std::span< const ModulationOptions > modulation_configs) |
| Sets the modulation options for each channel. | |
| void | SetLfoFrequency (std::span< const float > frequencies) |
| Sets the LFO frequency for each channel. | |
| void | SetLfoAmplitude (std::span< const float > amplitudes) |
| Sets the LFO amplitude for each channel. | |
| void | SetLfoPhaseOffset (std::span< const float > phase_offsets) |
| Sets the LFO phase offset for each channel. | |
| void | Process (const AudioBuffer &input, AudioBuffer &output) noexcept override |
| Processes the audio buffer. | |
| uint32_t | InputChannelCount () const override |
| Gets the number of input channels. | |
| uint32_t | OutputChannelCount () const override |
| Gets the number of output channels. | |
| void | Clear () override |
| Clears the internal state of the processor. | |
| std::unique_ptr< AudioProcessor > | Clone () const override |
| Creates a copy of the TimeVaryingParallelGains processor. | |
Public Member Functions inherited from sfFDN::AudioProcessor | |
A time-varying parallel gains processor.
Similar to ParallelGains but with time-varying gains modulated by LFOs.
| sfFDN::TimeVaryingParallelGains::TimeVaryingParallelGains | ( | const ParallelGainsOptions & | options | ) |
Constructs a TimeVaryingParallelGains processor.
| options | The options for the processor. |
|
overridevirtual |
Clears the internal state of the processor.
This function resets the phase of all LFOs to zero.
Implements sfFDN::AudioProcessor.
|
overridevirtual |
Creates a copy of the TimeVaryingParallelGains processor.
Implements sfFDN::AudioProcessor.
| void sfFDN::TimeVaryingParallelGains::GetCenterGains | ( | std::span< float > | gains | ) | const |
Gets the center gains for each channel.
| gains | A span to store the gains. The size of the span must be equal to the number of gains set in SetGains(). |
|
overridevirtual |
Gets the number of input channels.
Implements sfFDN::AudioProcessor.
|
overridevirtual |
Gets the number of output channels.
Implements sfFDN::AudioProcessor.
|
overridevirtualnoexcept |
Processes the audio buffer.
| input | The input audio buffer. |
| output | The output audio buffer. The input and output buffers must have the same number of samples. For ParallelGainsMode::Split, the input buffer must have 1 channels and the output buffer must have OutputChannelCount() channels. For ParallelGainsMode::Merge, the input buffer must have InputChannelCount() channels and the output buffer must have 1 channels. For ParallelGainsMode::Parallel, the input and output buffers must have the same number of channels equal to InputChannelCount() and OutputChannelCount(). |
Implements sfFDN::AudioProcessor.
| void sfFDN::TimeVaryingParallelGains::SetCenterGains | ( | std::span< const float > | gains | ) |
Sets the center gains for each channel.
| gains | A span of center gains to apply to each channel. The size of the span must be equal to InputChannelCount() for ParallelGainsMode::Merge. The size of the span must be equal to OutputChannelCount() for ParallelGainsMode::Split. The size of the span must be equal to InputChannelCount() and OutputChannelCount() for ParallelGainsMode::Parallel. |
| void sfFDN::TimeVaryingParallelGains::SetLfoAmplitude | ( | std::span< const float > | amplitudes | ) |
Sets the LFO amplitude for each channel.
| amplitudes | A span of LFO amplitudes to apply to each channel. The size of the span must be equal to InputChannelCount() for ParallelGainsMode::Merge. The size of the span must be equal to OutputChannelCount() for ParallelGainsMode::Split. The size of the span must be equal to InputChannelCount() and OutputChannelCount() for ParallelGainsMode::Parallel. |
The amplitude is the peak deviation from the center gain.
| void sfFDN::TimeVaryingParallelGains::SetLfoFrequency | ( | std::span< const float > | frequencies | ) |
Sets the LFO frequency for each channel.
| frequencies | A span of LFO frequencies to apply to each channel. Frequencies are in cycles per sample. The size of the span must be equal to InputChannelCount() for ParallelGainsMode::Merge. The size of the span must be equal to OutputChannelCount() for ParallelGainsMode::Split. The size of the span must be equal to InputChannelCount() and OutputChannelCount() for ParallelGainsMode::Parallel. |
| void sfFDN::TimeVaryingParallelGains::SetLfoPhaseOffset | ( | std::span< const float > | phase_offsets | ) |
Sets the LFO phase offset for each channel.
| phase_offsets | A span of LFO phase offsets to apply to each channel. Phase offsets are normalized [0, 1]. The size of the span must be equal to InputChannelCount() for ParallelGainsMode::Merge. The size of the span must be equal to OutputChannelCount() for ParallelGainsMode::Split. The size of the span must be equal to InputChannelCount() and OutputChannelCount() for ParallelGainsMode::Parallel. |
| void sfFDN::TimeVaryingParallelGains::SetMode | ( | ParallelGainsMode | mode | ) |
Sets the processing mode.
| mode | The processing mode to use. |
| void sfFDN::TimeVaryingParallelGains::SetModulation | ( | std::span< const ModulationOptions > | modulation_configs | ) |
Sets the modulation options for each channel.
| modulation_configs | A span of modulation options to apply to each channel. |