introduce BW_{INCLUDE_WITH_QUOTES,NO_CXX,CXX_NO_EXTERN_C}
This commit is contained in:
parent
324aa911fd
commit
daf0cb3e1c
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* First-order allpass filter (90° shift at cutoff, approaching 180° shift
|
||||
@ -28,8 +28,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_ap1_process()</code> to
|
||||
* <code>bw_ap1_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_ap1_process_multi()</code> to
|
||||
@ -95,9 +98,13 @@
|
||||
#ifndef BW_AP1_H
|
||||
#define BW_AP1_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -285,7 +292,7 @@ static inline char bw_ap1_state_is_valid(
|
||||
* than or equal to that of `bw_ap1_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -294,9 +301,13 @@ static inline char bw_ap1_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_lp1.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_lp1.h"
|
||||
#else
|
||||
# include <bw_lp1.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -631,13 +642,16 @@ static inline char bw_ap1_state_is_valid(
|
||||
return bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : BW_NULL, &state->lp1_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -657,33 +671,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -735,14 +749,14 @@ inline void AP1<N_CHANNELS>::reset(
|
||||
bw_ap1_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void AP1<N_CHANNELS>::reset(
|
||||
@ -752,14 +766,14 @@ inline void AP1<N_CHANNELS>::reset(
|
||||
bw_ap1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void AP1<N_CHANNELS>::process(
|
||||
@ -769,7 +783,7 @@ inline void AP1<N_CHANNELS>::process(
|
||||
bw_ap1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void AP1<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -777,7 +791,7 @@ inline void AP1<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void AP1<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
|
||||
* description {{{
|
||||
* Second-order allpass filter (180° shift at cutoff, approaching 360° shift
|
||||
@ -28,8 +28,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_ap2_process()</code> to
|
||||
* <code>bw_ap2_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_ap2_process_multi()</code> to
|
||||
@ -94,9 +97,13 @@
|
||||
#ifndef BW_AP2_H
|
||||
#define BW_AP2_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -294,7 +301,7 @@ static inline char bw_ap2_state_is_valid(
|
||||
* than or equal to that of `bw_ap2_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -303,9 +310,13 @@ static inline char bw_ap2_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_svf.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_svf.h"
|
||||
#else
|
||||
# include <bw_svf.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -659,13 +670,16 @@ static inline char bw_ap2_state_is_valid(
|
||||
return bw_svf_state_is_valid(coeffs ? &coeffs->svf_coeffs : BW_NULL, &state->svf_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -685,33 +699,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -766,14 +780,14 @@ inline void AP2<N_CHANNELS>::reset(
|
||||
bw_ap2_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void AP2<N_CHANNELS>::reset(
|
||||
@ -783,14 +797,14 @@ inline void AP2<N_CHANNELS>::reset(
|
||||
bw_ap2_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void AP2<N_CHANNELS>::process(
|
||||
@ -800,7 +814,7 @@ inline void AP2<N_CHANNELS>::process(
|
||||
bw_ap2_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void AP2<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -808,7 +822,7 @@ inline void AP2<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void AP2<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,15 +20,18 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* Stereo balance.
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_balance_process()</code> to
|
||||
* <code>bw_balance_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
@ -84,9 +87,13 @@
|
||||
#ifndef BW_BALANCE_H
|
||||
#define BW_BALANCE_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -203,7 +210,7 @@ static inline char bw_balance_coeffs_is_valid(
|
||||
* than or equal to that of `bw_balance_coeffs`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -212,10 +219,15 @@ static inline char bw_balance_coeffs_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_gain.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_gain.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_gain.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -482,13 +494,16 @@ static inline char bw_balance_coeffs_is_valid(
|
||||
return bw_gain_coeffs_is_valid(&coeffs->l_coeffs) && bw_gain_coeffs_is_valid(&coeffs->r_coeffs);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -513,14 +528,14 @@ public:
|
||||
float * const * yR,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void setBalance(
|
||||
float value);
|
||||
@ -564,7 +579,7 @@ inline void Balance<N_CHANNELS>::process(
|
||||
bw_balance_process_multi(&coeffs, xL, xR, yL, yR, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Balance<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> xL,
|
||||
@ -574,7 +589,7 @@ inline void Balance<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(xL.data(), xR.data(), yL.data(), yR.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Balance<N_CHANNELS>::setBalance(
|
||||
|
@ -34,6 +34,9 @@
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added gate parameter.</li>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_bd_reduce_process()</code>
|
||||
* to <code>bw_bd_reduce_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
@ -93,9 +96,13 @@
|
||||
#ifndef BW_BD_REDUCE_H
|
||||
#define BW_BD_REDUCE_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -236,7 +243,7 @@ static inline char bw_bd_reduce_coeffs_is_valid(
|
||||
* than or equal to that of `bw_bd_reduce_coeffs`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -245,9 +252,13 @@ static inline char bw_bd_reduce_coeffs_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -527,13 +538,16 @@ static inline char bw_bd_reduce_coeffs_is_valid(
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -556,12 +570,12 @@ public:
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setBitDepth(
|
||||
char value);
|
||||
@ -612,7 +626,7 @@ inline void BDReduce<N_CHANNELS>::process(
|
||||
bw_bd_reduce_process_multi(&coeffs, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void BDReduce<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -620,7 +634,7 @@ inline void BDReduce<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void BDReduce<N_CHANNELS>::setBitDepth(
|
||||
|
@ -31,6 +31,9 @@
|
||||
* <ul>
|
||||
* <li>Added <code>bw_buf_copy()</code> and
|
||||
* <code>bw_buf_copy_multi()</code>.</li>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging check in
|
||||
* <code>bw_buf_{neg,add,scale,mix,mul}_multi()</code> to ensure
|
||||
* that buffers used for both input and output appear at the same
|
||||
@ -90,9 +93,13 @@
|
||||
#ifndef BW_BUF_H
|
||||
#define BW_BUF_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -258,7 +265,7 @@ static inline void bw_buf_mul_multi(
|
||||
* `n_channels` buffers `dest`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -267,7 +274,7 @@ static inline void bw_buf_mul_multi(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -527,13 +534,16 @@ static inline void bw_buf_mul_multi(
|
||||
bw_buf_mul(src1[i], src2[i], dest[i], n_elems);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -547,13 +557,13 @@ inline void bufFill(
|
||||
float * BW_RESTRICT const * BW_RESTRICT dest,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
/*! <<<```
|
||||
*
|
||||
* ##### Brickworks::bufCopy
|
||||
@ -564,13 +574,13 @@ inline void bufCopy(
|
||||
float * const * dest,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufCopy(
|
||||
const std::array<const float *, N_CHANNELS> src,
|
||||
const std::array<float *, N_CHANNELS> dest,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
/*! <<<```
|
||||
*
|
||||
* ##### Brickworks::bufNeg
|
||||
@ -581,13 +591,13 @@ inline void bufNeg(
|
||||
float * const * dest,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
/*! <<<```
|
||||
*
|
||||
* ##### Brickworks::bufAdd
|
||||
@ -599,14 +609,14 @@ inline void bufAdd(
|
||||
float * const * dest,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
/*! <<<```
|
||||
*
|
||||
* ##### Brickworks::bufScale
|
||||
@ -618,14 +628,14 @@ inline void bufScale(
|
||||
float * const * dest,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
/*! <<<```
|
||||
*
|
||||
* ##### Brickworks::bufMix
|
||||
@ -637,14 +647,14 @@ inline void bufMix(
|
||||
float * const * dest,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
/*! <<<```
|
||||
*
|
||||
* ##### Brickworks::bufMul
|
||||
@ -656,14 +666,14 @@ inline void bufMul(
|
||||
float * const * dest,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
/*! <<<```
|
||||
* }}} */
|
||||
|
||||
@ -680,7 +690,7 @@ inline void bufFill(
|
||||
bw_buf_fill_multi(k, dest, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufFill(
|
||||
float k,
|
||||
@ -688,7 +698,7 @@ inline void bufFill(
|
||||
size_t nSamples) {
|
||||
bufFill<N_CHANNELS>(k, dest.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufCopy(
|
||||
@ -698,7 +708,7 @@ inline void bufCopy(
|
||||
bw_buf_copy_multi(src, dest, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufCopy(
|
||||
const std::array<const float *, N_CHANNELS> src,
|
||||
@ -706,7 +716,7 @@ inline void bufCopy(
|
||||
size_t nSamples) {
|
||||
bufCopy<N_CHANNELS>(src.data(), dest.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufNeg(
|
||||
@ -716,7 +726,7 @@ inline void bufNeg(
|
||||
bw_buf_neg_multi(src, dest, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufNeg(
|
||||
const std::array<const float *, N_CHANNELS> src,
|
||||
@ -724,7 +734,7 @@ inline void bufNeg(
|
||||
size_t nSamples) {
|
||||
bufNeg<N_CHANNELS>(src.data(), dest.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufAdd(
|
||||
@ -735,7 +745,7 @@ inline void bufAdd(
|
||||
bw_buf_add_multi(src, k, dest, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufAdd(
|
||||
const std::array<const float *, N_CHANNELS> src,
|
||||
@ -744,7 +754,7 @@ inline void bufAdd(
|
||||
size_t nSamples) {
|
||||
bufAdd<N_CHANNELS>(src.data(), k, dest.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufScale(
|
||||
@ -755,7 +765,7 @@ inline void bufScale(
|
||||
bw_buf_scale_multi(src, k, dest, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufScale(
|
||||
const std::array<const float *, N_CHANNELS> src,
|
||||
@ -764,7 +774,7 @@ inline void bufScale(
|
||||
size_t nSamples) {
|
||||
bufScale<N_CHANNELS>(src.data(), k, dest.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufMix(
|
||||
@ -775,7 +785,7 @@ inline void bufMix(
|
||||
bw_buf_mix_multi(src1, src2, dest, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufMix(
|
||||
const std::array<const float *, N_CHANNELS> src1,
|
||||
@ -784,7 +794,7 @@ inline void bufMix(
|
||||
size_t nSamples) {
|
||||
bufMix<N_CHANNELS>(src1.data(), src2.data(), dest.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufMul(
|
||||
@ -795,7 +805,7 @@ inline void bufMul(
|
||||
bw_buf_mul_multi(src1, src2, dest, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void bufMul(
|
||||
const std::array<const float *, N_CHANNELS> src1,
|
||||
@ -804,7 +814,7 @@ inline void bufMul(
|
||||
size_t nSamples) {
|
||||
bufMul<N_CHANNELS>(src1.data(), src2.data(), dest.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.0.1 }}}
|
||||
* version {{{ 1.1.0 }}}
|
||||
* requires {{{ bw_common bw_gain bw_math bw_one_pole bw_svf }}}
|
||||
* description {{{
|
||||
* Cab simulator effect.
|
||||
@ -30,8 +30,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.0.1</strong>:
|
||||
* <li>Version <strong>1.1.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_cab_process()</code> to
|
||||
* <code>bw_cab_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_cab_process_multi()</code> to
|
||||
@ -51,9 +54,13 @@
|
||||
#ifndef BW_CAB_H
|
||||
#define BW_CAB_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -238,7 +245,7 @@ static inline char bw_cab_state_is_valid(
|
||||
* than or equal to that of `bw_cab_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -247,10 +254,15 @@ static inline char bw_cab_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_svf.h>
|
||||
#include <bw_gain.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_svf.h"
|
||||
# include "bw_gain.h"
|
||||
#else
|
||||
# include <bw_svf.h>
|
||||
# include <bw_gain.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -656,13 +668,16 @@ static inline char bw_cab_state_is_valid(
|
||||
&& bw_svf_state_is_valid(coeffs ? &coeffs->bph_coeffs : BW_NULL, &state->bph_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -682,33 +697,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoffLow(
|
||||
float value);
|
||||
@ -760,14 +775,14 @@ inline void Cab<N_CHANNELS>::reset(
|
||||
bw_cab_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Cab<N_CHANNELS>::reset(
|
||||
@ -777,14 +792,14 @@ inline void Cab<N_CHANNELS>::reset(
|
||||
bw_cab_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Cab<N_CHANNELS>::process(
|
||||
@ -794,7 +809,7 @@ inline void Cab<N_CHANNELS>::process(
|
||||
bw_cab_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Cab<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -802,7 +817,7 @@ inline void Cab<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Cab<N_CHANNELS>::setCutoffLow(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{
|
||||
* bw_buf bw_comb bw_common bw_delay bw_gain bw_math bw_one_pole bw_osc_sin
|
||||
* bw_phase_gen
|
||||
@ -36,8 +36,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_chorus_process()</code> to
|
||||
* <code>bw_chorus_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_chorus_process_multi()</code>
|
||||
@ -101,9 +104,13 @@
|
||||
#ifndef BW_CHORUS_H
|
||||
#define BW_CHORUS_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -357,7 +364,7 @@ static inline char bw_chorus_state_is_valid(
|
||||
* than or equal to that of `bw_chorus_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -366,11 +373,17 @@ static inline char bw_chorus_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_phase_gen.h>
|
||||
#include <bw_osc_sin.h>
|
||||
#include <bw_comb.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_phase_gen.h"
|
||||
# include "bw_osc_sin.h"
|
||||
# include "bw_comb.h"
|
||||
#else
|
||||
# include <bw_phase_gen.h>
|
||||
# include <bw_osc_sin.h>
|
||||
# include <bw_comb.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -832,13 +845,16 @@ static inline char bw_chorus_state_is_valid(
|
||||
return bw_comb_state_is_valid(coeffs ? &coeffs->comb_coeffs : BW_NULL, &state->comb_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -861,33 +877,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setRate(
|
||||
float value);
|
||||
@ -964,14 +980,14 @@ inline void Chorus<N_CHANNELS>::reset(
|
||||
bw_chorus_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Chorus<N_CHANNELS>::reset(
|
||||
@ -981,14 +997,14 @@ inline void Chorus<N_CHANNELS>::reset(
|
||||
bw_chorus_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Chorus<N_CHANNELS>::process(
|
||||
@ -998,7 +1014,7 @@ inline void Chorus<N_CHANNELS>::process(
|
||||
bw_chorus_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Chorus<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -1006,7 +1022,7 @@ inline void Chorus<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Chorus<N_CHANNELS>::setRate(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* Antialiased hard clipper with parametric bias and gain
|
||||
@ -45,8 +45,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_clip_process()</code> to
|
||||
* <code>bw_clip_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_clip_process_multi()</code>
|
||||
@ -101,9 +104,13 @@
|
||||
#ifndef BW_CLIP_H
|
||||
#define BW_CLIP_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -297,7 +304,7 @@ static inline char bw_clip_state_is_valid(
|
||||
* than or equal to that of `bw_clip_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -306,10 +313,15 @@ static inline char bw_clip_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -743,13 +755,16 @@ static inline char bw_clip_state_is_valid(
|
||||
return bw_is_finite(state->x_z1) && bw_is_finite(state->F_z1);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -769,33 +784,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setBias(
|
||||
float value);
|
||||
@ -847,14 +862,14 @@ inline void Clip<N_CHANNELS>::reset(
|
||||
bw_clip_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Clip<N_CHANNELS>::reset(
|
||||
@ -864,14 +879,14 @@ inline void Clip<N_CHANNELS>::reset(
|
||||
bw_clip_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Clip<N_CHANNELS>::process(
|
||||
@ -881,7 +896,7 @@ inline void Clip<N_CHANNELS>::process(
|
||||
bw_clip_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Clip<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -889,7 +904,7 @@ inline void Clip<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Clip<N_CHANNELS>::setBias(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{
|
||||
* bw_buf bw_common bw_delay bw_gain bw_math bw_one_pole
|
||||
* }}}
|
||||
@ -37,8 +37,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_comb_process()</code> to
|
||||
* <code>bw_comb_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_comb_process_multi()</code>
|
||||
@ -102,9 +105,13 @@
|
||||
#ifndef BW_COMB_H
|
||||
#define BW_COMB_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -344,7 +351,7 @@ static inline char bw_comb_state_is_valid(
|
||||
* than or equal to that of `bw_comb_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -353,12 +360,19 @@ static inline char bw_comb_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_delay.h>
|
||||
#include <bw_gain.h>
|
||||
#include <bw_one_pole.h>
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_delay.h"
|
||||
# include "bw_gain.h"
|
||||
# include "bw_one_pole.h"
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_delay.h>
|
||||
# include <bw_gain.h>
|
||||
# include <bw_one_pole.h>
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -899,13 +913,16 @@ static inline char bw_comb_state_is_valid(
|
||||
return bw_delay_state_is_valid(coeffs ? &coeffs->delay_coeffs : BW_NULL, &state->delay_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -928,33 +945,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setDelayFF(
|
||||
float value);
|
||||
@ -1028,14 +1045,14 @@ inline void Comb<N_CHANNELS>::reset(
|
||||
bw_comb_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Comb<N_CHANNELS>::reset(
|
||||
@ -1045,14 +1062,14 @@ inline void Comb<N_CHANNELS>::reset(
|
||||
bw_comb_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Comb<N_CHANNELS>::process(
|
||||
@ -1062,7 +1079,7 @@ inline void Comb<N_CHANNELS>::process(
|
||||
bw_comb_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Comb<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -1070,7 +1087,7 @@ inline void Comb<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Comb<N_CHANNELS>::setDelayFF(
|
||||
|
@ -20,15 +20,19 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ foundation }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* description {{{
|
||||
* A common header to make sure that a bunch of basic definitions are
|
||||
* available and consistent for all Brickworks modules.
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Allowed custom definitions of <code>BW_NULL</code>.</li>
|
||||
* <li>Accomodate MSVC reporting incorrect C++ standard support.</li>
|
||||
* </ul>
|
||||
* <li>Version <strong>1.1.0</strong>:
|
||||
@ -98,17 +102,37 @@
|
||||
|
||||
/*** Public API ***/
|
||||
|
||||
#ifdef __cplusplus
|
||||
# if __cplusplus < 201103L
|
||||
# if _MSC_VER
|
||||
# pragma message("Detected MSVC compiler reporting not to support C++11. Please use /Zc:__cplusplus if possible, or otherwise ignore this message if everything works for you. See https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ for more information.")
|
||||
# else
|
||||
# error Detected C++ compiler that does not support C++11
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*! api {{{
|
||||
*
|
||||
* #### BW_INCLUDE_WITH_QUOTES
|
||||
*
|
||||
* Normally Brickworks modules include other such modules using angle
|
||||
* brackets.
|
||||
*
|
||||
* If you would rather prefer that to happen using double quotes, you can
|
||||
* define `BW_INCLUDE_WITH_QUOTES`.
|
||||
*
|
||||
* #### BW_NO_CXX
|
||||
*
|
||||
* If `BW_NO_CXX` is defined, the C++ APIs and implementations in Brickworks
|
||||
* modules are not included.
|
||||
*
|
||||
* #### BW_CXX_NO_EXTERN_C
|
||||
*
|
||||
* Normally, the C APIs and implementations in Brickworks modules are
|
||||
* included in <code>extern "C"</code> blocks when using a C++ compiler, even
|
||||
* if <code>BW_NO_CXX</code> is defined.
|
||||
*
|
||||
* If you don't want to have them included in such blocks, you can define
|
||||
* `BW_CXX_NO_EXTERN_C`.
|
||||
*
|
||||
* #### 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.
|
||||
*
|
||||
* #### Basic definitions
|
||||
*
|
||||
@ -129,20 +153,32 @@
|
||||
* * if `BW_NO_STDLIB` or `BW_NO_MATH_H` is defined, then `math.h` is not
|
||||
* `#include`d.
|
||||
*
|
||||
* A `BW_NULL` macro is defined whose value is either `NULL` (C) or `nullptr`
|
||||
* (C++).
|
||||
* If not already defined, a `BW_NULL` macro is defined whose value is either
|
||||
* `NULL` (C or C++ disabled) or `nullptr` (C++).
|
||||
* >>> */
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
# if __cplusplus < 201103L
|
||||
# if _MSC_VER
|
||||
# pragma message("Detected MSVC compiler reporting not to support C++11. Please use /Zc:__cplusplus if possible, or otherwise ignore this message if everything works for you. See https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ for more information.")
|
||||
# else
|
||||
# error Detected C++ compiler that does not support C++11
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_STDLIB) && !defined(BW_NO_STDDEF_H)
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef BW_NULL
|
||||
# if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
# define BW_NULL nullptr
|
||||
#else
|
||||
# else
|
||||
# ifndef NULL
|
||||
# error NULL not defined
|
||||
# endif
|
||||
# define BW_NULL NULL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_STDLIB) && !defined(BW_NO_STDINT_H)
|
||||
@ -166,14 +202,6 @@
|
||||
# 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
|
||||
*
|
||||
@ -238,7 +266,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -302,7 +330,7 @@ static inline uint32_t bw_hash_sdbm(
|
||||
* Returns the sdbm hash of the given `string`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -311,7 +339,7 @@ static inline uint32_t bw_hash_sdbm(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -371,7 +399,7 @@ static inline uint32_t bw_hash_sdbm(
|
||||
return hash;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{
|
||||
* bw_common bw_env_follow bw_gain bw_math bw_one_pole
|
||||
* }}}
|
||||
@ -29,8 +29,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_comp_process()</code> to
|
||||
* <code>bw_comp_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_comp_process_multi()</code>
|
||||
@ -103,9 +106,13 @@
|
||||
#ifndef BW_COMP_H
|
||||
#define BW_COMP_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -357,7 +364,7 @@ static inline char bw_comp_state_is_valid(
|
||||
* than or equal to that of `bw_comp_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -366,12 +373,19 @@ static inline char bw_comp_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_env_follow.h>
|
||||
#include <bw_gain.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_env_follow.h"
|
||||
# include "bw_gain.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_env_follow.h>
|
||||
# include <bw_gain.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -867,13 +881,16 @@ static inline char bw_comp_state_is_valid(
|
||||
return bw_env_follow_state_is_valid(coeffs ? &coeffs->env_follow_coeffs : BW_NULL, &state->env_follow_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -894,24 +911,24 @@ public:
|
||||
float xSc0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
float xSc0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
const float * xSc0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
@ -919,13 +936,13 @@ public:
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
// >> the following 2 methods only exist because of a typo, don't use
|
||||
void setTreshLin(
|
||||
@ -998,7 +1015,7 @@ inline void Comp<N_CHANNELS>::reset(
|
||||
bw_comp_reset_state(&coeffs, states + i, x0, xSc0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Comp<N_CHANNELS>::reset(
|
||||
float x0,
|
||||
@ -1006,7 +1023,7 @@ inline void Comp<N_CHANNELS>::reset(
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
|
||||
reset(x0, xSc0, y0 != nullptr ? y0->data() : nullptr);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Comp<N_CHANNELS>::reset(
|
||||
@ -1017,7 +1034,7 @@ inline void Comp<N_CHANNELS>::reset(
|
||||
bw_comp_reset_state_multi(&coeffs, statesP, x0, xSc0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Comp<N_CHANNELS>::reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
@ -1025,7 +1042,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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Comp<N_CHANNELS>::process(
|
||||
@ -1036,7 +1053,7 @@ inline void Comp<N_CHANNELS>::process(
|
||||
bw_comp_process_multi(&coeffs, statesP, x, xSc, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Comp<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -1045,7 +1062,7 @@ inline void Comp<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), xSc.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Comp<N_CHANNELS>::setTreshLin(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_buf bw_common bw_math }}}
|
||||
* description {{{
|
||||
* Interpolated delay line, not smoothed.
|
||||
@ -31,8 +31,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_delay_process()</code> to
|
||||
* <code>bw_delay_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_delay_process_multi()</code>
|
||||
@ -97,9 +100,13 @@
|
||||
#ifndef BW_DELAY_H
|
||||
#define BW_DELAY_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -314,7 +321,7 @@ static inline char bw_delay_state_is_valid(
|
||||
* than or equal to that of `bw_delay_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -323,10 +330,15 @@ static inline char bw_delay_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_buf.h>
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_buf.h"
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_buf.h>
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -798,13 +810,16 @@ static inline char bw_delay_state_is_valid(
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -827,33 +842,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setDelay(
|
||||
float value);
|
||||
@ -916,14 +931,14 @@ inline void Delay<N_CHANNELS>::reset(
|
||||
bw_delay_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Delay<N_CHANNELS>::reset(
|
||||
@ -933,14 +948,14 @@ inline void Delay<N_CHANNELS>::reset(
|
||||
bw_delay_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Delay<N_CHANNELS>::process(
|
||||
@ -950,7 +965,7 @@ inline void Delay<N_CHANNELS>::process(
|
||||
bw_delay_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Delay<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -958,7 +973,7 @@ inline void Delay<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Delay<N_CHANNELS>::setDelay(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.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,8 +32,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_dist_process()</code> to
|
||||
* <code>bw_dist_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_dist_process_multi()</code>
|
||||
@ -88,9 +91,13 @@
|
||||
#ifndef BW_DIST_H
|
||||
#define BW_DIST_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -275,7 +282,7 @@ static inline char bw_dist_state_is_valid(
|
||||
* than or equal to that of `bw_dist_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -284,14 +291,23 @@ static inline char bw_dist_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_hp1.h>
|
||||
#include <bw_peak.h>
|
||||
#include <bw_clip.h>
|
||||
#include <bw_satur.h>
|
||||
#include <bw_lp1.h>
|
||||
#include <bw_gain.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_hp1.h"
|
||||
# include "bw_peak.h"
|
||||
# include "bw_clip.h"
|
||||
# include "bw_satur.h"
|
||||
# include "bw_lp1.h"
|
||||
# include "bw_gain.h"
|
||||
#else
|
||||
# include <bw_hp1.h>
|
||||
# include <bw_peak.h>
|
||||
# include <bw_clip.h>
|
||||
# include <bw_satur.h>
|
||||
# include <bw_lp1.h>
|
||||
# include <bw_gain.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -682,13 +698,16 @@ static inline char bw_dist_state_is_valid(
|
||||
&& bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : BW_NULL, &state->lp1_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -708,33 +727,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setDistortion(
|
||||
float value);
|
||||
@ -786,14 +805,14 @@ inline void Dist<N_CHANNELS>::reset(
|
||||
bw_dist_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Dist<N_CHANNELS>::reset(
|
||||
@ -803,14 +822,14 @@ inline void Dist<N_CHANNELS>::reset(
|
||||
bw_dist_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Dist<N_CHANNELS>::process(
|
||||
@ -820,7 +839,7 @@ inline void Dist<N_CHANNELS>::process(
|
||||
bw_dist_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Dist<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -828,7 +847,7 @@ inline void Dist<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Dist<N_CHANNELS>::setDistortion(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{
|
||||
* bw_common bw_gain bw_hs1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
|
||||
* bw_satur bw_svf
|
||||
@ -32,8 +32,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_drive_process()</code> to
|
||||
* <code>bw_drive_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_drive_process_multi()</code>
|
||||
@ -89,9 +92,13 @@
|
||||
#ifndef BW_DRIVE_H
|
||||
#define BW_DRIVE_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -276,7 +283,7 @@ static inline char bw_drive_state_is_valid(
|
||||
* than or equal to that of `bw_drive_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -285,14 +292,23 @@ static inline char bw_drive_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_svf.h>
|
||||
#include <bw_hs1.h>
|
||||
#include <bw_peak.h>
|
||||
#include <bw_satur.h>
|
||||
#include <bw_lp1.h>
|
||||
#include <bw_gain.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_svf.h"
|
||||
# include "bw_hs1.h"
|
||||
# include "bw_peak.h"
|
||||
# include "bw_satur.h"
|
||||
# include "bw_lp1.h"
|
||||
# include "bw_gain.h"
|
||||
#else
|
||||
# include <bw_svf.h>
|
||||
# include <bw_hs1.h>
|
||||
# include <bw_peak.h>
|
||||
# include <bw_satur.h>
|
||||
# include <bw_lp1.h>
|
||||
# include <bw_gain.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -685,13 +701,16 @@ static inline char bw_drive_state_is_valid(
|
||||
&& bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : BW_NULL, &state->lp1_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -711,33 +730,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setDrive(
|
||||
float value);
|
||||
@ -789,14 +808,14 @@ inline void Drive<N_CHANNELS>::reset(
|
||||
bw_drive_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Drive<N_CHANNELS>::reset(
|
||||
@ -806,14 +825,14 @@ inline void Drive<N_CHANNELS>::reset(
|
||||
bw_drive_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Drive<N_CHANNELS>::process(
|
||||
@ -823,7 +842,7 @@ inline void Drive<N_CHANNELS>::process(
|
||||
bw_drive_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Drive<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -831,7 +850,7 @@ inline void Drive<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Drive<N_CHANNELS>::setDrive(
|
||||
|
@ -29,6 +29,9 @@
|
||||
* <ul>
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_dry_wet_process()</code> to
|
||||
* <code>bw_dry_wet_process_multi()</code>.</li>
|
||||
* <li>Added <code>bw_dry_wet_get_wet()</code> and
|
||||
@ -79,9 +82,13 @@
|
||||
#ifndef BW_DRY_WET_H
|
||||
#define BW_DRY_WET_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -219,7 +226,7 @@ static inline char bw_dry_wet_coeffs_is_valid(
|
||||
* than or equal to that of `bw_dry_wet_coeffs`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -228,9 +235,13 @@ static inline char bw_dry_wet_coeffs_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_gain.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_gain.h"
|
||||
#else
|
||||
# include <bw_gain.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -475,13 +486,16 @@ static inline char bw_dry_wet_coeffs_is_valid(
|
||||
return bw_gain_coeffs_is_valid(&coeffs->gain_coeffs);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -505,13 +519,13 @@ public:
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void setWet(
|
||||
float value);
|
||||
@ -561,7 +575,7 @@ inline void DryWet<N_CHANNELS>::process(
|
||||
bw_dry_wet_process_multi(&coeffs, xDry, xWet, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void DryWet<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> xDry,
|
||||
@ -570,7 +584,7 @@ inline void DryWet<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(xDry.data(), xWet.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void DryWet<N_CHANNELS>::setWet(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* Envelope follower made of a full-wave rectifier followed by
|
||||
@ -28,8 +28,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_env_follow_process()</code>
|
||||
* to <code>bw_env_follow_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
@ -100,9 +103,13 @@
|
||||
#ifndef BW_ENV_FOLLOW_H
|
||||
#define BW_ENV_FOLLOW_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -287,7 +294,7 @@ static inline char bw_env_follow_state_is_valid(
|
||||
* than or equal to that of `bw_env_follow_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -296,10 +303,15 @@ static inline char bw_env_follow_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -644,13 +656,16 @@ static inline char bw_env_follow_state_is_valid(
|
||||
return bw_one_pole_state_is_valid(coeffs ? &coeffs->one_pole_coeffs : BW_NULL, &state->one_pole_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -670,33 +685,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setAttackTau(
|
||||
float value);
|
||||
@ -748,14 +763,14 @@ inline void EnvFollow<N_CHANNELS>::reset(
|
||||
bw_env_follow_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void EnvFollow<N_CHANNELS>::reset(
|
||||
@ -765,14 +780,14 @@ inline void EnvFollow<N_CHANNELS>::reset(
|
||||
bw_env_follow_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void EnvFollow<N_CHANNELS>::process(
|
||||
@ -782,7 +797,7 @@ inline void EnvFollow<N_CHANNELS>::process(
|
||||
bw_env_follow_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void EnvFollow<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -790,7 +805,7 @@ inline void EnvFollow<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void EnvFollow<N_CHANNELS>::setAttackTau(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* Linear ADSR envelope generator.
|
||||
@ -40,8 +40,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>More robust implementation.</li>
|
||||
* <li>Fixed <code>bw_env_reset_state()</code> and
|
||||
* <code>bw_env_reset_state_multi()</code> to take into account
|
||||
@ -133,9 +136,13 @@
|
||||
#ifndef BW_ENV_GEN_H
|
||||
#define BW_ENV_GEN_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -396,7 +403,7 @@ static inline char bw_env_gen_state_is_valid(
|
||||
* than or equal to that of `bw_env_gen_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -405,10 +412,15 @@ static inline char bw_env_gen_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -949,13 +961,16 @@ static inline char bw_env_gen_state_is_valid(
|
||||
#undef BW_ENV_GEN_PARAM_RELEASE
|
||||
#undef BW_ENV_GEN_V_MAX
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -975,33 +990,33 @@ public:
|
||||
char gate0 = 0,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
char gate0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const char * BW_RESTRICT gate0,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<char, N_CHANNELS> gate0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const char * BW_RESTRICT gate,
|
||||
float * BW_RESTRICT const * BW_RESTRICT y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void setAttack(
|
||||
float value);
|
||||
@ -1068,14 +1083,14 @@ inline void EnvGen<N_CHANNELS>::reset(
|
||||
bw_env_gen_reset_state(&coeffs, states + i, gate0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void EnvGen<N_CHANNELS>::reset(
|
||||
@ -1085,14 +1100,14 @@ inline void EnvGen<N_CHANNELS>::reset(
|
||||
bw_env_gen_reset_state_multi(&coeffs, statesP, gate0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void EnvGen<N_CHANNELS>::process(
|
||||
@ -1102,7 +1117,7 @@ inline void EnvGen<N_CHANNELS>::process(
|
||||
bw_env_gen_process_multi(&coeffs, statesP, gate, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void EnvGen<N_CHANNELS>::process(
|
||||
std::array<char, N_CHANNELS> gate,
|
||||
@ -1110,7 +1125,7 @@ inline void EnvGen<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(gate.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void EnvGen<N_CHANNELS>::setAttack(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{
|
||||
* bw_common bw_gain bw_hp1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
|
||||
* bw_satur bw_svf
|
||||
@ -32,8 +32,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_fuzz_process()</code> to
|
||||
* <code>bw_fuzz_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_fuzz_process_multi()</code>
|
||||
@ -89,9 +92,13 @@
|
||||
#ifndef BW_FUZZ_H
|
||||
#define BW_FUZZ_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -264,7 +271,7 @@ static inline char bw_fuzz_state_is_valid(
|
||||
* than or equal to that of `bw_fuzz_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -273,14 +280,23 @@ static inline char bw_fuzz_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_hp1.h>
|
||||
#include <bw_svf.h>
|
||||
#include <bw_peak.h>
|
||||
#include <bw_satur.h>
|
||||
#include <bw_hp1.h>
|
||||
#include <bw_gain.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_hp1.h"
|
||||
# include "bw_svf.h"
|
||||
# include "bw_peak.h"
|
||||
# include "bw_satur.h"
|
||||
# include "bw_hp1.h"
|
||||
# include "bw_gain.h"
|
||||
#else
|
||||
# include <bw_hp1.h>
|
||||
# include <bw_svf.h>
|
||||
# include <bw_peak.h>
|
||||
# include <bw_satur.h>
|
||||
# include <bw_hp1.h>
|
||||
# include <bw_gain.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -657,13 +673,16 @@ static inline char bw_fuzz_state_is_valid(
|
||||
&& bw_hp1_state_is_valid(coeffs ? &coeffs->hp1_out_coeffs : BW_NULL, &state->hp1_out_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -683,33 +702,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setFuzz(
|
||||
float value);
|
||||
@ -758,14 +777,14 @@ inline void Fuzz<N_CHANNELS>::reset(
|
||||
bw_fuzz_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Fuzz<N_CHANNELS>::reset(
|
||||
@ -775,14 +794,14 @@ inline void Fuzz<N_CHANNELS>::reset(
|
||||
bw_fuzz_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Fuzz<N_CHANNELS>::process(
|
||||
@ -792,7 +811,7 @@ inline void Fuzz<N_CHANNELS>::process(
|
||||
bw_fuzz_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Fuzz<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -800,7 +819,7 @@ inline void Fuzz<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Fuzz<N_CHANNELS>::setFuzz(
|
||||
|
@ -20,15 +20,18 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* Gain.
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_ap1_process()</code> to
|
||||
* <code>bw_ap1_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_gain_process_multi()</code>
|
||||
@ -98,9 +101,13 @@
|
||||
#ifndef BW_GAIN_H
|
||||
#define BW_GAIN_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -246,7 +253,7 @@ static inline char bw_gain_coeffs_is_valid(
|
||||
* than or equal to that of `bw_gain_coeffs`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -255,10 +262,15 @@ static inline char bw_gain_coeffs_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -525,13 +537,16 @@ static inline char bw_gain_coeffs_is_valid(
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -554,12 +569,12 @@ public:
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setGainLin(
|
||||
float value);
|
||||
@ -611,7 +626,7 @@ inline void Gain<N_CHANNELS>::process(
|
||||
bw_gain_process_multi(&coeffs, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Gain<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -619,7 +634,7 @@ inline void Gain<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Gain<N_CHANNELS>::setGainLin(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* First-order highpass filter (6 dB/oct) with gain asymptotically
|
||||
@ -28,8 +28,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_hp1_process()</code> to
|
||||
* <code>bw_hp1_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_hp1_process_multi()</code> to
|
||||
@ -94,9 +97,13 @@
|
||||
#ifndef BW_HP1_H
|
||||
#define BW_HP1_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -282,7 +289,7 @@ static inline char bw_hp1_state_is_valid(
|
||||
* than or equal to that of `bw_hp1_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -291,9 +298,13 @@ static inline char bw_hp1_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_lp1.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_lp1.h"
|
||||
#else
|
||||
# include <bw_lp1.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -627,13 +638,16 @@ static inline char bw_hp1_state_is_valid(
|
||||
return bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : BW_NULL, &state->lp1_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -653,33 +667,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -731,14 +745,14 @@ inline void HP1<N_CHANNELS>::reset(
|
||||
bw_hp1_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HP1<N_CHANNELS>::reset(
|
||||
@ -748,14 +762,14 @@ inline void HP1<N_CHANNELS>::reset(
|
||||
bw_hp1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HP1<N_CHANNELS>::process(
|
||||
@ -765,7 +779,7 @@ inline void HP1<N_CHANNELS>::process(
|
||||
bw_hp1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HP1<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -773,7 +787,7 @@ inline void HP1<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HP1<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,15 +20,18 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.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.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Enforced limits on cutoff and high_gain also in
|
||||
* <code>bw_hs1_reset_state*()</code> and clarified
|
||||
* documentation.</li>
|
||||
@ -98,9 +101,13 @@
|
||||
#ifndef BW_HS1_H
|
||||
#define BW_HS1_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -324,7 +331,7 @@ static inline char bw_hs1_state_is_valid(
|
||||
* than or equal to that of `bw_hs1_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -333,10 +340,15 @@ static inline char bw_hs1_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_mm1.h>
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_mm1.h"
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_mm1.h>
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -750,13 +762,16 @@ static inline char bw_hs1_state_is_valid(
|
||||
return bw_mm1_state_is_valid(coeffs ? &coeffs->mm1_coeffs : BW_NULL, &state->mm1_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -776,33 +791,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -860,14 +875,14 @@ inline void HS1<N_CHANNELS>::reset(
|
||||
bw_hs1_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HS1<N_CHANNELS>::reset(
|
||||
@ -877,14 +892,14 @@ inline void HS1<N_CHANNELS>::reset(
|
||||
bw_hs1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HS1<N_CHANNELS>::process(
|
||||
@ -894,7 +909,7 @@ inline void HS1<N_CHANNELS>::process(
|
||||
bw_hs1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HS1<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -902,7 +917,7 @@ inline void HS1<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HS1<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,15 +20,18 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.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.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Enforced limits on cutoff and high_gain also in
|
||||
* <code>bw_hs2_reset_state*()</code> and clarified
|
||||
* documentation.</li>
|
||||
@ -102,9 +105,13 @@
|
||||
#ifndef BW_HS2_H
|
||||
#define BW_HS2_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -340,7 +347,7 @@ static inline char bw_hs2_state_is_valid(
|
||||
* than or equal to that of `bw_hs2_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -349,10 +356,15 @@ static inline char bw_hs2_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_mm2.h>
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_mm2.h"
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_mm2.h>
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -805,13 +817,16 @@ static inline char bw_hs2_state_is_valid(
|
||||
#undef BW_HS2_PARAM_CUTOFF
|
||||
#undef BW_HS2_PARAM_HIGH_GAIN
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -831,33 +846,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -918,14 +933,14 @@ inline void HS2<N_CHANNELS>::reset(
|
||||
bw_hs2_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HS2<N_CHANNELS>::reset(
|
||||
@ -935,14 +950,14 @@ inline void HS2<N_CHANNELS>::reset(
|
||||
bw_hs2_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HS2<N_CHANNELS>::process(
|
||||
@ -952,7 +967,7 @@ inline void HS2<N_CHANNELS>::process(
|
||||
bw_hs2_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HS2<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -960,7 +975,7 @@ inline void HS2<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void HS2<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* First-order lowpass filter (6 dB/oct) with unitary DC gain.
|
||||
@ -30,8 +30,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_lp1_process()</code> to
|
||||
* <code>bw_lp1_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_lp1_process_multi()</code> to
|
||||
@ -95,9 +98,13 @@
|
||||
#ifndef BW_LP1_H
|
||||
#define BW_LP1_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -283,7 +290,7 @@ static inline char bw_lp1_state_is_valid(
|
||||
* than or equal to that of `bw_lp1_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -292,10 +299,15 @@ static inline char bw_lp1_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -712,13 +724,16 @@ static inline char bw_lp1_state_is_valid(
|
||||
return bw_is_finite(state->y_z1) && bw_is_finite(state->X_z1);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -738,33 +753,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -816,14 +831,14 @@ inline void LP1<N_CHANNELS>::reset(
|
||||
bw_lp1_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LP1<N_CHANNELS>::reset(
|
||||
@ -833,14 +848,14 @@ inline void LP1<N_CHANNELS>::reset(
|
||||
bw_lp1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LP1<N_CHANNELS>::process(
|
||||
@ -850,7 +865,7 @@ inline void LP1<N_CHANNELS>::process(
|
||||
bw_lp1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LP1<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -858,7 +873,7 @@ inline void LP1<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LP1<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.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,8 +28,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Enforced limits on cutoff and dc_gain also in
|
||||
* <code>bw_ls1_reset_state*()</code> and clarified
|
||||
* documentation.</li>
|
||||
@ -99,9 +102,13 @@
|
||||
#ifndef BW_LS1_H
|
||||
#define BW_LS1_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -323,7 +330,7 @@ static inline char bw_ls1_state_is_valid(
|
||||
* than or equal to that of `bw_ls1_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -332,10 +339,15 @@ static inline char bw_ls1_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_mm1.h>
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_mm1.h"
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_mm1.h>
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -748,13 +760,16 @@ static inline char bw_ls1_state_is_valid(
|
||||
return bw_mm1_state_is_valid(coeffs ? &coeffs->mm1_coeffs : BW_NULL, &state->mm1_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -774,33 +789,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -858,14 +873,14 @@ inline void LS1<N_CHANNELS>::reset(
|
||||
bw_ls1_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LS1<N_CHANNELS>::reset(
|
||||
@ -875,14 +890,14 @@ inline void LS1<N_CHANNELS>::reset(
|
||||
bw_ls1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LS1<N_CHANNELS>::process(
|
||||
@ -892,7 +907,7 @@ inline void LS1<N_CHANNELS>::process(
|
||||
bw_ls1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LS1<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -900,7 +915,7 @@ inline void LS1<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LS1<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.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,8 +28,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Enforced limits on cutoff and dc_gain also in
|
||||
* <code>bw_ls2_reset_state*()</code> and clarified
|
||||
* documentation.</li>
|
||||
@ -107,9 +110,13 @@
|
||||
#ifndef BW_LS2_H
|
||||
#define BW_LS2_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -346,7 +353,7 @@ static inline char bw_ls2_state_is_valid(
|
||||
* than or equal to that of `bw_ls2_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -355,10 +362,15 @@ static inline char bw_ls2_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_mm2.h>
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_mm2.h"
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_mm2.h>
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -811,13 +823,16 @@ static inline char bw_ls2_state_is_valid(
|
||||
#undef BW_LS2_PARAM_CUTOFF
|
||||
#undef BW_LS2_PARAM_DC_GAIN
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -837,33 +852,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -924,14 +939,14 @@ inline void LS2<N_CHANNELS>::reset(
|
||||
bw_ls2_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LS2<N_CHANNELS>::reset(
|
||||
@ -941,14 +956,14 @@ inline void LS2<N_CHANNELS>::reset(
|
||||
bw_ls2_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LS2<N_CHANNELS>::process(
|
||||
@ -958,7 +973,7 @@ inline void LS2<N_CHANNELS>::process(
|
||||
bw_ls2_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LS2<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -966,7 +981,7 @@ inline void LS2<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void LS2<N_CHANNELS>::setCutoff(
|
||||
|
@ -50,6 +50,8 @@
|
||||
* <code>bw_maxi64</code>, <code>bw_clipi64</code>,
|
||||
* <code>bw_minu64</code>, <code>bw_maxu64</code>, and
|
||||
* <code>bw_clipu64</code>.</li>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code> and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Version <strong>1.0.1</strong>:
|
||||
@ -129,9 +131,13 @@
|
||||
#ifndef BW_MATH_H
|
||||
#define BW_MATH_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -618,7 +624,7 @@ static inline float bw_acoshf(
|
||||
* Absolute error < 0.004 or relative error < 0.8%, whatever is worse.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -627,7 +633,7 @@ static inline float bw_acoshf(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -1102,7 +1108,7 @@ static inline float bw_acoshf(
|
||||
return y;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -20,15 +20,18 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* First-order multimode filter.
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_mm1_process()</code> to
|
||||
* <code>bw_mm1_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_mm1_process_multi()</code> to
|
||||
@ -94,9 +97,13 @@
|
||||
#ifndef BW_MM1_H
|
||||
#define BW_MM1_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -305,7 +312,7 @@ static inline char bw_mm1_state_is_valid(
|
||||
* than or equal to that of `bw_mm1_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -314,10 +321,15 @@ static inline char bw_mm1_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_lp1.h>
|
||||
#include <bw_gain.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_lp1.h"
|
||||
# include "bw_gain.h"
|
||||
#else
|
||||
# include <bw_lp1.h>
|
||||
# include <bw_gain.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -698,13 +710,16 @@ static inline char bw_mm1_state_is_valid(
|
||||
return bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : BW_NULL, &state->lp1_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -724,33 +739,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -808,14 +823,14 @@ inline void MM1<N_CHANNELS>::reset(
|
||||
bw_mm1_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void MM1<N_CHANNELS>::reset(
|
||||
@ -825,14 +840,14 @@ inline void MM1<N_CHANNELS>::reset(
|
||||
bw_mm1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void MM1<N_CHANNELS>::process(
|
||||
@ -842,7 +857,7 @@ inline void MM1<N_CHANNELS>::process(
|
||||
bw_mm1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void MM1<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -850,7 +865,7 @@ inline void MM1<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void MM1<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,15 +20,18 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_gain bw_math bw_one_pole bw_svf }}}
|
||||
* description {{{
|
||||
* Second-order multimode filter.
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_mm2_process()</code> to
|
||||
* <code>bw_mm2_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_mm2_process_multi()</code> to
|
||||
@ -94,9 +97,13 @@
|
||||
#ifndef BW_MM2_H
|
||||
#define BW_MM2_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -342,7 +349,7 @@ static inline char bw_mm2_state_is_valid(
|
||||
* than or equal to that of `bw_mm2_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -351,10 +358,15 @@ static inline char bw_mm2_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_svf.h>
|
||||
#include <bw_gain.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_svf.h"
|
||||
# include "bw_gain.h"
|
||||
#else
|
||||
# include <bw_svf.h>
|
||||
# include <bw_gain.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -806,13 +818,16 @@ static inline char bw_mm2_state_is_valid(
|
||||
return bw_svf_state_is_valid(coeffs ? &coeffs->svf_coeffs : BW_NULL, &state->svf_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -832,33 +847,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -925,14 +940,14 @@ inline void MM2<N_CHANNELS>::reset(
|
||||
bw_mm2_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void MM2<N_CHANNELS>::reset(
|
||||
@ -942,14 +957,14 @@ inline void MM2<N_CHANNELS>::reset(
|
||||
bw_mm2_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void MM2<N_CHANNELS>::process(
|
||||
@ -959,7 +974,7 @@ inline void MM2<N_CHANNELS>::process(
|
||||
bw_mm2_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void MM2<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -967,7 +982,7 @@ inline void MM2<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void MM2<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,15 +20,18 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.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.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_noise_gate_process()</code>
|
||||
* to <code>bw_noise_gate_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
@ -100,9 +103,13 @@
|
||||
#ifndef BW_NOISE_GATE_H
|
||||
#define BW_NOISE_GATE_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -330,7 +337,7 @@ static inline char bw_noise_gate_state_is_valid(
|
||||
* than or equal to that of `bw_noise_gate_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -339,11 +346,17 @@ static inline char bw_noise_gate_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_env_follow.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_env_follow.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_env_follow.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -798,13 +811,16 @@ static inline char bw_noise_gate_state_is_valid(
|
||||
return bw_env_follow_state_is_valid(coeffs ? &coeffs->env_follow_coeffs : BW_NULL, &state->env_follow_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -825,24 +841,24 @@ public:
|
||||
float xSc0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
float xSc0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
const float * xSc0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
@ -850,13 +866,13 @@ public:
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
// >> the following 2 methods only exist because of a typo, don't use
|
||||
void setTreshLin(
|
||||
@ -923,7 +939,7 @@ inline void NoiseGate<N_CHANNELS>::reset(
|
||||
bw_noise_gate_reset_state(&coeffs, states + i, x0, xSc0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void NoiseGate<N_CHANNELS>::reset(
|
||||
float x0,
|
||||
@ -931,7 +947,7 @@ inline void NoiseGate<N_CHANNELS>::reset(
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
|
||||
reset(x0, xSc0, y0 != nullptr ? y0->data() : nullptr);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void NoiseGate<N_CHANNELS>::reset(
|
||||
@ -942,7 +958,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
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void NoiseGate<N_CHANNELS>::reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
@ -950,7 +966,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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void NoiseGate<N_CHANNELS>::process(
|
||||
@ -961,7 +977,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
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void NoiseGate<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -970,7 +986,7 @@ inline void NoiseGate<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), xSc.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void NoiseGate<N_CHANNELS>::setTreshLin(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.0 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_rand }}}
|
||||
* description {{{
|
||||
* Generator of white noise with uniform distribution.
|
||||
@ -30,7 +30,13 @@
|
||||
* [bw\_rand](bw_rand)).
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Version <strong>1.1.0</strong>:
|
||||
* <ul>
|
||||
* <li>Now using <code>BW_NULL</code> and
|
||||
@ -82,9 +88,13 @@
|
||||
#ifndef BW_NOISE_GEN_H
|
||||
#define BW_NOISE_GEN_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -209,7 +219,7 @@ static inline char bw_noise_gen_coeffs_is_valid(
|
||||
* than or equal to that of `bw_noise_gen_coeffs`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -218,10 +228,15 @@ static inline char bw_noise_gen_coeffs_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_rand.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_rand.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_rand.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -432,13 +447,16 @@ static inline char bw_noise_gen_coeffs_is_valid(
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -461,11 +479,11 @@ public:
|
||||
float * BW_RESTRICT const * BW_RESTRICT y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<float * BW_RESTRICT, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setSampleRateScaling(
|
||||
bool value);
|
||||
@ -509,14 +527,14 @@ inline void NoiseGen<N_CHANNELS>::process(
|
||||
bw_noise_gen_process_multi(&coeffs, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void NoiseGen<N_CHANNELS>::setSampleRateScaling(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.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,8 +28,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_notch_process()</code> to
|
||||
* <code>bw_notch_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_notch_process_multi()</code>
|
||||
@ -94,9 +97,13 @@
|
||||
#ifndef BW_NOTCH_H
|
||||
#define BW_NOTCH_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -294,7 +301,7 @@ static inline char bw_notch_state_is_valid(
|
||||
* than or equal to that of `bw_notch_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -303,9 +310,13 @@ static inline char bw_notch_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_svf.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_svf.h"
|
||||
#else
|
||||
# include <bw_svf.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -657,13 +668,16 @@ static inline char bw_notch_state_is_valid(
|
||||
return bw_svf_state_is_valid(coeffs ? &coeffs->svf_coeffs : BW_NULL, &state->svf_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -683,33 +697,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -764,14 +778,14 @@ inline void Notch<N_CHANNELS>::reset(
|
||||
bw_notch_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Notch<N_CHANNELS>::reset(
|
||||
@ -781,14 +795,14 @@ inline void Notch<N_CHANNELS>::reset(
|
||||
bw_notch_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Notch<N_CHANNELS>::process(
|
||||
@ -798,7 +812,7 @@ inline void Notch<N_CHANNELS>::process(
|
||||
bw_notch_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Notch<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -806,7 +820,7 @@ inline void Notch<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Notch<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ utility }}}
|
||||
* version {{{ 1.0.1 }}}
|
||||
* version {{{ 1.1.0 }}}
|
||||
* requires {{{ bw_common }}}
|
||||
* description {{{
|
||||
* Simple data structure that helps keeping track of note on/off events and
|
||||
@ -30,6 +30,13 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Version <strong>1.0.1</strong>:
|
||||
* <ul>
|
||||
* <li>Now using <code>BW_NULL</code>.</li>
|
||||
@ -66,9 +73,13 @@
|
||||
#ifndef BW_NOTE_QUEUE_H
|
||||
#define BW_NOTE_QUEUE_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -162,7 +173,7 @@ static inline char bw_note_queue_is_valid(
|
||||
* than or equal to that of `bw_note_queue`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -171,7 +182,7 @@ static inline char bw_note_queue_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -260,8 +271,11 @@ static inline char bw_note_queue_is_valid(
|
||||
return cnt == queue->n_pressed;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
/*** Public C++ API ***/
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math }}}
|
||||
* description {{{
|
||||
* One-pole (6 dB/oct) lowpass filter with unitary DC gain, separate attack
|
||||
@ -30,8 +30,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_one_pole_process()</code>
|
||||
* to <code>bw_one_pole_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
@ -111,9 +114,13 @@
|
||||
#ifndef BW_ONE_POLE_H
|
||||
#define BW_ONE_POLE_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -463,7 +470,7 @@ static inline char bw_one_pole_state_is_valid(
|
||||
* than or equal to that of `bw_one_pole_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -472,9 +479,13 @@ static inline char bw_one_pole_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -1238,13 +1249,16 @@ static inline char bw_one_pole_state_is_valid(
|
||||
#undef BW_ONE_POLE_PARAM_CUTOFF_DOWN
|
||||
#undef BW_ONE_POLE_PARAM_STICKY_THRESH
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -1264,33 +1278,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -1360,14 +1374,14 @@ inline void OnePole<N_CHANNELS>::reset(
|
||||
bw_one_pole_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OnePole<N_CHANNELS>::reset(
|
||||
@ -1377,14 +1391,14 @@ inline void OnePole<N_CHANNELS>::reset(
|
||||
bw_one_pole_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OnePole<N_CHANNELS>::process(
|
||||
@ -1394,7 +1408,7 @@ inline void OnePole<N_CHANNELS>::process(
|
||||
bw_one_pole_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OnePole<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -1402,7 +1416,7 @@ inline void OnePole<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OnePole<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common }}}
|
||||
* description {{{
|
||||
* Post-filter to decolorate oscillator waveshapers when antialiasing is on.
|
||||
@ -33,8 +33,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
* <code>bw_osc_filt_process_multi()</code> to ensure that buffers
|
||||
* used for both input and output appear at the same channel
|
||||
@ -98,9 +101,13 @@
|
||||
#ifndef BW_OSC_FILT_H
|
||||
#define BW_OSC_FILT_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -183,7 +190,7 @@ static inline char bw_osc_filt_state_is_valid(
|
||||
* than or equal to that of `bw_osc_filt_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -192,7 +199,7 @@ static inline char bw_osc_filt_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -319,13 +326,16 @@ static inline char bw_osc_filt_state_is_valid(
|
||||
return bw_is_finite(state->z1);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -342,33 +352,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
/*! <<<...
|
||||
* }
|
||||
* ```
|
||||
@ -402,14 +412,14 @@ inline void OscFilt<N_CHANNELS>::reset(
|
||||
bw_osc_filt_reset_state(states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OscFilt<N_CHANNELS>::reset(
|
||||
@ -418,14 +428,14 @@ inline void OscFilt<N_CHANNELS>::reset(
|
||||
bw_osc_filt_reset_state_multi(statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OscFilt<N_CHANNELS>::process(
|
||||
@ -435,7 +445,7 @@ inline void OscFilt<N_CHANNELS>::process(
|
||||
bw_osc_filt_process_multi(statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OscFilt<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -443,7 +453,7 @@ inline void OscFilt<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* Pulse oscillator waveshaper with variable pulse width (actually, duty
|
||||
@ -37,8 +37,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_osc_pulse_process()</code>
|
||||
* to <code>bw_osc_pulse_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
@ -107,9 +110,13 @@
|
||||
#ifndef BW_OSC_PULSE_H
|
||||
#define BW_OSC_PULSE_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -262,7 +269,7 @@ static inline char bw_osc_pulse_coeffs_is_valid(
|
||||
* than or equal to that of `bw_osc_pulse_coeffs`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -271,10 +278,15 @@ static inline char bw_osc_pulse_coeffs_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -574,13 +586,16 @@ static inline char bw_osc_pulse_coeffs_is_valid(
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -604,13 +619,13 @@ public:
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<const float *, N_CHANNELS> xInc,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setAntialiasing(
|
||||
bool value);
|
||||
@ -656,7 +671,7 @@ inline void OscPulse<N_CHANNELS>::process(
|
||||
bw_osc_pulse_process_multi(&coeffs, x, xInc, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OscPulse<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -665,7 +680,7 @@ inline void OscPulse<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), xInc.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OscPulse<N_CHANNELS>::setAntialiasing(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math }}}
|
||||
* description {{{
|
||||
* Sawtooth oscillator waveshaper with PolyBLEP antialiasing.
|
||||
@ -36,8 +36,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
* <code>bw_osc_saw_process_multi()</code> to ensure that
|
||||
* <code>x_inc</code> is not <code>BW_NULL</code> when antialiasing
|
||||
@ -106,9 +109,13 @@
|
||||
#ifndef BW_OSC_SAW_H
|
||||
#define BW_OSC_SAW_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -248,7 +255,7 @@ static inline char bw_osc_saw_coeffs_is_valid(
|
||||
* than or equal to that of `bw_osc_saw_coeffs`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -257,9 +264,13 @@ static inline char bw_osc_saw_coeffs_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -499,13 +510,16 @@ static inline char bw_osc_saw_coeffs_is_valid(
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -529,13 +543,13 @@ public:
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<const float *, N_CHANNELS> xInc,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setAntialiasing(
|
||||
bool value);
|
||||
@ -578,7 +592,7 @@ inline void OscSaw<N_CHANNELS>::process(
|
||||
bw_osc_saw_process_multi(&coeffs, x, xInc, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OscSaw<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -587,7 +601,7 @@ inline void OscSaw<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), xInc.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OscSaw<N_CHANNELS>::setAntialiasing(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math }}}
|
||||
* description {{{
|
||||
* Sinusoidal oscillator waveshaper.
|
||||
@ -30,8 +30,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
* <code>bw_osc_sin_process_multi()</code> to ensure that buffers
|
||||
* used for both input and output appear at the same channel
|
||||
@ -87,9 +90,13 @@
|
||||
#ifndef BW_OSC_SIN_H
|
||||
#define BW_OSC_SIN_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -132,7 +139,7 @@ static inline void bw_osc_sin_process_multi(
|
||||
* All samples in `x` must be in [`0.f`, `1.f`).
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -141,9 +148,13 @@ static inline void bw_osc_sin_process_multi(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -193,13 +204,16 @@ static inline void bw_osc_sin_process_multi(
|
||||
bw_osc_sin_process(x[i], y[i], n_samples);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -213,13 +227,13 @@ void oscSinProcess(
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
/*! <<<```
|
||||
* }}} */
|
||||
|
||||
@ -236,7 +250,7 @@ inline void oscSinProcess(
|
||||
bw_osc_sin_process_multi(x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void oscSinProcess(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -244,7 +258,7 @@ inline void oscSinProcess(
|
||||
size_t nSamples) {
|
||||
oscSinProcess<N_CHANNELS>(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* Triangle oscillator waveshaper with variable slope (increasing time over
|
||||
@ -37,8 +37,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_osc_tri_process()</code> to
|
||||
* <code>bw_osc_tri_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
@ -109,9 +112,13 @@
|
||||
#ifndef BW_OSC_TRI_H
|
||||
#define BW_OSC_TRI_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -263,7 +270,7 @@ static inline char bw_osc_tri_coeffs_is_valid(
|
||||
* than or equal to that of `bw_osc_tri_coeffs`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -272,10 +279,15 @@ static inline char bw_osc_tri_coeffs_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -581,13 +593,16 @@ static inline char bw_osc_tri_coeffs_is_valid(
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -611,13 +626,13 @@ public:
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<const float *, N_CHANNELS> xInc,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setAntialiasing(
|
||||
bool value);
|
||||
@ -663,7 +678,7 @@ inline void OscTri<N_CHANNELS>::process(
|
||||
bw_osc_tri_process_multi(&coeffs, x, xInc, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OscTri<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -672,7 +687,7 @@ inline void OscTri<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), xInc.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void OscTri<N_CHANNELS>::setAntialiasing(
|
||||
|
@ -20,15 +20,18 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.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.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_pan_process()</code> to
|
||||
* <code>bw_pan_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_pan_process_multi()</code> to
|
||||
@ -83,9 +86,13 @@
|
||||
#ifndef BW_PAN_H
|
||||
#define BW_PAN_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -198,7 +205,7 @@ static inline char bw_pan_coeffs_is_valid(
|
||||
* than or equal to that of `bw_pan_coeffs`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -207,10 +214,15 @@ static inline char bw_pan_coeffs_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_gain.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_gain.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_gain.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -469,13 +481,16 @@ static inline char bw_pan_coeffs_is_valid(
|
||||
return bw_gain_coeffs_is_valid(&coeffs->l_coeffs) && bw_gain_coeffs_is_valid(&coeffs->r_coeffs);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -499,13 +514,13 @@ public:
|
||||
float * const * yR,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void setPan(
|
||||
float value);
|
||||
@ -548,7 +563,7 @@ inline void Pan<N_CHANNELS>::process(
|
||||
bw_pan_process_multi(&coeffs, x, yL, yR, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Pan<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -557,7 +572,7 @@ inline void Pan<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), yL.data(), yR.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Pan<N_CHANNELS>::setPan(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.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,8 +35,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Enforced limits on bandwidth and peak_gain also in
|
||||
* <code>bw_peak_reset_state*()</code> and clarified
|
||||
* documentation.</li>
|
||||
@ -110,9 +113,13 @@
|
||||
#ifndef BW_PEAK_H
|
||||
#define BW_PEAK_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -376,7 +383,7 @@ static inline char bw_peak_state_is_valid(
|
||||
* than or equal to that of `bw_peak_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -385,10 +392,15 @@ static inline char bw_peak_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_mm2.h>
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_mm2.h"
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_mm2.h>
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -902,13 +914,16 @@ static inline char bw_peak_state_is_valid(
|
||||
#undef BW_PEAK_PARAM_PEAK_GAIN
|
||||
#undef BW_PEAK_PARAM_BANDWIDTH
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -928,33 +943,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -1021,14 +1036,14 @@ inline void Peak<N_CHANNELS>::reset(
|
||||
bw_peak_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Peak<N_CHANNELS>::reset(
|
||||
@ -1038,14 +1053,14 @@ inline void Peak<N_CHANNELS>::reset(
|
||||
bw_peak_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Peak<N_CHANNELS>::process(
|
||||
@ -1055,7 +1070,7 @@ inline void Peak<N_CHANNELS>::process(
|
||||
bw_peak_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Peak<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -1063,7 +1078,7 @@ inline void Peak<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Peak<N_CHANNELS>::setCutoff(
|
||||
|
@ -32,6 +32,9 @@
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added phase_inc_min and phase_inc_max parameters.</li>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Fixed rounding bug when frequency is tiny (again).</li>
|
||||
* <li>Added debugging checks from <code>bw_phase_gen_process()</code>
|
||||
* to <code>bw_phase_gen_process_multi()</code>.</li>
|
||||
@ -121,9 +124,13 @@
|
||||
#ifndef BW_PHASE_GEN_H
|
||||
#define BW_PHASE_GEN_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -371,7 +378,7 @@ static inline char bw_phase_gen_state_is_valid(
|
||||
* than or equal to that of `bw_phase_gen_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -380,10 +387,15 @@ static inline char bw_phase_gen_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -1028,13 +1040,16 @@ static inline char bw_phase_gen_state_is_valid(
|
||||
return bw_is_finite(state->phase) && state->phase >= 0.f && state->phase < 1.f;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -1055,24 +1070,24 @@ public:
|
||||
float * BW_RESTRICT y0 = nullptr,
|
||||
float * BW_RESTRICT yInc0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * phase0,
|
||||
float * y0 = nullptr,
|
||||
float * yInc0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * xMod,
|
||||
@ -1080,13 +1095,13 @@ public:
|
||||
float * const * yInc,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void setFrequency(
|
||||
float value);
|
||||
@ -1159,7 +1174,7 @@ inline void PhaseGen<N_CHANNELS>::reset(
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PhaseGen<N_CHANNELS>::reset(
|
||||
float phase0,
|
||||
@ -1167,7 +1182,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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PhaseGen<N_CHANNELS>::reset(
|
||||
@ -1178,7 +1193,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
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PhaseGen<N_CHANNELS>::reset(
|
||||
std::array<float, N_CHANNELS> phase0,
|
||||
@ -1186,7 +1201,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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PhaseGen<N_CHANNELS>::process(
|
||||
@ -1197,7 +1212,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
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PhaseGen<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> xMod,
|
||||
@ -1206,7 +1221,7 @@ inline void PhaseGen<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(xMod.data(), y.data(), yInc.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PhaseGen<N_CHANNELS>::setFrequency(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{
|
||||
* bw_ap1 bw_common bw_lp1 bw_math bw_one_pole bw_osc_sin bw_phase_gen
|
||||
* }}}
|
||||
@ -30,8 +30,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Enforced limits on center and amount also in
|
||||
* <code>bw_phaser_reset_state*()</code> and clarified
|
||||
* documentation.</li>
|
||||
@ -96,9 +99,13 @@
|
||||
#ifndef BW_PHASER_H
|
||||
#define BW_PHASER_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -290,7 +297,7 @@ static inline char bw_phaser_state_is_valid(
|
||||
* than or equal to that of `bw_phaser_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -299,12 +306,19 @@ static inline char bw_phaser_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_phase_gen.h>
|
||||
#include <bw_osc_sin.h>
|
||||
#include <bw_ap1.h>
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_phase_gen.h"
|
||||
# include "bw_osc_sin.h"
|
||||
# include "bw_ap1.h"
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_phase_gen.h>
|
||||
# include <bw_osc_sin.h>
|
||||
# include <bw_ap1.h>
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -688,13 +702,16 @@ static inline char bw_phaser_state_is_valid(
|
||||
&& bw_ap1_state_is_valid(coeffs ? &coeffs->ap1_coeffs : BW_NULL, &state->ap1_state[3]);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -714,33 +731,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setRate(
|
||||
float value);
|
||||
@ -792,14 +809,14 @@ inline void Phaser<N_CHANNELS>::reset(
|
||||
bw_phaser_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Phaser<N_CHANNELS>::reset(
|
||||
@ -809,14 +826,14 @@ inline void Phaser<N_CHANNELS>::reset(
|
||||
bw_phaser_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Phaser<N_CHANNELS>::process(
|
||||
@ -826,7 +843,7 @@ inline void Phaser<N_CHANNELS>::process(
|
||||
bw_phaser_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Phaser<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -834,7 +851,7 @@ inline void Phaser<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Phaser<N_CHANNELS>::setRate(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common }}}
|
||||
* description {{{
|
||||
* Pinking filter.
|
||||
@ -40,8 +40,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
* <code>bw_pink_filt_process_multi()</code> to ensure that buffers
|
||||
* used for both input and output appear at the same channel
|
||||
@ -122,9 +125,13 @@
|
||||
#ifndef BW_PINK_FILT_H
|
||||
#define BW_PINK_FILT_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -311,7 +318,7 @@ static inline char bw_pink_filt_state_is_valid(
|
||||
* than or equal to that of `bw_pink_filt_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -320,7 +327,7 @@ static inline char bw_pink_filt_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -655,13 +662,16 @@ static inline char bw_pink_filt_state_is_valid(
|
||||
return bw_is_finite(state->s1_z1) && bw_is_finite(state->s2_z1) && bw_is_finite(state->s3_z1) && bw_is_finite(state->s4_z1);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -681,33 +691,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setSampleRateScaling(
|
||||
bool value);
|
||||
@ -755,14 +765,14 @@ inline void PinkFilt<N_CHANNELS>::reset(
|
||||
bw_pink_filt_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PinkFilt<N_CHANNELS>::reset(
|
||||
@ -772,14 +782,14 @@ inline void PinkFilt<N_CHANNELS>::reset(
|
||||
bw_pink_filt_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PinkFilt<N_CHANNELS>::process(
|
||||
@ -789,7 +799,7 @@ inline void PinkFilt<N_CHANNELS>::process(
|
||||
bw_pink_filt_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PinkFilt<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -797,7 +807,7 @@ inline void PinkFilt<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PinkFilt<N_CHANNELS>::setSampleRateScaling(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_env_follow bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* Digital peak programme meter with adjustable integration time constant.
|
||||
@ -30,8 +30,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_ppm_process()</code> to
|
||||
* <code>bw_ppm_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_ppm_process_multi()</code> to
|
||||
@ -92,9 +95,13 @@
|
||||
#ifndef BW_PPM_H
|
||||
#define BW_PPM_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -270,7 +277,7 @@ static inline char bw_ppm_state_is_valid(
|
||||
* than or equal to that of `bw_ppm_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -279,9 +286,13 @@ static inline char bw_ppm_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_env_follow.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_env_follow.h"
|
||||
#else
|
||||
# include <bw_env_follow.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -618,13 +629,16 @@ static inline char bw_ppm_state_is_valid(
|
||||
return bw_env_follow_state_is_valid(coeffs ? &coeffs->env_follow_coeffs : BW_NULL, &state->env_follow_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -644,33 +658,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setIntegrationTau(
|
||||
float value);
|
||||
@ -719,14 +733,14 @@ inline void PPM<N_CHANNELS>::reset(
|
||||
bw_ppm_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PPM<N_CHANNELS>::reset(
|
||||
@ -736,14 +750,14 @@ inline void PPM<N_CHANNELS>::reset(
|
||||
bw_ppm_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PPM<N_CHANNELS>::process(
|
||||
@ -753,7 +767,7 @@ inline void PPM<N_CHANNELS>::process(
|
||||
bw_ppm_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PPM<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -761,7 +775,7 @@ inline void PPM<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void PPM<N_CHANNELS>::setIntegrationTau(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ utility }}}
|
||||
* version {{{ 1.0.1 }}}
|
||||
* version {{{ 1.1.0 }}}
|
||||
* requires {{{ bw_common }}}
|
||||
* description {{{
|
||||
* Pseudo-random number generators.
|
||||
@ -42,6 +42,12 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code> and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Version <strong>1.0.1</strong>:
|
||||
* <ul>
|
||||
* <li>Now using <code>BW_NULL</code>.</li>
|
||||
@ -77,9 +83,13 @@
|
||||
#ifndef BW_RAND_H
|
||||
#define BW_RAND_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -109,13 +119,13 @@ static inline float bw_randf(
|
||||
* between calls and which gets updated by this function.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*** Implementation ***/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -139,7 +149,7 @@ static inline float bw_randf(
|
||||
return y;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.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,8 +35,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_reverb_process()</code> to
|
||||
* <code>bw_reverb_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_reverb_process_multi()</code>
|
||||
@ -94,9 +97,13 @@
|
||||
#ifndef BW_REVERB_H
|
||||
#define BW_REVERB_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -340,7 +347,7 @@ static inline char bw_reverb_state_is_valid(
|
||||
* than or equal to that of `bw_reverb_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -349,16 +356,27 @@ static inline char bw_reverb_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_delay.h>
|
||||
#include <bw_lp1.h>
|
||||
#include <bw_phase_gen.h>
|
||||
#include <bw_osc_sin.h>
|
||||
#include <bw_gain.h>
|
||||
#include <bw_dry_wet.h>
|
||||
#include <bw_one_pole.h>
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_delay.h"
|
||||
# include "bw_lp1.h"
|
||||
# include "bw_phase_gen.h"
|
||||
# include "bw_osc_sin.h"
|
||||
# include "bw_gain.h"
|
||||
# include "bw_dry_wet.h"
|
||||
# include "bw_one_pole.h"
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_delay.h>
|
||||
# include <bw_lp1.h>
|
||||
# include <bw_phase_gen.h>
|
||||
# include <bw_osc_sin.h>
|
||||
# include <bw_gain.h>
|
||||
# include <bw_dry_wet.h>
|
||||
# include <bw_one_pole.h>
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -1224,8 +1242,11 @@ static inline char bw_reverb_state_is_valid(
|
||||
&& bw_delay_state_is_valid(coeffs ? &coeffs->delay_d4_coeffs : BW_NULL, &state->delay_d4_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
@ -1254,13 +1275,13 @@ public:
|
||||
float * BW_RESTRICT yL0 = nullptr,
|
||||
float * BW_RESTRICT yR0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * xL0,
|
||||
@ -1268,13 +1289,13 @@ public:
|
||||
float * yL0 = nullptr,
|
||||
float * yR0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * xL,
|
||||
@ -1283,14 +1304,14 @@ public:
|
||||
float * const * yR,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void setPredelay(
|
||||
float value);
|
||||
@ -1379,7 +1400,7 @@ inline void Reverb<N_CHANNELS>::reset(
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Reverb<N_CHANNELS>::reset(
|
||||
float xL0,
|
||||
@ -1388,7 +1409,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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Reverb<N_CHANNELS>::reset(
|
||||
@ -1400,7 +1421,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
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Reverb<N_CHANNELS>::reset(
|
||||
std::array<float, N_CHANNELS> xL0,
|
||||
@ -1409,7 +1430,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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Reverb<N_CHANNELS>::process(
|
||||
@ -1421,7 +1442,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
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Reverb<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> xL,
|
||||
@ -1431,7 +1452,7 @@ inline void Reverb<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(xL.data(), xR.data(), yL.data(), yR.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Reverb<N_CHANNELS>::setPredelay(
|
||||
|
@ -20,15 +20,18 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* Ring modulator with variable modulation amount.
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_ring_mod_process()</code>
|
||||
* to <code>bw_ring_mod_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
@ -85,9 +88,13 @@
|
||||
#ifndef BW_RINGMOD_H
|
||||
#define BW_RINGMOD_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -201,7 +208,7 @@ static inline char bw_ring_mod_coeffs_is_valid(
|
||||
* than or equal to that of `bw_ring_mod_coeffs`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -210,10 +217,15 @@ static inline char bw_ring_mod_coeffs_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -440,13 +452,16 @@ static inline char bw_ring_mod_coeffs_is_valid(
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -470,13 +485,13 @@ public:
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void setAmount(float value);
|
||||
/*! <<<...
|
||||
@ -518,7 +533,7 @@ inline void RingMod<N_CHANNELS>::process(
|
||||
bw_ring_mod_process_multi(&coeffs, xMod, xCar, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void RingMod<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> xMod,
|
||||
@ -527,7 +542,7 @@ inline void RingMod<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(xMod.data(), xCar.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void RingMod<N_CHANNELS>::setAmount(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* Antialiased tanh-based saturation with parametric bias and gain
|
||||
@ -45,8 +45,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_satur_process()</code> to
|
||||
* <code>bw_satur_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_satur_process_multi()</code>
|
||||
@ -115,9 +118,13 @@
|
||||
#ifndef BW_SATUR_H
|
||||
#define BW_SATUR_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -311,7 +318,7 @@ static inline char bw_satur_state_is_valid(
|
||||
* than or equal to that of `bw_satur_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -320,10 +327,15 @@ static inline char bw_satur_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -765,13 +777,16 @@ static inline char bw_satur_state_is_valid(
|
||||
return bw_is_finite(state->x_z1) && bw_is_finite(state->F_z1);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -791,33 +806,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setBias(
|
||||
float value);
|
||||
@ -869,14 +884,14 @@ inline void Satur<N_CHANNELS>::reset(
|
||||
bw_satur_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Satur<N_CHANNELS>::reset(
|
||||
@ -886,14 +901,14 @@ inline void Satur<N_CHANNELS>::reset(
|
||||
bw_satur_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Satur<N_CHANNELS>::process(
|
||||
@ -903,7 +918,7 @@ inline void Satur<N_CHANNELS>::process(
|
||||
bw_satur_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Satur<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -911,7 +926,7 @@ inline void Satur<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Satur<N_CHANNELS>::setBias(
|
||||
|
@ -20,15 +20,18 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math }}}
|
||||
* description {{{
|
||||
* Slew-rate limiter with separate maximum increasing and decreasing rates.
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_slew_lim_process()</code>
|
||||
* to <code>bw_slew_lim_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
@ -99,9 +102,13 @@
|
||||
#ifndef BW_SLEW_LIM_H
|
||||
#define BW_SLEW_LIM_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -339,7 +346,7 @@ static inline char bw_slew_lim_state_is_valid(
|
||||
* than or equal to that of `bw_slew_lim_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -348,9 +355,13 @@ static inline char bw_slew_lim_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -892,13 +903,16 @@ static inline char bw_slew_lim_state_is_valid(
|
||||
return bw_is_finite(state->y_z1);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -918,33 +932,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setMaxRate(
|
||||
float value);
|
||||
@ -999,14 +1013,14 @@ inline void SlewLim<N_CHANNELS>::reset(
|
||||
bw_slew_lim_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SlewLim<N_CHANNELS>::reset(
|
||||
@ -1016,14 +1030,14 @@ inline void SlewLim<N_CHANNELS>::reset(
|
||||
bw_slew_lim_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SlewLim<N_CHANNELS>::process(
|
||||
@ -1033,7 +1047,7 @@ inline void SlewLim<N_CHANNELS>::process(
|
||||
bw_slew_lim_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SlewLim<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -1041,7 +1055,7 @@ inline void SlewLim<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SlewLim<N_CHANNELS>::setMaxRate(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math }}}
|
||||
* description {{{
|
||||
* Sample rate reducer.
|
||||
@ -31,8 +31,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_sr_reduce_process()</code>
|
||||
* to <code>bw_sr_reduce_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in
|
||||
@ -101,9 +104,13 @@
|
||||
#ifndef BW_SR_REDUCE_H
|
||||
#define BW_SR_REDUCE_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -263,7 +270,7 @@ static inline char bw_sr_reduce_state_is_valid(
|
||||
* than or equal to that of `bw_sr_reduce_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -272,9 +279,13 @@ static inline char bw_sr_reduce_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -578,13 +589,16 @@ static inline char bw_sr_reduce_state_is_valid(
|
||||
return bw_is_finite(state->phase) && state->phase >= 0.f && bw_is_finite(state->y_z1);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -604,33 +618,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setRatio(
|
||||
float value);
|
||||
@ -676,14 +690,14 @@ inline void SRReduce<N_CHANNELS>::reset(
|
||||
bw_sr_reduce_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SRReduce<N_CHANNELS>::reset(
|
||||
@ -693,14 +707,14 @@ inline void SRReduce<N_CHANNELS>::reset(
|
||||
bw_sr_reduce_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SRReduce<N_CHANNELS>::process(
|
||||
@ -710,7 +724,7 @@ inline void SRReduce<N_CHANNELS>::process(
|
||||
bw_sr_reduce_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SRReduce<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -718,7 +732,7 @@ inline void SRReduce<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SRReduce<N_CHANNELS>::setRatio(float value) {
|
||||
|
@ -20,13 +20,20 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.0 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math }}}
|
||||
* description {{{
|
||||
* Aribtrary-ratio IIR sample rate converter.
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Version <strong>1.1.0</strong>:
|
||||
* <ul>
|
||||
* <li>Now using <code>BW_NULL</code> and
|
||||
@ -79,9 +86,13 @@
|
||||
#ifndef BW_SRC_H
|
||||
#define BW_SRC_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -213,7 +224,7 @@ static inline char bw_src_state_is_valid(
|
||||
* than or equal to that of `bw_src_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -222,9 +233,13 @@ static inline char bw_src_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -521,13 +536,16 @@ static inline char bw_src_state_is_valid(
|
||||
&& bw_is_finite(state->xz3);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -545,21 +563,21 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * BW_RESTRICT const * BW_RESTRICT x,
|
||||
@ -567,13 +585,13 @@ public:
|
||||
size_t * BW_RESTRICT nInSamples,
|
||||
size_t * BW_RESTRICT nOutSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
/*! <<<...
|
||||
* }
|
||||
* ```
|
||||
@ -610,14 +628,14 @@ inline void SRC<N_CHANNELS>::reset(
|
||||
bw_src_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SRC<N_CHANNELS>::reset(
|
||||
@ -626,14 +644,14 @@ inline void SRC<N_CHANNELS>::reset(
|
||||
bw_src_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SRC<N_CHANNELS>::process(
|
||||
@ -644,7 +662,7 @@ inline void SRC<N_CHANNELS>::process(
|
||||
bw_src_process_multi(coeffs, statesP, x, y, N_CHANNELS, nInSamples, nOutSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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,
|
||||
@ -653,7 +671,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
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.0 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math }}}
|
||||
* description {{{
|
||||
* Integer-ratio IIR sample rate converter.
|
||||
@ -33,6 +33,13 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Version <strong>1.1.0</strong>:
|
||||
* <ul>
|
||||
* <li>Now using <code>BW_NULL</code> and
|
||||
@ -85,9 +92,13 @@
|
||||
#ifndef BW_SRC_INT_H
|
||||
#define BW_SRC_INT_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -221,7 +232,7 @@ static inline char bw_src_int_state_is_valid(
|
||||
* than or equal to that of `bw_src_int_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -230,9 +241,13 @@ static inline char bw_src_int_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -496,13 +511,16 @@ static inline char bw_src_int_state_is_valid(
|
||||
&& bw_is_finite(state->z4);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -520,21 +538,21 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * BW_RESTRICT const * BW_RESTRICT x,
|
||||
@ -542,13 +560,13 @@ public:
|
||||
size_t nInSamples,
|
||||
size_t * BW_RESTRICT nOutSamples = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
/*! <<<...
|
||||
* }
|
||||
* ```
|
||||
@ -585,14 +603,14 @@ inline void SRCInt<N_CHANNELS>::reset(
|
||||
bw_src_int_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SRCInt<N_CHANNELS>::reset(
|
||||
@ -601,14 +619,14 @@ inline void SRCInt<N_CHANNELS>::reset(
|
||||
bw_src_int_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SRCInt<N_CHANNELS>::process(
|
||||
@ -619,7 +637,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
|
||||
# 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,
|
||||
@ -628,7 +646,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
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole }}}
|
||||
* description {{{
|
||||
* State variable filter (2nd order, 12 dB/oct) model with separated lowpass,
|
||||
@ -28,8 +28,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_svf_process()</code> to
|
||||
* <code>bw_svf_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_svf_process_multi()</code> to
|
||||
@ -115,9 +118,13 @@
|
||||
#ifndef BW_SVF_H
|
||||
#define BW_SVF_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -334,7 +341,7 @@ static inline char bw_svf_state_is_valid(
|
||||
* than or equal to that of `bw_svf_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -343,10 +350,15 @@ static inline char bw_svf_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_math.h>
|
||||
#include <bw_one_pole.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_math.h"
|
||||
# include "bw_one_pole.h"
|
||||
#else
|
||||
# include <bw_math.h>
|
||||
# include <bw_one_pole.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -1084,13 +1096,16 @@ static inline char bw_svf_state_is_valid(
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -1112,13 +1127,13 @@ public:
|
||||
float * BW_RESTRICT yBp0 = nullptr,
|
||||
float * BW_RESTRICT yHp0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
@ -1126,13 +1141,13 @@ public:
|
||||
float * yBp0 = nullptr,
|
||||
float * yHp0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
@ -1141,14 +1156,14 @@ public:
|
||||
float * const * yHp,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
void setCutoff(
|
||||
float value);
|
||||
@ -1250,7 +1265,7 @@ inline void SVF<N_CHANNELS>::reset(
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SVF<N_CHANNELS>::reset(
|
||||
float x0,
|
||||
@ -1259,7 +1274,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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SVF<N_CHANNELS>::reset(
|
||||
@ -1271,7 +1286,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
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SVF<N_CHANNELS>::reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
@ -1280,7 +1295,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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SVF<N_CHANNELS>::process(
|
||||
@ -1292,7 +1307,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
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SVF<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -1302,7 +1317,7 @@ inline void SVF<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), yLp.data(), yBp.data(), yHp.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void SVF<N_CHANNELS>::setCutoff(
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{
|
||||
* bw_common bw_math bw_one_pole bw_osc_sin bw_phase_gen bw_ring_mod
|
||||
* }}}
|
||||
@ -29,8 +29,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_trem_process()</code> to
|
||||
* <code>bw_trem_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_trem_process_multi()</code>
|
||||
@ -90,9 +93,13 @@
|
||||
#ifndef BW_TREM_H
|
||||
#define BW_TREM_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -266,7 +273,7 @@ static inline char bw_trem_state_is_valid(
|
||||
* than or equal to that of `bw_trem_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -275,11 +282,17 @@ static inline char bw_trem_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_phase_gen.h>
|
||||
#include <bw_osc_sin.h>
|
||||
#include <bw_ring_mod.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_phase_gen.h"
|
||||
# include "bw_osc_sin.h"
|
||||
# include "bw_ring_mod.h"
|
||||
#else
|
||||
# include <bw_phase_gen.h>
|
||||
# include <bw_osc_sin.h>
|
||||
# include <bw_ring_mod.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -610,13 +623,16 @@ static inline char bw_trem_state_is_valid(
|
||||
return bw_phase_gen_state_is_valid(coeffs ? &coeffs->phase_gen_coeffs : BW_NULL, &state->phase_gen_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -636,33 +652,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setRate(
|
||||
float value);
|
||||
@ -711,14 +727,14 @@ inline void Trem<N_CHANNELS>::reset(
|
||||
bw_trem_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Trem<N_CHANNELS>::reset(
|
||||
@ -728,14 +744,14 @@ inline void Trem<N_CHANNELS>::reset(
|
||||
bw_trem_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Trem<N_CHANNELS>::process(
|
||||
@ -745,7 +761,7 @@ inline void Trem<N_CHANNELS>::process(
|
||||
bw_trem_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Trem<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -753,7 +769,7 @@ inline void Trem<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Trem<N_CHANNELS>::setRate(
|
||||
|
@ -20,17 +20,19 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ utility }}}
|
||||
* version {{{ 1.0.2 }}}
|
||||
* version {{{ 1.1.0 }}}
|
||||
* requires {{{ bw_common bw_note_queue }}}
|
||||
* description {{{
|
||||
* Basic voice allocator with low/high note priority.
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.0.2</strong>:
|
||||
* <li>Version <strong>1.1.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added <code>static inline</code> to
|
||||
* <code>bw_voice_alloc()</code>.</li>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code> and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Version <strong>1.0.1</strong>:
|
||||
@ -71,10 +73,15 @@
|
||||
#ifndef BW_VOICE_ALLOC_H
|
||||
#define BW_VOICE_ALLOC_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#include <bw_note_queue.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
# include "bw_note_queue.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
# include <bw_note_queue.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -142,7 +149,7 @@ static inline void bw_voice_alloc(
|
||||
* the number of elements in `voices`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -151,7 +158,7 @@ static inline void bw_voice_alloc(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -215,7 +222,7 @@ static inline void bw_voice_alloc(
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/*!
|
||||
* module_type {{{ dsp }}}
|
||||
* version {{{ 1.1.1 }}}
|
||||
* version {{{ 1.2.0 }}}
|
||||
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
|
||||
* description {{{
|
||||
* Wah effect.
|
||||
@ -29,8 +29,11 @@
|
||||
* }}}
|
||||
* changelog {{{
|
||||
* <ul>
|
||||
* <li>Version <strong>1.1.1</strong>:
|
||||
* <li>Version <strong>1.2.0</strong>:
|
||||
* <ul>
|
||||
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
|
||||
* <code>BW_NO_CXX</code>, and
|
||||
* <code>BW_CXX_NO_EXTERN_C</code>.</li>
|
||||
* <li>Added debugging checks from <code>bw_wah_process()</code> to
|
||||
* <code>bw_wah_process_multi()</code>.</li>
|
||||
* <li>Added debugging checks in <code>bw_wah_process_multi()</code> to
|
||||
@ -104,9 +107,13 @@
|
||||
#ifndef BW_WAH_H
|
||||
#define BW_WAH_H
|
||||
|
||||
#include <bw_common.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_common.h"
|
||||
#else
|
||||
# include <bw_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -266,7 +273,7 @@ static inline char bw_wah_state_is_valid(
|
||||
* than or equal to that of `bw_wah_state`.
|
||||
* }}} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -275,9 +282,13 @@ static inline char bw_wah_state_is_valid(
|
||||
/* WARNING: This part of the file is not part of the public API. Its content may
|
||||
* change at any time in future versions. Please, do not use it directly. */
|
||||
|
||||
#include <bw_svf.h>
|
||||
#ifdef BW_INCLUDE_WITH_QUOTES
|
||||
# include "bw_svf.h"
|
||||
#else
|
||||
# include <bw_svf.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -586,13 +597,16 @@ static inline char bw_wah_state_is_valid(
|
||||
return bw_svf_state_is_valid(coeffs ? &coeffs->svf_coeffs : BW_NULL, &state->svf_state);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
#endif
|
||||
|
||||
#if !defined(BW_NO_CXX) && defined(__cplusplus)
|
||||
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
# include <array>
|
||||
# endif
|
||||
|
||||
namespace Brickworks {
|
||||
|
||||
/*** Public C++ API ***/
|
||||
@ -612,33 +626,33 @@ public:
|
||||
float x0 = 0.f,
|
||||
float * BW_RESTRICT y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
float x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void reset(
|
||||
const float * x0,
|
||||
float * y0 = nullptr);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void reset(
|
||||
std::array<float, N_CHANNELS> x0,
|
||||
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void process(
|
||||
const float * const * x,
|
||||
float * const * y,
|
||||
size_t nSamples);
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
void process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
std::array<float *, N_CHANNELS> y,
|
||||
size_t nSamples);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void setWah(
|
||||
float value);
|
||||
@ -684,14 +698,14 @@ inline void Wah<N_CHANNELS>::reset(
|
||||
bw_wah_reset_state(&coeffs, states + i, x0);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Wah<N_CHANNELS>::reset(
|
||||
@ -701,14 +715,14 @@ inline void Wah<N_CHANNELS>::reset(
|
||||
bw_wah_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# 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
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Wah<N_CHANNELS>::process(
|
||||
@ -718,7 +732,7 @@ inline void Wah<N_CHANNELS>::process(
|
||||
bw_wah_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
|
||||
}
|
||||
|
||||
#ifndef BW_CXX_NO_ARRAY
|
||||
# ifndef BW_CXX_NO_ARRAY
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Wah<N_CHANNELS>::process(
|
||||
std::array<const float *, N_CHANNELS> x,
|
||||
@ -726,7 +740,7 @@ inline void Wah<N_CHANNELS>::process(
|
||||
size_t nSamples) {
|
||||
process(x.data(), y.data(), nSamples);
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
template<size_t N_CHANNELS>
|
||||
inline void Wah<N_CHANNELS>::setWah(
|
||||
|
Loading…
Reference in New Issue
Block a user