5#include "sffdn/audio_processor.h"
6#include "sffdn/oscillator.h"
7#include "sffdn/types.h"
19class TimeVaryingFeedbackMatrixTestAccess;
65 void SetModulation(std::span<const ModulationOptions> modulation_configs);
126 bool GetMatrix(std::span<
float> matrix, uint64_t sample_index = 0) const;
137 friend class detail::TimeVaryingFeedbackMatrixTestAccess;
140 std::span<const
float> custom_base_matrix);
144 std::vector<
float> base_angles_;
146 std::vector<
float> lfo_phases_;
147 std::vector<
float> schur_basis_;
148 std::vector<uint32_t> rotation_starts_;
149 std::vector<
float> scalar_signs_;
150 std::vector<
float> scratch_;
A class representing an audio buffer with multiple channels of non-interleaved audio data.
Definition audio_buffer.h:20
Base class for audio processors.
Definition audio_processor.h:24
A sine wave oscillator.
Definition oscillator.h:33
An orthogonal time-varying feedback matrix for an FDN.
Definition time_varying_feedback_matrix.h:51
void Clear() override
Resets the phase of all LFOs to their configured phase offsets.
TimeVaryingFeedbackMatrix(const TimeVaryingFeedbackMatrixOptions &options)
Constructs a time-varying feedback matrix.
void SetBaseAngles(std::span< const float > radians)
Sets the base rotation angle for each rotation block.
void Process(const AudioBuffer &input, AudioBuffer &output) noexcept SFFDN_NONBLOCKING override
Processes the audio buffer.
void SetLfoPhaseOffset(std::span< const float > phase_offsets)
Sets the LFO phase offset for each rotation block.
void SetLfoFrequency(std::span< const float > frequencies)
Sets the LFO frequency for each rotation block.
bool GetMatrix(std::span< float > matrix, uint64_t sample_index=0) const
Materializes the feedback matrix that Process applies at a given sample index.
void SetModulation(std::span< const ModulationOptions > modulation_configs)
Sets the modulation options for each rotation block.
uint32_t RotationBlockCount() const noexcept SFFDN_NONBLOCKING
Gets the number of 2x2 rotation blocks.
std::unique_ptr< AudioProcessor > Clone() const override
Creates a copy of the time-varying feedback matrix.
void SetLfoAmplitude(std::span< const float > amplitudes)
Sets the LFO amplitude for each rotation block.
uint32_t InputChannelCount() const noexcept SFFDN_NONBLOCKING override
Gets the number of input channels.
uint32_t OutputChannelCount() const noexcept SFFDN_NONBLOCKING override
Gets the number of output channels.
TimeVaryingMatrixMode
Construction modes for a TimeVaryingFeedbackMatrix.
Definition types.h:127
Options for configuring a TimeVaryingFeedbackMatrix.
Definition types.h:197