updated init value name in bw_{slew_lim,one_pole} + updated TODO
This commit is contained in:
parent
ec1a70835c
commit
6b38be600e
4
TODO
4
TODO
@ -34,15 +34,11 @@ code:
|
|||||||
* drywet -> dry_wet, ringmod -> ring_mod, etc?
|
* drywet -> dry_wet, ringmod -> ring_mod, etc?
|
||||||
* allow nullptr in C++ wrappers where process_multi arg can be NULL
|
* allow nullptr in C++ wrappers where process_multi arg can be NULL
|
||||||
* better src filter
|
* better src filter
|
||||||
* bw_env_gen process_multi gate const?
|
|
||||||
* c++ get coeffs/state? or public? src nIn/OutSamples case (array vs single value), delay read/write, process1? process single?
|
* c++ get coeffs/state? or public? src nIn/OutSamples case (array vs single value), delay read/write, process1? process single?
|
||||||
* check unititialized warnings (check fxpp_comp in particular vs fxpp_satur)
|
* check unititialized warnings (check fxpp_comp in particular vs fxpp_satur)
|
||||||
* clearly specify that state is tied to a particular set of coeffs (1:N)
|
* clearly specify that state is tied to a particular set of coeffs (1:N)
|
||||||
* modulation vs process (multi) no update (post 1.0.0)???
|
* modulation vs process (multi) no update (post 1.0.0)???
|
||||||
* check assumptions w.r.t. usage of math functions
|
* check assumptions w.r.t. usage of math functions
|
||||||
* extern "C" in a macro to be individually applied (easier #include)
|
|
||||||
* x_0 vs y_z1 (eg svf vs one_pole/slew_lim)
|
|
||||||
* float **y -> float * const *y
|
|
||||||
|
|
||||||
build system:
|
build system:
|
||||||
* single header generation (vs modules in bwp... to think about)
|
* single header generation (vs modules in bwp... to think about)
|
||||||
|
@ -133,10 +133,10 @@ static inline void bw_one_pole_reset_coeffs(bw_one_pole_coeffs *BW_RESTRICT coef
|
|||||||
*
|
*
|
||||||
* #### bw_one_pole_reset_state()
|
* #### bw_one_pole_reset_state()
|
||||||
* ```>>> */
|
* ```>>> */
|
||||||
static inline void bw_one_pole_reset_state(const bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state *BW_RESTRICT state, float y_z1);
|
static inline void bw_one_pole_reset_state(const bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state *BW_RESTRICT state, float x_0);
|
||||||
/*! <<<```
|
/*! <<<```
|
||||||
* Resets the given `state` to its initial values using the given `coeffs`
|
* Resets the given `state` to its initial values using the given `coeffs`
|
||||||
* and the quiescent/equilibrium value `y_z1`.
|
* and the quiescent/initial input value `x_0`.
|
||||||
*
|
*
|
||||||
* #### bw_one_pole_update_coeffs_ctrl()
|
* #### bw_one_pole_update_coeffs_ctrl()
|
||||||
* ```>>> */
|
* ```>>> */
|
||||||
@ -451,15 +451,15 @@ static inline void bw_one_pole_reset_coeffs(bw_one_pole_coeffs *BW_RESTRICT coef
|
|||||||
BW_ASSERT_DEEP(coeffs->state == bw_one_pole_coeffs_state_reset_coeffs);
|
BW_ASSERT_DEEP(coeffs->state == bw_one_pole_coeffs_state_reset_coeffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void bw_one_pole_reset_state(const bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state *BW_RESTRICT state, float y_z1) {
|
static inline void bw_one_pole_reset_state(const bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state *BW_RESTRICT state, float x_0) {
|
||||||
BW_ASSERT(coeffs != NULL);
|
BW_ASSERT(coeffs != NULL);
|
||||||
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
|
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
|
||||||
BW_ASSERT_DEEP(coeffs->state >= bw_one_pole_coeffs_state_reset_coeffs);
|
BW_ASSERT_DEEP(coeffs->state >= bw_one_pole_coeffs_state_reset_coeffs);
|
||||||
BW_ASSERT(state != NULL);
|
BW_ASSERT(state != NULL);
|
||||||
BW_ASSERT(bw_is_finite(y_z1));
|
BW_ASSERT(bw_is_finite(x_0));
|
||||||
|
|
||||||
(void)coeffs;
|
(void)coeffs;
|
||||||
state->y_z1 = y_z1;
|
state->y_z1 = x_0;
|
||||||
|
|
||||||
#ifdef BW_DEBUG_DEEP
|
#ifdef BW_DEBUG_DEEP
|
||||||
state->hash = bw_hash_sdbm("bw_one_pole_state");
|
state->hash = bw_hash_sdbm("bw_one_pole_state");
|
||||||
@ -1030,10 +1030,10 @@ inline void OnePole<N_CHANNELS>::setSampleRate(float sampleRate) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<size_t N_CHANNELS>
|
template<size_t N_CHANNELS>
|
||||||
inline void OnePole<N_CHANNELS>::reset(float y_z1) {
|
inline void OnePole<N_CHANNELS>::reset(float x_0) {
|
||||||
bw_one_pole_reset_coeffs(&coeffs);
|
bw_one_pole_reset_coeffs(&coeffs);
|
||||||
for (size_t i = 0; i < N_CHANNELS; i++)
|
for (size_t i = 0; i < N_CHANNELS; i++)
|
||||||
bw_one_pole_reset_state(&coeffs, states + i, y_z1);
|
bw_one_pole_reset_state(&coeffs, states + i, x_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<size_t N_CHANNELS>
|
template<size_t N_CHANNELS>
|
||||||
|
@ -109,10 +109,10 @@ static inline void bw_slew_lim_reset_coeffs(bw_slew_lim_coeffs *BW_RESTRICT coef
|
|||||||
*
|
*
|
||||||
* #### bw_slew_lim_reset_state()
|
* #### bw_slew_lim_reset_state()
|
||||||
* ```>>> */
|
* ```>>> */
|
||||||
static inline void bw_slew_lim_reset_state(const bw_slew_lim_coeffs *BW_RESTRICT coeffs, bw_slew_lim_state *BW_RESTRICT state, float y_z1);
|
static inline void bw_slew_lim_reset_state(const bw_slew_lim_coeffs *BW_RESTRICT coeffs, bw_slew_lim_state *BW_RESTRICT state, float x_0);
|
||||||
/*! <<<```
|
/*! <<<```
|
||||||
* Resets the given `state` to its initial values using the given `coeffs`
|
* Resets the given `state` to its initial values using the given `coeffs`
|
||||||
* and the quiescent/equilibrium value `y_z1`.
|
* and the quiescent/equilibrium value `x_0`.
|
||||||
*
|
*
|
||||||
* #### bw_slew_lim_update_coeffs_ctrl()
|
* #### bw_slew_lim_update_coeffs_ctrl()
|
||||||
* ```>>> */
|
* ```>>> */
|
||||||
@ -256,9 +256,9 @@ static inline void bw_slew_lim_reset_coeffs(bw_slew_lim_coeffs *BW_RESTRICT coef
|
|||||||
bw_slew_lim_update_coeffs_ctrl(coeffs);
|
bw_slew_lim_update_coeffs_ctrl(coeffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void bw_slew_lim_reset_state(const bw_slew_lim_coeffs *BW_RESTRICT coeffs, bw_slew_lim_state *BW_RESTRICT state, float y_z1) {
|
static inline void bw_slew_lim_reset_state(const bw_slew_lim_coeffs *BW_RESTRICT coeffs, bw_slew_lim_state *BW_RESTRICT state, float x_0) {
|
||||||
(void)coeffs;
|
(void)coeffs;
|
||||||
state->y_z1 = y_z1;
|
state->y_z1 = x_0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void bw_slew_lim_update_coeffs_ctrl(bw_slew_lim_coeffs *BW_RESTRICT coeffs) {
|
static inline void bw_slew_lim_update_coeffs_ctrl(bw_slew_lim_coeffs *BW_RESTRICT coeffs) {
|
||||||
@ -464,10 +464,10 @@ inline void SlewLim<N_CHANNELS>::setSampleRate(float sampleRate) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<size_t N_CHANNELS>
|
template<size_t N_CHANNELS>
|
||||||
inline void SlewLim<N_CHANNELS>::reset(float y_z1) {
|
inline void SlewLim<N_CHANNELS>::reset(float x_0) {
|
||||||
bw_slew_lim_reset_coeffs(&coeffs);
|
bw_slew_lim_reset_coeffs(&coeffs);
|
||||||
for (size_t i = 0; i < N_CHANNELS; i++)
|
for (size_t i = 0; i < N_CHANNELS; i++)
|
||||||
bw_slew_lim_reset_state(&coeffs, states + i, y_z1);
|
bw_slew_lim_reset_state(&coeffs, states + i, x_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<size_t N_CHANNELS>
|
template<size_t N_CHANNELS>
|
||||||
|
Loading…
Reference in New Issue
Block a user