Skip to content

Commit

Permalink
Increase RMS integration to roughly 10ms (only used for visualization)
Browse files Browse the repository at this point in the history
  • Loading branch information
x42 committed May 4, 2019
1 parent 432da70 commit 7a30beb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lv2.c
Expand Up @@ -192,7 +192,7 @@ Dyncomp_init (Dyncomp* self, float sample_rate, uint32_t n_channels)
self->t_att = 0.f;
self->t_rel = 0.f;

self->w_rms = 12.f / sample_rate;
self->w_rms = 5.f / sample_rate;
self->w_lpf = 160.f / sample_rate;

Dyncomp_set_attack (self, 0.01f);
Expand Down Expand Up @@ -266,7 +266,7 @@ Dyncomp_process (Dyncomp* self, uint32_t n_samples, float* inp[], float* out[])

v *= n_1;

rms += w_rms * (v - rms);
rms += w_rms * (v - rms); // TODO: consider min/max approach, 5ms integrate, 50ms readout
za1 += w_att * (p_thr + v - za1);

/* hold release */
Expand Down

0 comments on commit 7a30beb

Please sign in to comment.