now using BW_NULL instead of nullptr in C++ API/implementations

This commit is contained in:
Stefano D'Angelo 2025-01-28 16:22:07 +01:00
parent 029ec29f6d
commit a6d52765a6
41 changed files with 580 additions and 350 deletions

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order allpass filter (90° shift at cutoff, approaching 180° shift
@ -28,6 +28,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -669,7 +675,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -679,12 +685,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -741,7 +747,7 @@ inline void AP1<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_ap1_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_ap1_reset_state(&coeffs, states + i, x0);
else
@ -754,7 +760,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -771,7 +777,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order allpass filter (180° shift at cutoff, approaching 360° shift
@ -28,6 +28,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -699,7 +705,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -709,12 +715,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -774,7 +780,7 @@ inline void AP2<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_ap2_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_ap2_reset_state(&coeffs, states + i, x0);
else
@ -787,7 +793,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -804,7 +810,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.1.0 }}}
* version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole bw_svf }}}
* description {{{
* Cab simulator effect.
@ -30,6 +30,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.1.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.1.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -697,7 +703,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -707,12 +713,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -769,7 +775,7 @@ inline void Cab<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_cab_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_cab_reset_state(&coeffs, states + i, x0);
else
@ -782,7 +788,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -799,7 +805,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{
* bw_buf bw_comb bw_common bw_delay bw_gain bw_math bw_one_pole bw_osc_sin
* bw_phase_gen
@ -36,6 +36,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -877,7 +883,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -887,12 +893,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -947,12 +953,12 @@ inline Chorus<N_CHANNELS>::Chorus(
bw_chorus_init(&coeffs, maxDelay);
for (size_t i = 0; i < N_CHANNELS; i++)
statesP[i] = states + i;
mem = nullptr;
mem = BW_NULL;
}
template<size_t N_CHANNELS>
inline Chorus<N_CHANNELS>::~Chorus() {
if (mem != nullptr)
if (mem != BW_NULL)
operator delete(mem);
}
@ -961,7 +967,7 @@ inline void Chorus<N_CHANNELS>::setSampleRate(
float sampleRate) {
bw_chorus_set_sample_rate(&coeffs, sampleRate);
size_t req = bw_chorus_mem_req(&coeffs);
if (mem != nullptr)
if (mem != BW_NULL)
operator delete(mem);
mem = operator new(req * N_CHANNELS);
void *m = mem;
@ -974,7 +980,7 @@ inline void Chorus<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_chorus_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_chorus_reset_state(&coeffs, states + i, x0);
else
@ -987,7 +993,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -1004,7 +1010,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Antialiased hard clipper with parametric bias and gain
@ -45,6 +45,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -784,7 +790,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -794,12 +800,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -856,7 +862,7 @@ inline void Clip<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_clip_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_clip_reset_state(&coeffs, states + i, x0);
else
@ -869,7 +875,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -886,7 +892,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 20230-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{
* bw_buf bw_common bw_delay bw_gain bw_math bw_one_pole
* }}}
@ -37,6 +37,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -945,7 +951,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -955,12 +961,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -1012,12 +1018,12 @@ inline Comb<N_CHANNELS>::Comb(
bw_comb_init(&coeffs, maxDelay);
for (size_t i = 0; i < N_CHANNELS; i++)
statesP[i] = states + i;
mem = nullptr;
mem = BW_NULL;
}
template<size_t N_CHANNELS>
inline Comb<N_CHANNELS>::~Comb() {
if (mem != nullptr)
if (mem != BW_NULL)
operator delete(mem);
}
@ -1026,7 +1032,7 @@ inline void Comb<N_CHANNELS>::setSampleRate(
float sampleRate) {
bw_comb_set_sample_rate(&coeffs, sampleRate);
size_t req = bw_comb_mem_req(&coeffs);
if (mem != nullptr)
if (mem != BW_NULL)
operator delete(mem);
mem = operator new(req * N_CHANNELS);
void *m = mem;
@ -1039,7 +1045,7 @@ inline void Comb<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_comb_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_comb_reset_state(&coeffs, states + i, x0);
else
@ -1052,7 +1058,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -1069,7 +1075,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{
* bw_common bw_env_follow bw_gain bw_math bw_one_pole
* }}}
@ -29,6 +29,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -911,7 +917,7 @@ public:
void reset(
float x0 = 0.f,
float xSc0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -923,13 +929,13 @@ public:
void reset(
const float * x0,
const float * xSc0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# 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);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -1009,7 +1015,7 @@ inline void Comp<N_CHANNELS>::reset(
float xSc0,
float * BW_RESTRICT y0) {
bw_comp_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_comp_reset_state(&coeffs, states + i, x0, xSc0);
else
@ -1023,7 +1029,7 @@ inline void Comp<N_CHANNELS>::reset(
float x0,
float xSc0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, xSc0, y0 != nullptr ? y0->data() : nullptr);
reset(x0, xSc0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -1042,7 +1048,7 @@ inline void Comp<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> xSc0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), xSc0.data(), y0 != nullptr ? y0->data() : nullptr);
reset(x0.data(), xSc0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_buf bw_common bw_math }}}
* description {{{
* Interpolated delay line, not smoothed.
@ -31,6 +31,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -842,7 +848,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -852,12 +858,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -898,12 +904,12 @@ inline Delay<N_CHANNELS>::Delay(float maxDelay) {
bw_delay_init(&coeffs, maxDelay);
for (size_t i = 0; i < N_CHANNELS; i++)
statesP[i] = states + i;
mem = nullptr;
mem = BW_NULL;
}
template<size_t N_CHANNELS>
inline Delay<N_CHANNELS>::~Delay() {
if (mem != nullptr)
if (mem != BW_NULL)
operator delete(mem);
}
@ -912,7 +918,7 @@ inline void Delay<N_CHANNELS>::setSampleRate(
float sampleRate) {
bw_delay_set_sample_rate(&coeffs, sampleRate);
size_t req = bw_delay_mem_req(&coeffs);
if (mem != nullptr)
if (mem != BW_NULL)
operator delete(mem);
mem = operator new(req * N_CHANNELS);
void *m = mem;
@ -925,7 +931,7 @@ inline void Delay<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_delay_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_delay_reset_state(&coeffs, states + i, x0);
else
@ -938,7 +944,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -955,7 +961,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* 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,6 +32,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -727,7 +733,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -737,12 +743,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -799,7 +805,7 @@ inline void Dist<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_dist_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_dist_reset_state(&coeffs, states + i, x0);
else
@ -812,7 +818,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -829,7 +835,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{
* bw_common bw_gain bw_hs1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
* bw_satur bw_svf
@ -32,6 +32,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -730,7 +736,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -740,12 +746,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -802,7 +808,7 @@ inline void Drive<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_drive_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_drive_reset_state(&coeffs, states + i, x0);
else
@ -815,7 +821,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -832,7 +838,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Envelope follower made of a full-wave rectifier followed by
@ -28,6 +28,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -685,7 +691,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -695,12 +701,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -757,7 +763,7 @@ inline void EnvFollow<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_env_follow_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_env_follow_reset_state(&coeffs, states + i, x0);
else
@ -770,7 +776,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -787,7 +793,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Linear ADSR envelope generator.
@ -40,6 +40,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -990,7 +996,7 @@ public:
void reset(
char gate0 = 0,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -1000,12 +1006,12 @@ public:
void reset(
const char * BW_RESTRICT gate0,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<char, N_CHANNELS> gate0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -1077,7 +1083,7 @@ inline void EnvGen<N_CHANNELS>::reset(
char gate0,
float * BW_RESTRICT y0) {
bw_env_gen_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_env_gen_reset_state(&coeffs, states + i, gate0);
else
@ -1090,7 +1096,7 @@ 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);
reset(gate0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -1107,7 +1113,7 @@ 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);
reset(gate0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{
* bw_common bw_gain bw_hp1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
* bw_satur bw_svf
@ -32,6 +32,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -702,7 +708,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -712,12 +718,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -771,7 +777,7 @@ inline void Fuzz<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_fuzz_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_fuzz_reset_state(&coeffs, states + i, x0);
else
@ -784,7 +790,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -801,7 +807,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order highpass filter (6 dB/oct) with gain asymptotically
@ -28,6 +28,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -667,7 +673,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -677,12 +683,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -739,7 +745,7 @@ inline void HP1<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_hp1_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_hp1_reset_state(&coeffs, states + i, x0);
else
@ -752,7 +758,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : y0);
}
# endif
@ -769,7 +775,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* 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.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -791,7 +797,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -801,12 +807,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -869,7 +875,7 @@ inline void HS1<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_hs1_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_hs1_reset_state(&coeffs, states + i, x0);
else
@ -882,7 +888,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : y0);
}
# endif
@ -899,7 +905,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* 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.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -846,7 +852,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -856,12 +862,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -927,7 +933,7 @@ inline void HS2<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_hs2_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_hs2_reset_state(&coeffs, states + i, x0);
else
@ -940,7 +946,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : y0);
}
# endif
@ -957,7 +963,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -532,7 +532,7 @@ inline void iir1Reset(
float b0,
float b1,
float a1) {
iir1Reset<N_CHANNELS>(x0.data(), y0 != nullptr ? y0.data() : nullptr, s0 != nullptr ? s0.data() : nullptr, b0, b1, a1);
iir1Reset<N_CHANNELS>(x0.data(), y0 != BW_NULL ? y0.data() : BW_NULL, s0 != BW_NULL ? s0.data() : BW_NULL, b0, b1, a1);
}
# endif

View File

@ -883,7 +883,7 @@ inline void iir2Reset(
float b2,
float a1,
float a2) {
iir2Reset<N_CHANNELS>(x0.data(), y0 != nullptr ? y0.data() : nullptr, s10 != nullptr ? s10.data() : nullptr, s20 != nullptr ? s20.data() : nullptr, b0, b1, b2, a1, a2);
iir2Reset<N_CHANNELS>(x0.data(), y0 != BW_NULL ? y0.data() : BW_NULL, s10 != BW_NULL ? s10.data() : BW_NULL, s20 != BW_NULL ? s20.data() : BW_NULL, b0, b1, b2, a1, a2);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* First-order lowpass filter (6 dB/oct) with unitary DC gain.
@ -30,6 +30,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -753,7 +759,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -763,12 +769,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -825,7 +831,7 @@ inline void LP1<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_lp1_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_lp1_reset_state(&coeffs, states + i, x0);
else
@ -838,7 +844,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -855,7 +861,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* 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,6 +28,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -789,7 +795,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -799,12 +805,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -867,7 +873,7 @@ inline void LS1<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_ls1_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_ls1_reset_state(&coeffs, states + i, x0);
else
@ -880,7 +886,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -897,7 +903,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* 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,6 +28,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -852,7 +858,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -862,12 +868,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -933,7 +939,7 @@ inline void LS2<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_ls2_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_ls2_reset_state(&coeffs, states + i, x0);
else
@ -946,7 +952,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : y0);
}
# endif
@ -963,7 +969,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order multimode filter.
@ -33,6 +33,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -747,7 +753,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -757,12 +763,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -825,7 +831,7 @@ inline void MM1<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_mm1_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_mm1_reset_state(&coeffs, states + i, x0);
else
@ -838,7 +844,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -855,7 +861,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order multimode filter.
@ -34,6 +34,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -856,7 +862,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -866,12 +872,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -943,7 +949,7 @@ inline void MM2<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_mm2_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_mm2_reset_state(&coeffs, states + i, x0);
else
@ -956,7 +962,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -973,7 +979,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_env_follow bw_math bw_one_pole }}}
* description {{{
* Noise gate with independent sidechain input.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -841,7 +847,7 @@ public:
void reset(
float x0 = 0.f,
float xSc0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -853,13 +859,13 @@ public:
void reset(
const float * x0,
const float * xSc0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# 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);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -933,7 +939,7 @@ inline void NoiseGate<N_CHANNELS>::reset(
float xSc0,
float * BW_RESTRICT y0) {
bw_noise_gate_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_noise_gate_reset_state(&coeffs, states + i, x0, xSc0);
else
@ -947,7 +953,7 @@ inline void NoiseGate<N_CHANNELS>::reset(
float x0,
float xSc0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0, xSc0, y0 != nullptr ? y0->data() : nullptr);
reset(x0, xSc0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -966,7 +972,7 @@ inline void NoiseGate<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> xSc0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0) {
reset(x0.data(), xSc0.data(), y0 != nullptr ? y0->data() : nullptr);
reset(x0.data(), xSc0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order notch filter with unitary gain at DC and asymptotically as
@ -28,6 +28,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -697,7 +703,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -707,12 +713,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -772,7 +778,7 @@ inline void Notch<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_notch_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_notch_reset_state(&coeffs, states + i, x0);
else
@ -785,7 +791,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -802,7 +808,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -32,6 +32,8 @@
* <ul>
* <li>Verison <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* <li>Fixed typo in the documentation of
* <code>bw_one_pole_get_sticky_mode()</code>.</li>
* </ul>
@ -1315,7 +1317,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -1325,12 +1327,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -1409,7 +1411,7 @@ inline void OnePole<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_one_pole_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_one_pole_reset_state(&coeffs, states + i, x0);
else
@ -1422,7 +1424,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -1439,7 +1441,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common }}}
* description {{{
* Post-filter to decolorate oscillator waveshapers when antialiasing is on.
@ -33,6 +33,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -352,7 +358,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -362,12 +368,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -406,7 +412,7 @@ template<size_t N_CHANNELS>
inline void OscFilt<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_osc_filt_reset_state(states + i, x0);
else
@ -419,7 +425,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -435,7 +441,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* 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,6 +35,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -943,7 +949,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -953,12 +959,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -1030,7 +1036,7 @@ inline void Peak<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_peak_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_peak_reset_state(&coeffs, states + i, x0);
else
@ -1043,7 +1049,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : y0);
}
# endif
@ -1060,7 +1066,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Phase generator with portamento and exponential frequency modulation.
@ -29,6 +29,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added phase_inc_min and phase_inc_max parameters.</li>
@ -1069,8 +1075,8 @@ public:
void reset(
float phase0 = 0.f,
float * BW_RESTRICT y0 = nullptr,
float * BW_RESTRICT yInc0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL,
float * BW_RESTRICT yInc0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -1081,14 +1087,14 @@ public:
void reset(
const float * phase0,
float * y0 = nullptr,
float * yInc0 = nullptr);
float * y0 = BW_NULL,
float * yInc0 = BW_NULL);
# 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);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL,
std::array<float, N_CHANNELS> * BW_RESTRICT yInc0 = BW_NULL);
# endif
void process(
@ -1151,8 +1157,8 @@ inline void PhaseGen<N_CHANNELS>::reset(
float * BW_RESTRICT y0,
float * BW_RESTRICT yInc0) {
bw_phase_gen_reset_coeffs(&coeffs);
if (y0 != nullptr) {
if (yInc0 != nullptr) {
if (y0 != BW_NULL) {
if (yInc0 != BW_NULL) {
for (size_t i = 0; i < N_CHANNELS; i++)
bw_phase_gen_reset_state(&coeffs, states + i, phase0, y0 + i, yInc0 + i);
} else {
@ -1162,7 +1168,7 @@ inline void PhaseGen<N_CHANNELS>::reset(
}
}
} else {
if (yInc0 != nullptr) {
if (yInc0 != BW_NULL) {
for (size_t i = 0; i < N_CHANNELS; i++) {
float v;
bw_phase_gen_reset_state(&coeffs, states + i, phase0, &v, yInc0 + i);
@ -1182,7 +1188,7 @@ inline void PhaseGen<N_CHANNELS>::reset(
float phase0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0,
std::array<float, N_CHANNELS> * BW_RESTRICT yInc0) {
reset(phase0, y0 != nullptr ? y0->data() : nullptr, yInc0 != nullptr ? yInc0->data() : nullptr);
reset(phase0, y0 != BW_NULL ? y0->data() : BW_NULL, yInc0 != BW_NULL ? yInc0->data() : BW_NULL);
}
# endif
@ -1201,7 +1207,7 @@ inline void PhaseGen<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> phase0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0,
std::array<float, N_CHANNELS> * BW_RESTRICT yInc0) {
reset(phase0.data(), y0 != nullptr ? y0->data() : nullptr, yInc0 != nullptr ? yInc0->data() : nullptr);
reset(phase0.data(), y0 != BW_NULL ? y0->data() : BW_NULL, yInc0 != BW_NULL ? yInc0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{
* bw_ap1 bw_common bw_lp1 bw_math bw_one_pole bw_osc_sin bw_phase_gen
* }}}
@ -30,6 +30,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -731,7 +737,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -741,12 +747,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -803,7 +809,7 @@ inline void Phaser<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_phaser_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_phaser_reset_state(&coeffs, states + i, x0);
else
@ -816,7 +822,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -833,7 +839,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common }}}
* description {{{
* Pinking filter.
@ -40,6 +40,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -691,7 +697,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -701,12 +707,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -759,7 +765,7 @@ inline void PinkFilt<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_pink_filt_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_pink_filt_reset_state(&coeffs, states + i, x0);
else
@ -772,7 +778,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -789,7 +795,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_env_follow bw_math bw_one_pole }}}
* description {{{
* Digital peak programme meter with adjustable integration time constant.
@ -30,6 +30,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -658,7 +664,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -668,12 +674,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -727,7 +733,7 @@ inline void PPM<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_ppm_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_ppm_reset_state(&coeffs, states + i, x0);
else
@ -740,7 +746,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -757,7 +763,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* 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,6 +35,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -1276,8 +1282,8 @@ public:
void reset(
float xL0 = 0.f,
float xR0 = 0.f,
float * BW_RESTRICT yL0 = nullptr,
float * BW_RESTRICT yR0 = nullptr);
float * BW_RESTRICT yL0 = BW_NULL,
float * BW_RESTRICT yR0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -1290,15 +1296,15 @@ public:
void reset(
const float * xL0,
const float * xR0,
float * yL0 = nullptr,
float * yR0 = nullptr);
float * yL0 = BW_NULL,
float * yR0 = BW_NULL);
# 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);
std::array<float, N_CHANNELS> * BW_RESTRICT yL0 = BW_NULL,
std::array<float, N_CHANNELS> * BW_RESTRICT yR0 = BW_NULL);
# endif
void process(
@ -1353,12 +1359,12 @@ inline Reverb<N_CHANNELS>::Reverb() {
bw_reverb_init(&coeffs);
for (size_t i = 0; i < N_CHANNELS; i++)
statesP[i] = states + i;
mem = nullptr;
mem = BW_NULL;
}
template<size_t N_CHANNELS>
inline Reverb<N_CHANNELS>::~Reverb() {
if (mem != nullptr)
if (mem != BW_NULL)
operator delete(mem);
}
@ -1367,7 +1373,7 @@ inline void Reverb<N_CHANNELS>::setSampleRate(
float sampleRate) {
bw_reverb_set_sample_rate(&coeffs, sampleRate);
size_t req = bw_reverb_mem_req(&coeffs);
if (mem != nullptr)
if (mem != BW_NULL)
operator delete(mem);
mem = operator new(req * N_CHANNELS);
void *m = mem;
@ -1382,8 +1388,8 @@ inline void Reverb<N_CHANNELS>::reset(
float * BW_RESTRICT yL0,
float * BW_RESTRICT yR0) {
bw_reverb_reset_coeffs(&coeffs);
if (yL0 != nullptr) {
if (yR0 != nullptr) {
if (yL0 != BW_NULL) {
if (yR0 != BW_NULL) {
for (size_t i = 0; i < N_CHANNELS; i++)
bw_reverb_reset_state(&coeffs, states + i, xL0, xR0, yL0 + i, yR0 + i);
} else {
@ -1392,7 +1398,7 @@ inline void Reverb<N_CHANNELS>::reset(
bw_reverb_reset_state(&coeffs, states + i, xL0, xR0, yL0 + i, &yr);
}
} else {
if (yR0 != nullptr) {
if (yR0 != BW_NULL) {
float yl;
for (size_t i = 0; i < N_CHANNELS; i++)
bw_reverb_reset_state(&coeffs, states + i, xL0, xR0, &yl, yR0 + i);
@ -1411,7 +1417,7 @@ inline void Reverb<N_CHANNELS>::reset(
float xR0,
std::array<float, N_CHANNELS> * BW_RESTRICT yL0,
std::array<float, N_CHANNELS> * BW_RESTRICT yR0) {
reset(xL0, xR0, yL0 != nullptr ? yL0->data() : nullptr, yR0 != nullptr ? yR0->data() : nullptr);
reset(xL0, xR0, yL0 != BW_NULL ? yL0->data() : BW_NULL, yR0 != BW_NULL ? yR0->data() : BW_NULL);
}
# endif
@ -1432,7 +1438,7 @@ inline void Reverb<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> xR0,
std::array<float, N_CHANNELS> * BW_RESTRICT yL0,
std::array<float, N_CHANNELS> * BW_RESTRICT yR0) {
reset(xL0.data(), xR0.data(), yL0 != nullptr ? yL0->data() : nullptr, yR0 != nullptr ? yR0->data() : nullptr);
reset(xL0.data(), xR0.data(), yL0 != BW_NULL ? yL0->data() : BW_NULL, yR0 != BW_NULL ? yR0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Antialiased tanh-based saturation with parametric bias and gain
@ -45,6 +45,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -806,7 +812,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -816,12 +822,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -878,7 +884,7 @@ inline void Satur<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_satur_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_satur_reset_state(&coeffs, states + i, x0);
else
@ -891,7 +897,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -908,7 +914,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Slew-rate limiter with separate maximum increasing and decreasing rates.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -932,7 +938,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -942,12 +948,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -1007,7 +1013,7 @@ inline void SlewLim<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_slew_lim_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_slew_lim_reset_state(&coeffs, states + i, x0);
else
@ -1020,7 +1026,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -1037,7 +1043,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Sample rate reducer.
@ -31,6 +31,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -618,7 +624,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -628,12 +634,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -684,7 +690,7 @@ inline void SRReduce<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_sr_reduce_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_sr_reduce_reset_state(&coeffs, states + i, x0);
else
@ -697,7 +703,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -714,7 +720,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,13 +20,19 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Aribtrary-ratio IIR sample rate converter.
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -563,7 +569,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -573,12 +579,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -622,7 +628,7 @@ template<size_t N_CHANNELS>
inline void SRC<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_src_reset_state(&coeffs, states + i, x0);
else
@ -635,7 +641,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -651,7 +657,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Integer-ratio IIR sample rate converter.
@ -33,6 +33,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -538,7 +544,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -548,26 +554,26 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
const float * BW_RESTRICT const * BW_RESTRICT x,
float * const * BW_RESTRICT y,
size_t nInSamples,
size_t * BW_RESTRICT nOutSamples = nullptr);
size_t * BW_RESTRICT nOutSamples = BW_NULL);
# 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);
std::array<size_t, N_CHANNELS> * BW_RESTRICT nOutSamples = BW_NULL);
# endif
/*! <<<...
* }
@ -597,7 +603,7 @@ template<size_t N_CHANNELS>
inline void SRCInt<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_src_int_reset_state(&coeffs, states + i, x0);
else
@ -610,7 +616,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -626,7 +632,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -646,7 +652,7 @@ inline void SRCInt<N_CHANNELS>::process(
std::array<float * BW_RESTRICT, N_CHANNELS> y,
size_t nInSamples,
std::array<size_t, N_CHANNELS> * BW_RESTRICT nOutSamples) {
process(x.data(), y.data(), nInSamples, nOutSamples ? nOutSamples->data() : nullptr);
process(x.data(), y.data(), nInSamples, nOutSamples ? nOutSamples->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* State variable filter (2nd order, 12 dB/oct) model with separated lowpass,
@ -28,6 +28,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -1125,9 +1131,9 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT yLp0 = nullptr,
float * BW_RESTRICT yBp0 = nullptr,
float * BW_RESTRICT yHp0 = nullptr);
float * BW_RESTRICT yLp0 = BW_NULL,
float * BW_RESTRICT yBp0 = BW_NULL,
float * BW_RESTRICT yHp0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -1139,16 +1145,16 @@ public:
void reset(
const float * x0,
float * yLp0 = nullptr,
float * yBp0 = nullptr,
float * yHp0 = nullptr);
float * yLp0 = BW_NULL,
float * yBp0 = BW_NULL,
float * yHp0 = BW_NULL);
# 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);
std::array<float, N_CHANNELS> * BW_RESTRICT yLp0 = BW_NULL,
std::array<float, N_CHANNELS> * BW_RESTRICT yBp0 = BW_NULL,
std::array<float, N_CHANNELS> * BW_RESTRICT yHp0 = BW_NULL);
# endif
void process(
@ -1214,9 +1220,9 @@ inline void SVF<N_CHANNELS>::reset(
float * BW_RESTRICT yBp0,
float * BW_RESTRICT yHp0) {
bw_svf_reset_coeffs(&coeffs);
if (yLp0 != nullptr) {
if (yBp0 != nullptr) {
if (yHp0 != nullptr) {
if (yLp0 != BW_NULL) {
if (yBp0 != BW_NULL) {
if (yHp0 != BW_NULL) {
for (size_t i = 0; i < N_CHANNELS; i++)
bw_svf_reset_state(&coeffs, states + i, x0, yLp0 + i, yBp0 + i, yHp0 + i);
} else {
@ -1226,7 +1232,7 @@ inline void SVF<N_CHANNELS>::reset(
}
}
} else {
if (yHp0 != nullptr) {
if (yHp0 != BW_NULL) {
for (size_t i = 0; i < N_CHANNELS; i++) {
float vBp;
bw_svf_reset_state(&coeffs, states + i, x0, yLp0 + i, &vBp, yHp0 + i);
@ -1239,8 +1245,8 @@ inline void SVF<N_CHANNELS>::reset(
}
}
} else {
if (yBp0 != nullptr) {
if (yHp0 != nullptr) {
if (yBp0 != BW_NULL) {
if (yHp0 != BW_NULL) {
for (size_t i = 0; i < N_CHANNELS; i++) {
float vLp;
bw_svf_reset_state(&coeffs, states + i, x0, &vLp, yBp0 + i, yHp0 + i);
@ -1252,7 +1258,7 @@ inline void SVF<N_CHANNELS>::reset(
}
}
} else {
if (yHp0 != nullptr) {
if (yHp0 != BW_NULL) {
for (size_t i = 0; i < N_CHANNELS; i++) {
float vLp, vBp;
bw_svf_reset_state(&coeffs, states + i, x0, &vLp, &vBp, yHp0 + i);
@ -1274,7 +1280,7 @@ inline void SVF<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT yLp0,
std::array<float, N_CHANNELS> * BW_RESTRICT yBp0,
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);
reset(x0, yLp0 != BW_NULL ? yLp0->data() : BW_NULL, yBp0 != BW_NULL ? yBp0->data() : BW_NULL, yHp0 != BW_NULL ? yHp0->data() : BW_NULL);
}
# endif
@ -1295,7 +1301,7 @@ inline void SVF<N_CHANNELS>::reset(
std::array<float, N_CHANNELS> * BW_RESTRICT yLp0,
std::array<float, N_CHANNELS> * BW_RESTRICT yBp0,
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);
reset(x0.data(), yLp0 != BW_NULL ? yLp0->data() : BW_NULL, yBp0 != BW_NULL ? yBp0->data() : BW_NULL, yHp0 != BW_NULL ? yHp0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2023, 2024 Orastron Srl unipersonale
* Copyright (C) 2023-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{
* bw_common bw_math bw_one_pole bw_osc_sin bw_phase_gen bw_ring_mod
* }}}
@ -29,6 +29,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -652,7 +658,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -662,12 +668,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -721,7 +727,7 @@ inline void Trem<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_trem_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_trem_reset_state(&coeffs, states + i, x0);
else
@ -734,7 +740,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -751,7 +757,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif

View File

@ -1,7 +1,7 @@
/*
* Brickworks
*
* Copyright (C) 2022-2024 Orastron Srl unipersonale
* Copyright (C) 2022-2025 Orastron Srl unipersonale
*
* Brickworks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
* version {{{ 1.2.0 }}}
* version {{{ 1.2.1 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Wah effect.
@ -29,6 +29,12 @@
* }}}
* changelog {{{
* <ul>
* <li>Version <strong>1.2.1</strong>:
* <ul>
* <li>Now using <code>BW_NULL</code> in the C++ API and
* implementation.</li>
* </ul>
* </li>
* <li>Version <strong>1.2.0</strong>:
* <ul>
* <li>Added support for <code>BW_INCLUDE_WITH_QUOTES</code>,
@ -626,7 +632,7 @@ public:
void reset(
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
float * BW_RESTRICT y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
@ -636,12 +642,12 @@ public:
void reset(
const float * x0,
float * y0 = nullptr);
float * y0 = BW_NULL);
# ifndef BW_CXX_NO_ARRAY
void reset(
std::array<float, N_CHANNELS> x0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = nullptr);
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void process(
@ -692,7 +698,7 @@ inline void Wah<N_CHANNELS>::reset(
float x0,
float * BW_RESTRICT y0) {
bw_wah_reset_coeffs(&coeffs);
if (y0 != nullptr)
if (y0 != BW_NULL)
for (size_t i = 0; i < N_CHANNELS; i++)
y0[i] = bw_wah_reset_state(&coeffs, states + i, x0);
else
@ -705,7 +711,7 @@ 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);
reset(x0, y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif
@ -722,7 +728,7 @@ 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);
reset(x0.data(), y0 != BW_NULL ? y0->data() : BW_NULL);
}
# endif