|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
A dry/wet mix of two signals, the mix a port. More...
A dry/wet mix of two signals, the mix a port.
out = dry + mix (wet - dry): the dry signal at 0, the wet at 1, a linear blend between. With a filter's or an effect's output as the wet signal it is the stage's depth. On the transport the wet signal is the input, and the dry signal and the mix are ports:
At a mix of exactly 0 the output is the dry signal, bit for bit, and at 1 the wet. Memoryless apart from the mix's ramp. In place is fine: out may be the wet buffer or the dry one.
Definition at line 39 of file dry_wet.hpp.
#include <dry_wet.hpp>
Public Member Functions | |
| DryWet () | |
| A mix of 1, the wet signal, until a mix is given; a scalar mix ramps over RAMP_FRAMES. | |
| template<class... Ports> | |
| void | process (const float *wet, float *out, uint16_t frames, Ports... ports) |
| The mix over a buffer: the wet signal is the input, dry and mix are ports. | |
| void | reset () |
| The mix at its target. | |
Static Public Member Functions | |
| static float | mix (float dry, float wet, float mix) |
| One frame: dry at a mix of 0, wet at 1. The mix is used as given. | |
Static Public Attributes | |
| static constexpr uint16_t | RAMP_FRAMES = 64 |
| static constexpr transport::Port | PORTS [] |
| The ports of the buffer form, in the order it takes them. | |
|
inline |
A mix of 1, the wet signal, until a mix is given; a scalar mix ramps over RAMP_FRAMES.
Definition at line 44 of file dry_wet.hpp.
References RAMP_FRAMES, and sbl::dsp::Ramp::set_length().
|
inlinestatic |
One frame: dry at a mix of 0, wet at 1. The mix is used as given.
| dry | The dry sample |
| wet | The wet sample |
| mix | The mix; exactly 0 returns dry and exactly 1 returns wet, bit for bit |
Definition at line 54 of file dry_wet.hpp.
References mix().
|
inline |
The mix over a buffer: the wet signal is the input, dry and mix are ports.
In place is fine: out may be the wet buffer or the dry one.
| Ports | The dry block, then optionally the mix as a block or an arithmetic scalar |
| wet | The wet buffer, frames long | |
| [out] | out | Output buffer, frames long |
| frames | Frame count | |
| ports | dry, a block frames long; then mix in [0, 1], clamped, a NaN counting as 0, or left off to hold |
Definition at line 83 of file dry_wet.hpp.
References sbl::math::clamp01(), sbl::dsp::Ramp::head(), sbl::dsp::Ramp::jump(), mix(), and sbl::dsp::Ramp::step().
|
inline |
The mix at its target.
Definition at line 108 of file dry_wet.hpp.
References sbl::dsp::Ramp::jump(), and sbl::dsp::Ramp::target().
|
staticconstexpr |
a scalar mix arrives after this many frames
Definition at line 41 of file dry_wet.hpp.
Referenced by DryWet().
|
staticconstexpr |
The ports of the buffer form, in the order it takes them.
Definition at line 65 of file dry_wet.hpp.