|
sfFDN
|
A simple non-interpolating delay line implementation. More...
#include <delay.h>
Public Member Functions | |
| Delay (uint32_t delay=0, uint32_t max_delay=4095) | |
| Constructs a delay line with a specified delay and maximum delay. | |
| void | Clear () |
| Clears the delay line, resetting the internal buffer. | |
| void | SetMaximumDelay (uint32_t delay) |
| Sets the maximum delay for the delay line. | |
| uint32_t | GetMaximumDelay () const |
| Gets the maximum delay-line length. | |
| void | SetDelay (uint32_t delay) |
| Sets the delay for the delay line. | |
| uint32_t | GetDelay (void) const |
| Returns the current delay in samples. | |
| float | LastOut () const |
| Returns the last output sample from the delay line. | |
| float | NextOut () const |
| Returns the next output sample. | |
| float | Tick (float input) |
| Processes the next input sample. | |
| float | TapOut (uint32_t tap) const |
| Taps the output of the delay line at a specific point. | |
| void | Process (const AudioBuffer input, AudioBuffer &output) |
| Processes a block of input samples. | |
| bool | AddNextInputs (std::span< const float > input) |
| Adds the next input samples to the delay line. | |
| void | GetNextOutputs (std::span< float > output) |
| Gets the next output samples from the delay line. | |
| void | GetNextOutputsAt (std::span< uint32_t > taps, std::span< float > output, std::span< float > coeffs) |
| Gets the next output samples from the delay line at specific tap points. | |
| std::span< float > | GetNextOutputBuffers (uint32_t size) |
| Get a span pointing to the next writable region of the buffer. | |
| std::span< float > | GetNextInputBuffers (uint32_t size) |
| Get a span pointing to the next writable region of the buffer. | |
| void | GetNextReadAndWriteBuffers (std::span< float > &read_buffer, std::span< float > &write_buffer, uint32_t size) |
| Gets the next read and write buffers for the delay line. | |
| void | AdvanceWrite (uint32_t sample_count) |
| Advances the write pointer of the delay line by a specified number of samples. | |
| void | AdvanceRead (uint32_t sample_count) |
| Advances the read pointer of the delay line by a specified number of samples. | |
A simple non-interpolating delay line implementation.
| sfFDN::Delay::Delay | ( | uint32_t | delay = 0, |
| uint32_t | max_delay = 4095 ) |
Constructs a delay line with a specified delay and maximum delay.
| delay | The initial delay in samples. |
| max_delay | The maximum delay in samples, ie. the size of the internal buffer. |
| bool sfFDN::Delay::AddNextInputs | ( | std::span< const float > | input | ) |
Adds the next input samples to the delay line.
| input | The input samples to add. |
| void sfFDN::Delay::AdvanceRead | ( | uint32_t | sample_count | ) |
Advances the read pointer of the delay line by a specified number of samples.
| sample_count | The number of samples to advance the read pointer. |
| void sfFDN::Delay::AdvanceWrite | ( | uint32_t | sample_count | ) |
Advances the write pointer of the delay line by a specified number of samples.
| sample_count | The number of samples to advance the write pointer. |
| void sfFDN::Delay::Clear | ( | ) |
Clears the delay line, resetting the internal buffer.
The delay value remains unchanged.
| uint32_t sfFDN::Delay::GetMaximumDelay | ( | ) | const |
Gets the maximum delay-line length.
| std::span< float > sfFDN::Delay::GetNextInputBuffers | ( | uint32_t | size | ) |
Get a span pointing to the next writable region of the buffer.
| size | The desired size of the buffer. |
Need to call AdvanceWrite after writing to the buffer to update the internal state of the delay line.
| std::span< float > sfFDN::Delay::GetNextOutputBuffers | ( | uint32_t | size | ) |
Get a span pointing to the next writable region of the buffer.
| size | The desired size of the buffer. |
Need to call AdvanceRead after reading from the buffer to update the internal state of the delay line.
| void sfFDN::Delay::GetNextOutputs | ( | std::span< float > | output | ) |
Gets the next output samples from the delay line.
| output | The output samples to fill. |
| void sfFDN::Delay::GetNextOutputsAt | ( | std::span< uint32_t > | taps, |
| std::span< float > | output, | ||
| std::span< float > | coeffs ) |
Gets the next output samples from the delay line at specific tap points.
| taps | The tap points in samples. |
| output | The output samples to fill. |
| coeffs | The coefficients to apply to each tap point when filling the output buffer. Must have the same size as taps. |
| void sfFDN::Delay::GetNextReadAndWriteBuffers | ( | std::span< float > & | read_buffer, |
| std::span< float > & | write_buffer, | ||
| uint32_t | size ) |
Gets the next read and write buffers for the delay line.
| read_buffer | The span to fill with the next readable region of the buffer. |
| write_buffer | The span to fill with the next writable region of the buffer. |
| size | The desired size of the buffers. |
| float sfFDN::Delay::LastOut | ( | ) | const |
Returns the last output sample from the delay line.
| float sfFDN::Delay::NextOut | ( | ) | const |
Returns the next output sample.
| void sfFDN::Delay::Process | ( | const AudioBuffer | input, |
| AudioBuffer & | output ) |
Processes a block of input samples.
| input | The input audio buffer. |
| output | The output audio buffer. |
| void sfFDN::Delay::SetDelay | ( | uint32_t | delay | ) |
Sets the delay for the delay line.
| delay | The delay in samples. |
| void sfFDN::Delay::SetMaximumDelay | ( | uint32_t | delay | ) |
Sets the maximum delay for the delay line.
| delay | The maximum delay in samples. |
| float sfFDN::Delay::TapOut | ( | uint32_t | tap | ) | const |
Taps the output of the delay line at a specific point.
| tap | The tap point in samples. |
| float sfFDN::Delay::Tick | ( | float | input | ) |
Processes the next input sample.
| input | The input sample to process. |