diff --git a/TODO b/TODO
index 3b78934..2abe9da 100644
--- a/TODO
+++ b/TODO
@@ -6,7 +6,6 @@ code:
* check all examples again
* osc post filter (and one pole init, slew rate, etc.) val from input? set state instead?
* audio rate optional pulse width/slope inputs?
-* one pole process const input? (return also if const out)
* empty functions etc. to keep consistency and forward compatibility?
* float in [-1,1] for velocity, pitch bend, mod wheel
* should clip slope in triangle?
@@ -25,7 +24,6 @@ code:
* bw_fuzz gain compensation?
* make gain of distortions homogeneous?
* max_delay -> set sample rate? see reverb
-* update state ctrl -> process ctrl?
* mem req -> return value of set sample rate?
* peak gain + Q ???
* sr_reduce reset_coeffs? update_coeffs? process_multi?
@@ -71,6 +69,7 @@ code:
* any chance to avoid casts in C for const X * const * input arguments?
* heavy debug (e.g. also stripping restrict) vs light debug vs release vs optimized makefile rules
* smaller optimized modules (e.g., simple one pole)
+* one pole, slew lim, maybe others: process const input? (return also if const out)
build system:
* make makefiles handle paths with spaces etc
diff --git a/include/bw_env_gen.h b/include/bw_env_gen.h
index 1c965f7..36abfba 100644
--- a/include/bw_env_gen.h
+++ b/include/bw_env_gen.h
@@ -42,6 +42,8 @@
*
* - Version 1.0.0:
*
+ * - Renamed
bw_env_gen_update_state_ctrl()
as
+ * bw_env_gen_process_ctrl()
.
* bw_env_gen_process()
and
* bw_env_gen_process_multi()
now use
* size_t
to count samples and channels.
@@ -168,9 +170,9 @@ static inline void bw_env_gen_update_coeffs_audio(bw_env_gen_coeffs *BW_RESTRICT
/*! <<<```
* Triggers audio-rate update of coefficients in `coeffs`.
*
- * #### bw_env_gen_update_state_ctrl()
+ * #### bw_env_gen_process_ctrl()
* ```>>> */
-static inline void bw_env_gen_update_state_ctrl(const bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT state, char gate);
+static inline void bw_env_gen_process_ctrl(const bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT state, char gate);
/*! <<<```
* Triggers control-rate update of the internal `state` using `coeffs` and
* the given `gate` value (`0` for off, non-`0` for on).
@@ -342,7 +344,7 @@ static inline void bw_env_gen_update_coeffs_audio(bw_env_gen_coeffs *BW_RESTRICT
(void)coeffs;
}
-static inline void bw_env_gen_update_state_ctrl(const bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT state, char gate) {
+static inline void bw_env_gen_process_ctrl(const bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT state, char gate) {
(void)coeffs;
if (gate) {
if (state->phase == bw_env_gen_phase_off || state->phase == bw_env_gen_phase_release)
@@ -391,7 +393,7 @@ static inline float bw_env_gen_process1(const bw_env_gen_coeffs *BW_RESTRICT coe
static inline void bw_env_gen_process(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT state, char gate, float *BW_RESTRICT y, size_t n_samples) {
bw_env_gen_update_coeffs_ctrl(coeffs);
- bw_env_gen_update_state_ctrl(coeffs, state, gate);
+ bw_env_gen_process_ctrl(coeffs, state, gate);
if (y != NULL)
for (size_t i = 0; i < n_samples; i++)
y[i] = bw_env_gen_process1(coeffs, state);
@@ -403,7 +405,7 @@ static inline void bw_env_gen_process(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_
static inline void bw_env_gen_process_multi(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT const *BW_RESTRICT state, const char *BW_RESTRICT gate, float *BW_RESTRICT const *BW_RESTRICT y, size_t n_channels, size_t n_samples) {
bw_env_gen_update_coeffs_ctrl(coeffs);
for (size_t j = 0; j < n_channels; j++)
- bw_env_gen_update_state_ctrl(coeffs, state[j], gate[j]);
+ bw_env_gen_process_ctrl(coeffs, state[j], gate[j]);
if (y != NULL)
for (size_t i = 0; i < n_samples; i++)
for (size_t j = 0; j < n_channels; j++) {