|
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 noexcept SFFDN_NONBLOCKING |
| Gets the maximum delay-line length. | |
| void | SetDelay (uint32_t delay) noexcept SFFDN_NONBLOCKING |
| Sets the delay for the delay line. | |
| uint32_t | GetDelay () const noexcept SFFDN_NONBLOCKING |
| Returns the current delay in samples. | |
| float | LastOut () const noexcept SFFDN_NONBLOCKING |
| Returns the last output sample from the delay line. | |
| float | NextOut () const noexcept SFFDN_NONBLOCKING |
| Returns the next output sample. | |
| float | Tick (float input) noexcept SFFDN_NONBLOCKING |
| Processes the next input sample. | |
| float | TapOut (uint32_t tap) const noexcept SFFDN_NONBLOCKING |
| Taps the output of the delay line at a specific point. | |
| void | Process (AudioBuffer input, AudioBuffer &output) noexcept SFFDN_NONBLOCKING |
| Processes a block of input samples. | |
| bool | AddNextInputs (std::span< const float > input) noexcept SFFDN_NONBLOCKING |
| Adds the next input samples to the delay line. | |
| bool | CanAddNextInputs (size_t sample_count) const noexcept SFFDN_NONBLOCKING |
| Returns whether the complete input block can be added without overwriting unread samples. | |
| void | GetNextOutputs (std::span< float > output) noexcept SFFDN_NONBLOCKING |
| Gets the next output samples from the delay line. | |
| void | GetNextOutputsAt (std::span< uint32_t > taps, std::span< float > output, std::span< float > coeffs) noexcept SFFDN_NONBLOCKING |
| Gets the next output samples from the delay line at specific tap points. | |
| std::span< float > | GetNextOutputBuffers (uint32_t size) noexcept SFFDN_NONBLOCKING |
| Get a span pointing to the next writable region of the buffer. | |
| std::span< float > | GetNextInputBuffers (uint32_t size) noexcept SFFDN_NONBLOCKING |
| 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) noexcept SFFDN_NONBLOCKING |
| Gets the next read and write buffers for the delay line. | |
| void | AdvanceWrite (uint32_t sample_count) noexcept SFFDN_NONBLOCKING |
| Advances the write pointer of the delay line by a specified number of samples. | |
| void | AdvanceRead (uint32_t sample_count) noexcept SFFDN_NONBLOCKING |
| 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. |
|
noexcept |
Adds the next input samples to the delay line.
| input | The input samples to add. |
|
noexcept |
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. |
|
noexcept |
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.
|
noexcept |
Gets the maximum delay-line length.
|
noexcept |
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.
|
noexcept |
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.
|
noexcept |
Gets the next output samples from the delay line.
| output | The output samples to fill. |
output.size() samples are currently buffered, the output and internal state remain unchanged.
|
noexcept |
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. |
|
noexcept |
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. |
|
noexcept |
Returns the last output sample from the delay line.
|
noexcept |
Returns the next output sample.
|
noexcept |
Processes a block of input samples.
| input | The input audio buffer. |
| output | The output audio buffer. |
|
noexcept |
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. |
|
noexcept |
Taps the output of the delay line at a specific point.
| tap | The tap point in samples. |
|
noexcept |
Processes the next input sample.
| input | The input sample to process. |