introuced BW_CXX_NO_ARRAY

This commit is contained in:
Stefano D'Angelo 2024-02-02 17:42:12 +01:00
parent 2a62abe93b
commit 1d2f9dda39
52 changed files with 902 additions and 199 deletions

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order allpass filter (90° shift at cutoff, approaching 180° shift
@ -28,9 +28,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -606,7 +607,9 @@ static inline char bw_ap1_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -627,27 +630,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -699,12 +708,14 @@ inline void AP1<N_CHANNELS>::reset(
bw_ap1_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void AP1<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void AP1<N_CHANNELS>::reset(
@ -714,12 +725,14 @@ inline void AP1<N_CHANNELS>::reset(
bw_ap1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void AP1<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void AP1<N_CHANNELS>::process(
@ -729,6 +742,7 @@ inline void AP1<N_CHANNELS>::process(
bw_ap1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void AP1<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -736,6 +750,7 @@ inline void AP1<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void AP1<N_CHANNELS>::setCutoff(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order allpass filter (180° shift at cutoff, approaching 360° shift
@ -28,9 +28,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -634,7 +635,9 @@ static inline char bw_ap2_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -655,27 +658,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -730,12 +739,14 @@ inline void AP2<N_CHANNELS>::reset(
bw_ap2_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void AP2<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void AP2<N_CHANNELS>::reset(
@ -745,12 +756,14 @@ inline void AP2<N_CHANNELS>::reset(
bw_ap2_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void AP2<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void AP2<N_CHANNELS>::process(
@ -760,6 +773,7 @@ inline void AP2<N_CHANNELS>::process(
bw_ap2_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void AP2<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -767,6 +781,7 @@ inline void AP2<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void AP2<N_CHANNELS>::setCutoff(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
* Stereo balance.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -452,7 +453,9 @@ static inline char bw_balance_coeffs_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -478,12 +481,14 @@ public:
float * const * yR,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> xL,
std::array<const float *, N_CHANNELS> xR,
std::array<float *, N_CHANNELS> yL,
std::array<float *, N_CHANNELS> yR,
size_t nSamples);
#endif
void setBalance(
float value);
@ -527,6 +532,7 @@ inline void Balance<N_CHANNELS>::process(
bw_balance_process_multi(&coeffs, xL, xR, yL, yR, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Balance<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> xL,
@ -536,6 +542,7 @@ inline void Balance<N_CHANNELS>::process(
size_t nSamples) {
process(xL.data(), xR.data(), yL.data(), yR.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Balance<N_CHANNELS>::setBalance(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Bit depth reducer.
@ -31,9 +31,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -418,7 +419,9 @@ static inline char bw_bd_reduce_coeffs_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -442,10 +445,12 @@ public:
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setBitDepth(
char value);
@ -487,6 +492,7 @@ inline void BDReduce<N_CHANNELS>::process(
bw_bd_reduce_process_multi(&coeffs, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void BDReduce<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -494,6 +500,7 @@ inline void BDReduce<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void BDReduce<N_CHANNELS>::setBitDepth(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ utility }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common }}}
* description {{{
* Common operations on buffers.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -446,7 +447,9 @@ static inline void bw_buf_mul_multi(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -461,11 +464,13 @@ inline void bufFill(
float * BW_RESTRICT const * BW_RESTRICT dest,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufFill(
float k,
std::array<float * BW_RESTRICT, N_CHANNELS> dest,
size_t nSamples);
#endif
/*! <<<```
*
* ##### Brickworks::bufNeg
@ -476,11 +481,13 @@ inline void bufNeg(
float * const * dest,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufNeg(
const std::array<const float *, N_CHANNELS> src,
const std::array<float *, N_CHANNELS> dest,
size_t nSamples);
#endif
/*! <<<```
*
* ##### Brickworks::bufAdd
@ -492,12 +499,14 @@ inline void bufAdd(
float * const * dest,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufAdd(
const std::array<const float *, N_CHANNELS> src,
float k,
const std::array<float *, N_CHANNELS> dest,
size_t nSamples);
#endif
/*! <<<```
*
* ##### Brickworks::bufScale
@ -509,12 +518,14 @@ inline void bufScale(
float * const * dest,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufScale(
const std::array<const float *, N_CHANNELS> src,
float k,
const std::array<float *, N_CHANNELS> dest,
size_t nSamples);
#endif
/*! <<<```
*
* ##### Brickworks::bufMix
@ -526,12 +537,14 @@ inline void bufMix(
float * const * dest,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufMix(
const std::array<const float *, N_CHANNELS> src1,
const std::array<const float *, N_CHANNELS> src2,
const std::array<float *, N_CHANNELS> dest,
size_t nSamples);
#endif
/*! <<<```
*
* ##### Brickworks::bufMul
@ -543,12 +556,14 @@ inline void bufMul(
float * const * dest,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufMul(
const std::array<const float *, N_CHANNELS> src1,
const std::array<const float *, N_CHANNELS> src2,
const std::array<float *, N_CHANNELS> dest,
size_t nSamples);
#endif
/*! <<<```
* }}} */
@ -565,6 +580,7 @@ inline void bufFill(
bw_buf_fill_multi(k, dest, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufFill(
float k,
@ -572,6 +588,7 @@ inline void bufFill(
size_t nSamples) {
bufFill<N_CHANNELS>(k, dest.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void bufNeg(
@ -581,6 +598,7 @@ inline void bufNeg(
bw_buf_neg_multi(src, dest, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufNeg(
const std::array<const float *, N_CHANNELS> src,
@ -588,6 +606,7 @@ inline void bufNeg(
size_t nSamples) {
bufNeg<N_CHANNELS>(src.data(), dest.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void bufAdd(
@ -598,6 +617,7 @@ inline void bufAdd(
bw_buf_add_multi(src, k, dest, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufAdd(
const std::array<const float *, N_CHANNELS> src,
@ -606,6 +626,7 @@ inline void bufAdd(
size_t nSamples) {
bufAdd<N_CHANNELS>(src.data(), k, dest.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void bufScale(
@ -616,6 +637,7 @@ inline void bufScale(
bw_buf_scale_multi(src, k, dest, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufScale(
const std::array<const float *, N_CHANNELS> src,
@ -624,6 +646,7 @@ inline void bufScale(
size_t nSamples) {
bufScale<N_CHANNELS>(src.data(), k, dest.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void bufMix(
@ -634,6 +657,7 @@ inline void bufMix(
bw_buf_mix_multi(src1, src2, dest, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufMix(
const std::array<const float *, N_CHANNELS> src1,
@ -642,6 +666,7 @@ inline void bufMix(
size_t nSamples) {
bufMix<N_CHANNELS>(src1.data(), src2.data(), dest.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void bufMul(
@ -652,6 +677,7 @@ inline void bufMul(
bw_buf_mul_multi(src1, src2, dest, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void bufMul(
const std::array<const float *, N_CHANNELS> src1,
@ -660,6 +686,7 @@ inline void bufMul(
size_t nSamples) {
bufMul<N_CHANNELS>(src1.data(), src2.data(), dest.data(), nSamples);
}
#endif
}
#endif

View File

@ -632,7 +632,9 @@ static inline char bw_cab_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -653,27 +655,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoffLow(
float value);
@ -725,12 +733,14 @@ inline void Cab<N_CHANNELS>::reset(
bw_cab_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Cab<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Cab<N_CHANNELS>::reset(
@ -740,12 +750,14 @@ inline void Cab<N_CHANNELS>::reset(
bw_cab_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Cab<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Cab<N_CHANNELS>::process(
@ -755,6 +767,7 @@ inline void Cab<N_CHANNELS>::process(
bw_cab_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Cab<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -762,6 +775,7 @@ inline void Cab<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Cab<N_CHANNELS>::setCutoffLow(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{
* bw_buf bw_comb bw_common bw_delay bw_gain bw_math bw_one_pole bw_osc_sin
* bw_phase_gen
@ -36,9 +36,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -805,7 +806,9 @@ static inline char bw_chorus_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -829,27 +832,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setRate(
float value);
@ -926,12 +935,14 @@ inline void Chorus<N_CHANNELS>::reset(
bw_chorus_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Chorus<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Chorus<N_CHANNELS>::reset(
@ -941,12 +952,14 @@ inline void Chorus<N_CHANNELS>::reset(
bw_chorus_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Chorus<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Chorus<N_CHANNELS>::process(
@ -956,6 +969,7 @@ inline void Chorus<N_CHANNELS>::process(
bw_chorus_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Chorus<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -963,6 +977,7 @@ inline void Chorus<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Chorus<N_CHANNELS>::setRate(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Antialiased hard clipper with parametric bias and gain
@ -45,9 +45,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -718,7 +719,9 @@ static inline char bw_clip_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -739,27 +742,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setBias(
float value);
@ -811,12 +820,14 @@ inline void Clip<N_CHANNELS>::reset(
bw_clip_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Clip<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Clip<N_CHANNELS>::reset(
@ -826,12 +837,14 @@ inline void Clip<N_CHANNELS>::reset(
bw_clip_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Clip<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Clip<N_CHANNELS>::process(
@ -841,6 +854,7 @@ inline void Clip<N_CHANNELS>::process(
bw_clip_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Clip<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -848,6 +862,7 @@ inline void Clip<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Clip<N_CHANNELS>::setBias(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{
* bw_buf bw_common bw_delay bw_gain bw_math bw_one_pole
* }}}
@ -37,9 +37,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -872,7 +873,9 @@ static inline char bw_comb_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -896,27 +899,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setDelayFF(
float value);
@ -990,12 +999,14 @@ inline void Comb<N_CHANNELS>::reset(
bw_comb_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Comb<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Comb<N_CHANNELS>::reset(
@ -1005,12 +1016,14 @@ inline void Comb<N_CHANNELS>::reset(
bw_comb_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Comb<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Comb<N_CHANNELS>::process(
@ -1020,6 +1033,7 @@ inline void Comb<N_CHANNELS>::process(
bw_comb_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Comb<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -1027,6 +1041,7 @@ inline void Comb<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Comb<N_CHANNELS>::setDelayFF(

View File

@ -31,6 +31,7 @@
* <ul>
* <li>Added <code>BW_NULL</code> and relaxed <code>NULL</code>
* definition requirement in C++.</li>
* <li>Added <code>BW_CXX_NO_ARRAY</code>.</li>
* <li>Fixed sign-related warning in <code>bw_hash_sdbm()</code>.</li>
* </ul>
* </li>
@ -92,6 +93,12 @@
/*** Public API ***/
#ifdef __cplusplus
# if __cplusplus < 201103L
# error Detected C++ compiler that doesn't support C++11
# endif
#endif
/*! api {{{
*
* #### Basic definitions
@ -150,6 +157,14 @@
# error INFINITY not defined
#endif
/*! ...
*
* #### BW_CXX_NO_ARRAY
*
* C++ APIs of Brickworks modules typically include overloaded methods that
* use `std::array` arguments, and thus require the `<array>` header file.
*
* If this is not wanted, defining `BW_CXX_NO_ARRAY` suppresses such methods
* and the inclusion of said header file.
*
* #### BW_RESTRICT
*

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{
* bw_common bw_env_follow bw_gain bw_math bw_one_pole
* }}}
@ -29,9 +29,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -801,7 +802,9 @@ static inline char bw_comp_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -823,20 +826,24 @@ public:
float xSc0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
float xSc0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
const float * xSc0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> xSc0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
@ -844,11 +851,13 @@ public:
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<const float *, N_CHANNELS> xSc,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setTreshLin(
float value);
@ -913,6 +922,7 @@ inline void Comp<N_CHANNELS>::reset(
bw_comp_reset_state(&coeffs, states + i, x0, xSc0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Comp<N_CHANNELS>::reset(
float x0,
@ -920,6 +930,7 @@ inline void Comp<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, xSc0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Comp<N_CHANNELS>::reset(
@ -930,6 +941,7 @@ inline void Comp<N_CHANNELS>::reset(
bw_comp_reset_state_multi(&coeffs, statesP, x0, xSc0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Comp<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
@ -937,6 +949,7 @@ inline void Comp<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), xSc0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Comp<N_CHANNELS>::process(
@ -947,6 +960,7 @@ inline void Comp<N_CHANNELS>::process(
bw_comp_process_multi(&coeffs, statesP, x, xSc, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Comp<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -955,6 +969,7 @@ inline void Comp<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), xSc.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Comp<N_CHANNELS>::setTreshLin(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_buf bw_common bw_math }}}
* description {{{
* Interpolated delay line, not smoothed.
@ -31,9 +31,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -771,7 +772,9 @@ static inline char bw_delay_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -795,27 +798,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setDelay(
float value);
@ -878,12 +887,14 @@ inline void Delay<N_CHANNELS>::reset(
bw_delay_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Delay<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Delay<N_CHANNELS>::reset(
@ -893,12 +904,14 @@ inline void Delay<N_CHANNELS>::reset(
bw_delay_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Delay<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Delay<N_CHANNELS>::process(
@ -908,6 +921,7 @@ inline void Delay<N_CHANNELS>::process(
bw_delay_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Delay<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -915,6 +929,7 @@ inline void Delay<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Delay<N_CHANNELS>::setDelay(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{
* bw_clip bw_common bw_gain bw_hp1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
* bw_satur bw_svf
@ -32,9 +32,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -657,7 +658,9 @@ static inline char bw_dist_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -678,27 +681,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setDistortion(
float value);
@ -750,12 +759,14 @@ inline void Dist<N_CHANNELS>::reset(
bw_dist_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Dist<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Dist<N_CHANNELS>::reset(
@ -765,12 +776,14 @@ inline void Dist<N_CHANNELS>::reset(
bw_dist_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Dist<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Dist<N_CHANNELS>::process(
@ -780,6 +793,7 @@ inline void Dist<N_CHANNELS>::process(
bw_dist_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Dist<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -787,6 +801,7 @@ inline void Dist<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Dist<N_CHANNELS>::setDistortion(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{
* bw_common bw_gain bw_hs1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
* bw_satur bw_svf
@ -32,9 +32,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -660,7 +661,9 @@ static inline char bw_drive_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -681,27 +684,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setDrive(
float value);
@ -753,11 +762,13 @@ inline void Drive<N_CHANNELS>::reset(
bw_drive_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Drive<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
#endif
}
template<size_t N_CHANNELS>
@ -768,12 +779,14 @@ inline void Drive<N_CHANNELS>::reset(
bw_drive_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Drive<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Drive<N_CHANNELS>::process(
@ -783,6 +796,7 @@ inline void Drive<N_CHANNELS>::process(
bw_drive_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Drive<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -790,6 +804,7 @@ inline void Drive<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Drive<N_CHANNELS>::setDrive(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
* Dry/wet mixer.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -415,7 +416,9 @@ static inline char bw_dry_wet_coeffs_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -440,11 +443,13 @@ public:
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> xDry,
std::array<const float *, N_CHANNELS> xWet,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setWet(
float value);
@ -490,6 +495,7 @@ inline void DryWet<N_CHANNELS>::process(
bw_dry_wet_process_multi(&coeffs, xDry, xWet, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void DryWet<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> xDry,
@ -498,6 +504,7 @@ inline void DryWet<N_CHANNELS>::process(
size_t nSamples) {
process(xDry.data(), xWet.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void DryWet<N_CHANNELS>::setWet(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Envelope follower made of a full-wave rectifier followed by
@ -28,9 +28,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -618,7 +619,9 @@ static inline char bw_env_follow_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -639,27 +642,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setAttackTau(
float value);
@ -711,12 +720,14 @@ inline void EnvFollow<N_CHANNELS>::reset(
bw_env_follow_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void EnvFollow<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void EnvFollow<N_CHANNELS>::reset(
@ -726,12 +737,14 @@ inline void EnvFollow<N_CHANNELS>::reset(
bw_env_follow_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void EnvFollow<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void EnvFollow<N_CHANNELS>::process(
@ -741,6 +754,7 @@ inline void EnvFollow<N_CHANNELS>::process(
bw_env_follow_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void EnvFollow<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -748,6 +762,7 @@ inline void EnvFollow<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void EnvFollow<N_CHANNELS>::setAttackTau(

View File

@ -43,7 +43,8 @@
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Added skip_sustain and always_reach_sustain parameters.</li>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* <li>Replaced GCC pragmas to suppress bogus uninitialized variable
* warnings with useless harmless statement.</li>
* </ul>
@ -928,7 +929,9 @@ static inline char bw_env_gen_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -949,27 +952,33 @@ public:
char gate0 = 0,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
char gate0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const char * BW_RESTRICT gate0,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<char, N_CHANNELS> gate0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const char * BW_RESTRICT gate,
float * BW_RESTRICT const * BW_RESTRICT y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<char, N_CHANNELS> gate,
std::array<float * BW_RESTRICT, N_CHANNELS> y,
size_t nSamples);
#endif
void setAttack(
float value);
@ -1036,12 +1045,14 @@ inline void EnvGen<N_CHANNELS>::reset(
bw_env_gen_reset_state(&coeffs, states + i, gate0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void EnvGen<N_CHANNELS>::reset(
char gate0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(gate0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void EnvGen<N_CHANNELS>::reset(
@ -1051,12 +1062,14 @@ inline void EnvGen<N_CHANNELS>::reset(
bw_env_gen_reset_state_multi(&coeffs, statesP, gate0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void EnvGen<N_CHANNELS>::reset(
std::array<char, N_CHANNELS> gate0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(gate0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void EnvGen<N_CHANNELS>::process(
@ -1066,6 +1079,7 @@ inline void EnvGen<N_CHANNELS>::process(
bw_env_gen_process_multi(&coeffs, statesP, gate, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void EnvGen<N_CHANNELS>::process(
std::array<char, N_CHANNELS> gate,
@ -1073,6 +1087,7 @@ inline void EnvGen<N_CHANNELS>::process(
size_t nSamples) {
process(gate.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void EnvGen<N_CHANNELS>::setAttack(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{
* bw_common bw_gain bw_hp1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
* bw_satur bw_svf
@ -32,9 +32,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -632,7 +633,9 @@ static inline char bw_fuzz_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -653,27 +656,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setFuzz(
float value);
@ -722,12 +731,14 @@ inline void Fuzz<N_CHANNELS>::reset(
bw_fuzz_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Fuzz<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Fuzz<N_CHANNELS>::reset(
@ -737,12 +748,14 @@ inline void Fuzz<N_CHANNELS>::reset(
bw_fuzz_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Fuzz<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Fuzz<N_CHANNELS>::process(
@ -752,6 +765,7 @@ inline void Fuzz<N_CHANNELS>::process(
bw_fuzz_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Fuzz<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -759,6 +773,7 @@ inline void Fuzz<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Fuzz<N_CHANNELS>::setFuzz(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Gain.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -506,7 +507,9 @@ static inline char bw_gain_coeffs_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -530,10 +533,12 @@ public:
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setGainLin(
float value);
@ -585,6 +590,7 @@ inline void Gain<N_CHANNELS>::process(
bw_gain_process_multi(&coeffs, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Gain<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -592,6 +598,7 @@ inline void Gain<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Gain<N_CHANNELS>::setGainLin(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order highpass filter (6 dB/oct) with gain asymptotically
@ -28,9 +28,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -602,7 +603,9 @@ static inline char bw_hp1_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -623,27 +626,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -695,12 +704,14 @@ inline void HP1<N_CHANNELS>::reset(
bw_hp1_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void HP1<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : y0);
}
#endif
template<size_t N_CHANNELS>
inline void HP1<N_CHANNELS>::reset(
@ -710,12 +721,14 @@ inline void HP1<N_CHANNELS>::reset(
bw_hp1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void HP1<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void HP1<N_CHANNELS>::process(
@ -725,6 +738,7 @@ inline void HP1<N_CHANNELS>::process(
bw_hp1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void HP1<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -732,6 +746,7 @@ inline void HP1<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void HP1<N_CHANNELS>::setCutoff(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_mm1 bw_one_pole }}}
* description {{{
* First-order high shelf filter (6 dB/oct) with unitary DC gain.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -723,7 +724,9 @@ static inline char bw_hs1_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -744,27 +747,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -822,12 +831,14 @@ inline void HS1<N_CHANNELS>::reset(
bw_hs1_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void HS1<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : y0);
}
#endif
template<size_t N_CHANNELS>
inline void HS1<N_CHANNELS>::reset(
@ -837,12 +848,14 @@ inline void HS1<N_CHANNELS>::reset(
bw_hs1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void HS1<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void HS1<N_CHANNELS>::process(
@ -852,6 +865,7 @@ inline void HS1<N_CHANNELS>::process(
bw_hs1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void HS1<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -859,6 +873,7 @@ inline void HS1<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void HS1<N_CHANNELS>::setCutoff(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf }}}
* description {{{
* Second-order high shelf filter (12 dB/oct) with unitary DC gain.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* <li>Replaced GCC pragmas to suppress bogus uninitialized variable
* warnings with useless harmless statement.</li>
* </ul>
@ -778,7 +779,9 @@ static inline char bw_hs2_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -799,27 +802,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -880,12 +889,14 @@ inline void HS2<N_CHANNELS>::reset(
bw_hs2_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void HS2<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : y0);
}
#endif
template<size_t N_CHANNELS>
inline void HS2<N_CHANNELS>::reset(
@ -895,12 +906,14 @@ inline void HS2<N_CHANNELS>::reset(
bw_hs2_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void HS2<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void HS2<N_CHANNELS>::process(
@ -910,6 +923,7 @@ inline void HS2<N_CHANNELS>::process(
bw_hs2_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void HS2<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -917,6 +931,7 @@ inline void HS2<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void HS2<N_CHANNELS>::setCutoff(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* First-order lowpass filter (6 dB/oct) with unitary DC gain.
@ -30,9 +30,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -687,7 +688,9 @@ static inline char bw_lp1_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -708,27 +711,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -780,12 +789,14 @@ inline void LP1<N_CHANNELS>::reset(
bw_lp1_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void LP1<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void LP1<N_CHANNELS>::reset(
@ -795,12 +806,14 @@ inline void LP1<N_CHANNELS>::reset(
bw_lp1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void LP1<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void LP1<N_CHANNELS>::process(
@ -810,6 +823,7 @@ inline void LP1<N_CHANNELS>::process(
bw_lp1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void LP1<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -817,6 +831,7 @@ inline void LP1<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void LP1<N_CHANNELS>::setCutoff(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_mm1 bw_one_pole }}}
* description {{{
* First-order low shelf filter (6 dB/oct) with gain asymptotically
@ -28,9 +28,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -721,7 +722,9 @@ static inline char bw_ls1_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -742,27 +745,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -820,12 +829,14 @@ inline void LS1<N_CHANNELS>::reset(
bw_ls1_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void LS1<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void LS1<N_CHANNELS>::reset(
@ -835,12 +846,14 @@ inline void LS1<N_CHANNELS>::reset(
bw_ls1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void LS1<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void LS1<N_CHANNELS>::process(
@ -850,6 +863,7 @@ inline void LS1<N_CHANNELS>::process(
bw_ls1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void LS1<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -857,6 +871,7 @@ inline void LS1<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void LS1<N_CHANNELS>::setCutoff(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf }}}
* description {{{
* Second-order low shelf filter (12 dB/oct) with gain asymptotically
@ -28,9 +28,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* <li>Fixed typos in documentation of
* <code>bw_ls2_set_cutoff()</code>,
* <code>bw_ls2_set_dc_gain_lin()</code>, and
@ -784,7 +785,9 @@ static inline char bw_ls2_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -805,27 +808,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -886,12 +895,14 @@ inline void LS2<N_CHANNELS>::reset(
bw_ls2_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void LS2<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : y0);
}
#endif
template<size_t N_CHANNELS>
inline void LS2<N_CHANNELS>::reset(
@ -901,12 +912,14 @@ inline void LS2<N_CHANNELS>::reset(
bw_ls2_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void LS2<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void LS2<N_CHANNELS>::process(
@ -916,6 +929,7 @@ inline void LS2<N_CHANNELS>::process(
bw_ls2_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void LS2<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -923,6 +937,7 @@ inline void LS2<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void LS2<N_CHANNELS>::setCutoff(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order multimode filter.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -671,7 +672,9 @@ static inline char bw_mm1_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -692,27 +695,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -770,12 +779,14 @@ inline void MM1<N_CHANNELS>::reset(
bw_mm1_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void MM1<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void MM1<N_CHANNELS>::reset(
@ -785,12 +796,14 @@ inline void MM1<N_CHANNELS>::reset(
bw_mm1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void MM1<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void MM1<N_CHANNELS>::process(
@ -800,6 +813,7 @@ inline void MM1<N_CHANNELS>::process(
bw_mm1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void MM1<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -807,6 +821,7 @@ inline void MM1<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void MM1<N_CHANNELS>::setCutoff(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order multimode filter.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -779,7 +780,9 @@ static inline char bw_mm2_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -800,27 +803,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -887,12 +896,14 @@ inline void MM2<N_CHANNELS>::reset(
bw_mm2_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void MM2<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void MM2<N_CHANNELS>::reset(
@ -902,12 +913,14 @@ inline void MM2<N_CHANNELS>::reset(
bw_mm2_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void MM2<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void MM2<N_CHANNELS>::process(
@ -917,6 +930,7 @@ inline void MM2<N_CHANNELS>::process(
bw_mm2_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void MM2<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -924,6 +938,7 @@ inline void MM2<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void MM2<N_CHANNELS>::setCutoff(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_env_follow bw_math bw_one_pole }}}
* description {{{
* Noise gate with independent sidechain input.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -730,7 +731,9 @@ static inline char bw_noise_gate_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -752,20 +755,24 @@ public:
float xSc0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
float xSc0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
const float * xSc0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> xSc0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
@ -773,11 +780,13 @@ public:
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<const float *, N_CHANNELS> xSc,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setTreshLin(
float value);
@ -836,6 +845,7 @@ inline void NoiseGate<N_CHANNELS>::reset(
bw_noise_gate_reset_state(&coeffs, states + i, x0, xSc0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void NoiseGate<N_CHANNELS>::reset(
float x0,
@ -843,6 +853,7 @@ inline void NoiseGate<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, xSc0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void NoiseGate<N_CHANNELS>::reset(
@ -853,6 +864,7 @@ inline void NoiseGate<N_CHANNELS>::reset(
bw_noise_gate_reset_state_multi(&coeffs, statesP, x0, xSc0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void NoiseGate<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
@ -860,6 +872,7 @@ inline void NoiseGate<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), xSc0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void NoiseGate<N_CHANNELS>::process(
@ -870,6 +883,7 @@ inline void NoiseGate<N_CHANNELS>::process(
bw_noise_gate_process_multi(&coeffs, statesP, x, xSc, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void NoiseGate<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -878,6 +892,7 @@ inline void NoiseGate<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), xSc.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void NoiseGate<N_CHANNELS>::setTreshLin(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_rand }}}
* description {{{
* Generator of white noise with uniform distribution.
@ -31,9 +31,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -434,7 +435,9 @@ static inline char bw_noise_gen_coeffs_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -458,9 +461,11 @@ public:
float * BW_RESTRICT const * BW_RESTRICT y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<float * BW_RESTRICT, N_CHANNELS> y,
size_t nSamples);
#endif
void setSampleRateScaling(
bool value);
@ -504,12 +509,14 @@ inline void NoiseGen<N_CHANNELS>::process(
bw_noise_gen_process_multi(&coeffs, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void NoiseGen<N_CHANNELS>::process(
std::array<float * BW_RESTRICT, N_CHANNELS> y,
size_t nSamples) {
process(y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void NoiseGen<N_CHANNELS>::setSampleRateScaling(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order notch filter with unitary gain at DC and asymptotically as
@ -28,9 +28,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -632,7 +633,9 @@ static inline char bw_notch_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -653,27 +656,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -728,12 +737,14 @@ inline void Notch<N_CHANNELS>::reset(
bw_notch_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Notch<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Notch<N_CHANNELS>::reset(
@ -743,12 +754,14 @@ inline void Notch<N_CHANNELS>::reset(
bw_notch_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Notch<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Notch<N_CHANNELS>::process(
@ -758,6 +771,7 @@ inline void Notch<N_CHANNELS>::process(
bw_notch_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Notch<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -765,6 +779,7 @@ inline void Notch<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Notch<N_CHANNELS>::setCutoff(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* One-pole (6 dB/oct) lowpass filter with unitary DC gain, separate attack
@ -30,9 +30,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* <li>Replaced GCC pragmas to suppress bogus uninitialized variable
* warnings with useless harmless statement.</li>
* </ul>
@ -1212,7 +1213,9 @@ static inline char bw_one_pole_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -1233,27 +1236,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -1323,12 +1332,14 @@ inline void OnePole<N_CHANNELS>::reset(
bw_one_pole_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void OnePole<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void OnePole<N_CHANNELS>::reset(
@ -1338,12 +1349,14 @@ inline void OnePole<N_CHANNELS>::reset(
bw_one_pole_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void OnePole<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void OnePole<N_CHANNELS>::process(
@ -1353,6 +1366,7 @@ inline void OnePole<N_CHANNELS>::process(
bw_one_pole_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void OnePole<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -1360,6 +1374,7 @@ inline void OnePole<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void OnePole<N_CHANNELS>::setCutoff(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common }}}
* description {{{
* Post-filter to decolorate oscillator waveshapers when antialiasing is on.
@ -33,9 +33,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -310,7 +311,9 @@ static inline char bw_osc_filt_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -328,27 +331,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
/*! <<<...
* }
* ```
@ -382,12 +391,14 @@ inline void OscFilt<N_CHANNELS>::reset(
bw_osc_filt_reset_state(states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void OscFilt<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void OscFilt<N_CHANNELS>::reset(
@ -396,12 +407,14 @@ inline void OscFilt<N_CHANNELS>::reset(
bw_osc_filt_reset_state_multi(statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void OscFilt<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void OscFilt<N_CHANNELS>::process(
@ -411,6 +424,7 @@ inline void OscFilt<N_CHANNELS>::process(
bw_osc_filt_process_multi(statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void OscFilt<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -418,6 +432,7 @@ inline void OscFilt<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
}
#endif

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Pulse oscillator waveshaper with variable pulse width (actually, duty
@ -37,9 +37,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -535,7 +536,9 @@ static inline char bw_osc_pulse_coeffs_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -560,11 +563,13 @@ public:
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<const float *, N_CHANNELS> x_inc,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setAntialiasing(
bool value);
@ -610,6 +615,7 @@ inline void OscPulse<N_CHANNELS>::process(
bw_osc_pulse_process_multi(&coeffs, x, x_inc, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void OscPulse<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -618,6 +624,7 @@ inline void OscPulse<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), x_inc.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void OscPulse<N_CHANNELS>::setAntialiasing(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Sawtooth oscillator waveshaper with PolyBLEP antialiasing.
@ -36,9 +36,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -483,7 +484,9 @@ static inline char bw_osc_saw_coeffs_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -508,11 +511,13 @@ public:
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<const float *, N_CHANNELS> x_inc,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setAntialiasing(bool value);
/*! <<<...
@ -554,6 +559,7 @@ inline void OscSaw<N_CHANNELS>::process(
bw_osc_saw_process_multi(&coeffs, x, x_inc, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void OscSaw<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -562,6 +568,7 @@ inline void OscSaw<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), x_inc.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void OscSaw<N_CHANNELS>::setAntialiasing(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Sinusoidal oscillator waveshaper.
@ -30,9 +30,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -184,7 +185,9 @@ static inline void bw_osc_sin_process_multi(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -199,11 +202,13 @@ void oscSinProcess(
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
void oscSinProcess(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
/*! <<<```
* }}} */
@ -220,6 +225,7 @@ inline void oscSinProcess(
bw_osc_sin_process_multi(x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void oscSinProcess(
std::array<const float *, N_CHANNELS> x,
@ -227,6 +233,7 @@ inline void oscSinProcess(
size_t nSamples) {
oscSinProcess<N_CHANNELS>(x.data(), y.data(), nSamples);
}
#endif
}
#endif

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Triangle oscillator waveshaper with variable slope (increasing time over
@ -37,9 +37,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -542,7 +543,9 @@ static inline char bw_osc_tri_coeffs_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -567,11 +570,13 @@ public:
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<const float *, N_CHANNELS> x_inc,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setAntialiasing(
bool value);
@ -617,6 +622,7 @@ inline void OscTri<N_CHANNELS>::process(
bw_osc_tri_process_multi(&coeffs, x, x_inc, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void OscTri<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -625,6 +631,7 @@ inline void OscTri<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), x_inc.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void OscTri<N_CHANNELS>::setAntialiasing(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
* Stereo panner with -3 dB center pan law.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -444,7 +445,9 @@ static inline char bw_pan_coeffs_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -469,11 +472,13 @@ public:
float * const * yR,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> yL,
std::array<float *, N_CHANNELS> yR,
size_t nSamples);
#endif
void setPan(
float value);
@ -516,6 +521,7 @@ inline void Pan<N_CHANNELS>::process(
bw_pan_process_multi(&coeffs, x, yL, yR, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Pan<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -524,6 +530,7 @@ inline void Pan<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), yL.data(), yR.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Pan<N_CHANNELS>::setPan(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf }}}
* description {{{
* Second-order peak filter with unitary gain at DC and asymptotically
@ -35,9 +35,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* <li>Replaced GCC pragmas to suppress bogus uninitialized variable
* warnings with useless harmless statement.</li>
* </ul>
@ -869,7 +870,9 @@ static inline char bw_peak_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -890,27 +893,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -977,12 +986,14 @@ inline void Peak<N_CHANNELS>::reset(
bw_peak_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Peak<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : y0);
}
#endif
template<size_t N_CHANNELS>
inline void Peak<N_CHANNELS>::reset(
@ -992,12 +1003,14 @@ inline void Peak<N_CHANNELS>::reset(
bw_peak_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Peak<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Peak<N_CHANNELS>::process(
@ -1007,6 +1020,7 @@ inline void Peak<N_CHANNELS>::process(
bw_peak_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Peak<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -1014,6 +1028,7 @@ inline void Peak<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Peak<N_CHANNELS>::setCutoff(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Phase generator with portamento and exponential frequency modulation.
@ -29,10 +29,11 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Fixed rounding bug when frequency is tiny and negative.</li>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -886,7 +887,9 @@ static inline char bw_phase_gen_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -908,20 +911,24 @@ public:
float * BW_RESTRICT y0 = nullptr,
float * BW_RESTRICT yInc0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float phase0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0,
std::array<float, N_CHANNELS> * BW_RESTRICT yInc0);
#endif
void reset(
const float * phase0,
float * y0 = nullptr,
float * yInc0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> phase0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr,
std::array<float, N_CHANNELS> * BW_RESTRICT yInc0 = nullptr);
#endif
void process(
const float * const * xMod,
@ -929,11 +936,13 @@ public:
float * const * yInc,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> xMod,
std::array<float *, N_CHANNELS> y,
std::array<float *, N_CHANNELS> yInc,
size_t nSamples);
#endif
void setFrequency(
float value);
@ -1000,6 +1009,7 @@ inline void PhaseGen<N_CHANNELS>::reset(
}
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void PhaseGen<N_CHANNELS>::reset(
float phase0,
@ -1007,6 +1017,7 @@ inline void PhaseGen<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT yInc0) {
reset(phase0, y0 != nullptr ? y0->data() : nullptr, yInc0 != nullptr ? yInc0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void PhaseGen<N_CHANNELS>::reset(
@ -1017,6 +1028,7 @@ inline void PhaseGen<N_CHANNELS>::reset(
bw_phase_gen_reset_state_multi(&coeffs, statesP, phase0, y0, yInc0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void PhaseGen<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> phase0,
@ -1024,6 +1036,7 @@ inline void PhaseGen<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT yInc0) {
reset(phase0.data(), y0 != nullptr ? y0->data() : nullptr, yInc0 != nullptr ? yInc0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void PhaseGen<N_CHANNELS>::process(
@ -1034,6 +1047,7 @@ inline void PhaseGen<N_CHANNELS>::process(
bw_phase_gen_process_multi(&coeffs, statesP, xMod, y, yInc, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void PhaseGen<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> xMod,
@ -1042,6 +1056,7 @@ inline void PhaseGen<N_CHANNELS>::process(
size_t nSamples) {
process(xMod.data(), y.data(), yInc.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void PhaseGen<N_CHANNELS>::setFrequency(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{
* bw_ap1 bw_common bw_lp1 bw_math bw_one_pole bw_osc_sin bw_phase_gen
* }}}
@ -30,9 +30,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -660,7 +661,9 @@ static inline char bw_phaser_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -681,27 +684,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setRate(
float value);
@ -753,12 +762,14 @@ inline void Phaser<N_CHANNELS>::reset(
bw_phaser_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Phaser<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Phaser<N_CHANNELS>::reset(
@ -768,12 +779,14 @@ inline void Phaser<N_CHANNELS>::reset(
bw_phaser_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Phaser<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Phaser<N_CHANNELS>::process(
@ -783,6 +796,7 @@ inline void Phaser<N_CHANNELS>::process(
bw_phaser_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Phaser<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -790,6 +804,7 @@ inline void Phaser<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Phaser<N_CHANNELS>::setRate(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common }}}
* description {{{
* Pinking filter.
@ -40,9 +40,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -646,7 +647,9 @@ static inline char bw_pink_filt_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -667,27 +670,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setSampleRateScaling(
bool value);
@ -735,12 +744,14 @@ inline void PinkFilt<N_CHANNELS>::reset(
bw_pink_filt_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void PinkFilt<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void PinkFilt<N_CHANNELS>::reset(
@ -750,12 +761,14 @@ inline void PinkFilt<N_CHANNELS>::reset(
bw_pink_filt_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void PinkFilt<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void PinkFilt<N_CHANNELS>::process(
@ -765,6 +778,7 @@ inline void PinkFilt<N_CHANNELS>::process(
bw_pink_filt_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void PinkFilt<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -772,6 +786,7 @@ inline void PinkFilt<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void PinkFilt<N_CHANNELS>::setSampleRateScaling(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_env_follow bw_math bw_one_pole }}}
* description {{{
* Digital peak programme meter with adjustable integration time constant.
@ -30,9 +30,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -593,7 +594,9 @@ static inline char bw_ppm_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -614,27 +617,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setIntegrationTau(
float value);
@ -683,12 +692,14 @@ inline void PPM<N_CHANNELS>::reset(
bw_ppm_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void PPM<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void PPM<N_CHANNELS>::reset(
@ -698,12 +709,14 @@ inline void PPM<N_CHANNELS>::reset(
bw_ppm_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void PPM<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void PPM<N_CHANNELS>::process(
@ -713,6 +726,7 @@ inline void PPM<N_CHANNELS>::process(
bw_ppm_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void PPM<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -720,6 +734,7 @@ inline void PPM<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void PPM<N_CHANNELS>::setIntegrationTau(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{
* bw_buf bw_common bw_delay bw_dry_wet bw_gain bw_lp1 bw_math bw_one_pole
* bw_osc_sin bw_phase_gen
@ -35,9 +35,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -1187,7 +1188,9 @@ static inline char bw_reverb_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -1212,11 +1215,13 @@ public:
float * BW_RESTRICT yL0 = nullptr,
float * BW_RESTRICT yR0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float xL0,
float xR0,
std::array<float, N_CHANNELS> * BW_RESTRICT yL0,
std::array<float, N_CHANNELS> * BW_RESTRICT yR0);
#endif
void reset(
const float * xL0,
@ -1224,11 +1229,13 @@ public:
float * yL0 = nullptr,
float * yR0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> xL0,
std::array<float, N_CHANNELS> xR0,
std::array<float, N_CHANNELS> * BW_RESTRICT yL0 = nullptr,
std::array<float, N_CHANNELS> * BW_RESTRICT yR0 = nullptr);
#endif
void process(
const float * const * xL,
@ -1237,12 +1244,14 @@ public:
float * const * yR,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> xL,
std::array<const float *, N_CHANNELS> xR,
std::array<float *, N_CHANNELS> yL,
std::array<float *, N_CHANNELS> yR,
size_t nSamples);
#endif
void setPredelay(
float value);
@ -1331,6 +1340,7 @@ inline void Reverb<N_CHANNELS>::reset(
}
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Reverb<N_CHANNELS>::reset(
float xL0,
@ -1339,6 +1349,7 @@ inline void Reverb<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT yR0) {
reset(xL0, xR0, yL0 != nullptr ? yL0->data() : nullptr, yR0 != nullptr ? yR0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Reverb<N_CHANNELS>::reset(
@ -1350,6 +1361,7 @@ inline void Reverb<N_CHANNELS>::reset(
bw_reverb_reset_state_multi(&coeffs, statesP, xL0, xR0, yL0, yR0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Reverb<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> xL0,
@ -1358,6 +1370,7 @@ inline void Reverb<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT yR0) {
reset(xL0.data(), xR0.data(), yL0 != nullptr ? yL0->data() : nullptr, yR0 != nullptr ? yR0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Reverb<N_CHANNELS>::process(
@ -1369,6 +1382,7 @@ inline void Reverb<N_CHANNELS>::process(
bw_reverb_process_multi(&coeffs, statesP, xL, xR, yL, yR, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Reverb<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> xL,
@ -1378,6 +1392,7 @@ inline void Reverb<N_CHANNELS>::process(
size_t nSamples) {
process(xL.data(), xR.data(), yL.data(), yR.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Reverb<N_CHANNELS>::setPredelay(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Ring modulator with variable modulation amount.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -416,7 +417,9 @@ static inline char bw_ring_mod_coeffs_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -441,11 +444,13 @@ public:
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> xMod,
std::array<const float *, N_CHANNELS> xCar,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setAmount(float value);
/*! <<<...
@ -487,6 +492,7 @@ inline void RingMod<N_CHANNELS>::process(
bw_ring_mod_process_multi(&coeffs, xMod, xCar, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void RingMod<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> xMod,
@ -495,6 +501,7 @@ inline void RingMod<N_CHANNELS>::process(
size_t nSamples) {
process(xMod.data(), xCar.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void RingMod<N_CHANNELS>::setAmount(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Antialiased tanh-based saturation with parametric bias and gain
@ -45,9 +45,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -732,7 +733,9 @@ static inline char bw_satur_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -753,27 +756,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setBias(
float value);
@ -825,12 +834,14 @@ inline void Satur<N_CHANNELS>::reset(
bw_satur_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Satur<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Satur<N_CHANNELS>::reset(
@ -840,12 +851,14 @@ inline void Satur<N_CHANNELS>::reset(
bw_satur_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Satur<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Satur<N_CHANNELS>::process(
@ -855,6 +868,7 @@ inline void Satur<N_CHANNELS>::process(
bw_satur_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Satur<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -862,6 +876,7 @@ inline void Satur<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Satur<N_CHANNELS>::setBias(

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Slew-rate limiter with separate maximum increasing and decreasing rates.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -866,7 +867,9 @@ static inline char bw_slew_lim_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -887,27 +890,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setMaxRate(
float value);
@ -962,12 +971,14 @@ inline void SlewLim<N_CHANNELS>::reset(
bw_slew_lim_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SlewLim<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void SlewLim<N_CHANNELS>::reset(
@ -977,12 +988,14 @@ inline void SlewLim<N_CHANNELS>::reset(
bw_slew_lim_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SlewLim<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void SlewLim<N_CHANNELS>::process(
@ -992,6 +1005,7 @@ inline void SlewLim<N_CHANNELS>::process(
bw_slew_lim_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SlewLim<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -999,6 +1013,7 @@ inline void SlewLim<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void SlewLim<N_CHANNELS>::setMaxRate(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Sample rate reducer.
@ -31,9 +31,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -552,7 +553,9 @@ static inline char bw_sr_reduce_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -573,27 +576,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setRatio(
float value);
@ -639,12 +648,14 @@ inline void SRReduce<N_CHANNELS>::reset(
bw_sr_reduce_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SRReduce<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void SRReduce<N_CHANNELS>::reset(
@ -654,12 +665,14 @@ inline void SRReduce<N_CHANNELS>::reset(
bw_sr_reduce_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SRReduce<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void SRReduce<N_CHANNELS>::process(
@ -669,6 +682,7 @@ inline void SRReduce<N_CHANNELS>::process(
bw_sr_reduce_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SRReduce<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -676,6 +690,7 @@ inline void SRReduce<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void SRReduce<N_CHANNELS>::setRatio(float value) {

View File

@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Aribtrary-ratio IIR sample rate converter.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -523,7 +524,9 @@ static inline char bw_src_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -542,17 +545,21 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * BW_RESTRICT const * BW_RESTRICT x,
@ -560,11 +567,13 @@ public:
size_t * BW_RESTRICT nInSamples,
size_t * BW_RESTRICT nOutSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float * BW_RESTRICT, N_CHANNELS> x,
std::array<float * BW_RESTRICT, N_CHANNELS> y,
std::array<size_t, N_CHANNELS> & nInSamples,
std::array<size_t, N_CHANNELS> & nOutSamples);
#endif
/*! <<<...
* }
* ```
@ -601,12 +610,14 @@ inline void SRC<N_CHANNELS>::reset(
bw_src_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SRC<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void SRC<N_CHANNELS>::reset(
@ -615,12 +626,14 @@ inline void SRC<N_CHANNELS>::reset(
bw_src_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SRC<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void SRC<N_CHANNELS>::process(
@ -631,6 +644,7 @@ inline void SRC<N_CHANNELS>::process(
bw_src_process_multi(coeffs, statesP, x, y, N_CHANNELS, nInSamples, nOutSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SRC<N_CHANNELS>::process(
std::array<const float * BW_RESTRICT, N_CHANNELS> x,
@ -639,6 +653,7 @@ inline void SRC<N_CHANNELS>::process(
std::array<size_t, N_CHANNELS> & nOutSamples) {
process(x.data(), y.data(), nInSamples.data(), nOutSamples.data());
}
#endif
}
#endif

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Integer-ratio IIR sample rate converter.
@ -33,9 +33,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -498,7 +499,9 @@ static inline char bw_src_int_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -517,17 +520,21 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * BW_RESTRICT const * BW_RESTRICT x,
@ -535,11 +542,13 @@ public:
size_t nInSamples,
size_t * BW_RESTRICT nOutSamples = nullptr);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float * BW_RESTRICT, N_CHANNELS> x,
std::array<float * BW_RESTRICT, N_CHANNELS> y,
size_t nInSamples,
std::array<size_t, N_CHANNELS> * BW_RESTRICT nOutSamples = nullptr);
#endif
/*! <<<...
* }
* ```
@ -576,12 +585,14 @@ inline void SRCInt<N_CHANNELS>::reset(
bw_src_int_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SRCInt<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void SRCInt<N_CHANNELS>::reset(
@ -590,12 +601,14 @@ inline void SRCInt<N_CHANNELS>::reset(
bw_src_int_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SRCInt<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void SRCInt<N_CHANNELS>::process(
@ -606,6 +619,7 @@ inline void SRCInt<N_CHANNELS>::process(
bw_src_int_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nInSamples, nOutSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SRCInt<N_CHANNELS>::process(
std::array<const float * BW_RESTRICT, N_CHANNELS> x,
@ -614,6 +628,7 @@ inline void SRCInt<N_CHANNELS>::process(
std::array<size_t, N_CHANNELS> * BW_RESTRICT nOutSamples) {
process(x.data(), y.data(), nInSamples, nOutSamples ? nOutSamples->data() : nullptr);
}
#endif
}
#endif

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* State variable filter (2nd order, 12 dB/oct) model with separated lowpass,
@ -28,9 +28,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -1049,7 +1050,9 @@ static inline char bw_svf_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -1072,11 +1075,13 @@ public:
float * BW_RESTRICT yBp0 = nullptr,
float * BW_RESTRICT yHp0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT yLp0,
std::array<float, N_CHANNELS> * BW_RESTRICT yBp0,
std::array<float, N_CHANNELS> * BW_RESTRICT yHp0);
#endif
void reset(
const float * x0,
@ -1084,11 +1089,13 @@ public:
float * yBp0 = nullptr,
float * yHp0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT yLp0 = nullptr,
std::array<float, N_CHANNELS> * BW_RESTRICT yBp0 = nullptr,
std::array<float, N_CHANNELS> * BW_RESTRICT yHp0 = nullptr);
#endif
void process(
const float * const * x,
@ -1097,12 +1104,14 @@ public:
float * const * yHp,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> yLp,
std::array<float *, N_CHANNELS> yBp,
std::array<float *, N_CHANNELS> yHp,
size_t nSamples);
#endif
void setCutoff(
float value);
@ -1204,6 +1213,7 @@ inline void SVF<N_CHANNELS>::reset(
}
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SVF<N_CHANNELS>::reset(
float x0,
@ -1212,6 +1222,7 @@ inline void SVF<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT yHp0) {
reset(x0, yLp0 != nullptr ? yLp0->data() : nullptr, yBp0 != nullptr ? yBp0->data() : nullptr, yHp0 != nullptr ? yHp0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void SVF<N_CHANNELS>::reset(
@ -1223,6 +1234,7 @@ inline void SVF<N_CHANNELS>::reset(
bw_svf_reset_state_multi(&coeffs, statesP, x0, yLp0, yBp0, yHp0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SVF<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
@ -1231,6 +1243,7 @@ inline void SVF<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT yHp0) {
reset(x0.data(), yLp0 != nullptr ? yLp0->data() : nullptr, yBp0 != nullptr ? yBp0->data() : nullptr, yHp0 != nullptr ? yHp0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void SVF<N_CHANNELS>::process(
@ -1242,6 +1255,7 @@ inline void SVF<N_CHANNELS>::process(
bw_svf_process_multi(&coeffs, statesP, x, yLp, yBp, yHp, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void SVF<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -1251,6 +1265,7 @@ inline void SVF<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), yLp.data(), yBp.data(), yHp.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void SVF<N_CHANNELS>::setCutoff(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{
* bw_common bw_math bw_one_pole bw_osc_sin bw_phase_gen bw_ring_mod
* }}}
@ -29,9 +29,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -585,7 +586,9 @@ static inline char bw_trem_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -606,27 +609,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setRate(
float value);
@ -675,12 +684,14 @@ inline void Trem<N_CHANNELS>::reset(
bw_trem_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Trem<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Trem<N_CHANNELS>::reset(
@ -690,12 +701,14 @@ inline void Trem<N_CHANNELS>::reset(
bw_trem_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Trem<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Trem<N_CHANNELS>::process(
@ -705,6 +718,7 @@ inline void Trem<N_CHANNELS>::process(
bw_trem_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Trem<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -712,6 +726,7 @@ inline void Trem<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Trem<N_CHANNELS>::setRate(

View File

@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.0.1 }}}
* version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Wah effect.
@ -29,9 +29,10 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.0.1</strong>:
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code>.</li>
* <li>Now using <code>BW_NULL</code> and
* <code>BW_CXX_NO_ARRAY</code>.</li>
* </ul>
* </li>
* <li>Version <strong>1.0.0</strong>:
@ -561,7 +562,9 @@ static inline char bw_wah_state_is_valid(
#ifdef __cplusplus
}
#include <array>
#ifndef BW_CXX_NO_ARRAY
# include <array>
#endif
namespace Brickworks {
@ -582,27 +585,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
#endif
void reset(
const float * x0,
float * y0 = nullptr);
#ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
void setWah(
float value);
@ -648,12 +657,14 @@ inline void Wah<N_CHANNELS>::reset(
bw_wah_reset_state(&coeffs, states + i, x0);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Wah<N_CHANNELS>::reset(
float x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Wah<N_CHANNELS>::reset(
@ -663,12 +674,14 @@ inline void Wah<N_CHANNELS>::reset(
bw_wah_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Wah<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
#endif
template<size_t N_CHANNELS>
inline void Wah<N_CHANNELS>::process(
@ -678,6 +691,7 @@ inline void Wah<N_CHANNELS>::process(
bw_wah_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
inline void Wah<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
@ -685,6 +699,7 @@ inline void Wah<N_CHANNELS>::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
#endif
template<size_t N_CHANNELS>
inline void Wah<N_CHANNELS>::setWah(