Skip to content

Commit

Permalink
added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
corrados committed Nov 7, 2023
1 parent b1128c1 commit c9a8241
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions edrumulus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,7 @@ void Edrumulus::Pad::process_control_sample ( const int* input,
// Detect pedal stomp --------------------------------------------------------
update_fifo ( cur_midi_ctrl_value, ctrl_history_len, ctrl_hist );

// to cope with ADC noise, we use a moving average filter for noise reduction
float prev_ctrl_average = 0.0f;
float cur_ctrl_average = 0.0f;
for ( int i = 0; i < ctrl_history_len_half; i++ )
Expand Down
2 changes: 1 addition & 1 deletion edrumulus.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class Edrumulus
void sched_init() { init_delay_cnt = init_delay_value; }; // schedule initialization function (for delayed initialization)
const float init_delay_value_s = 0.2; // init delay value in seconds
static const int length_ampmap = 20; // maxmimum number of amplification mappings for clipping compensation
static const int ctrl_history_len = 10; // (MUST BE AN EVEN VALUE) control history length, use a fixed value
static const int ctrl_history_len = 10; // (MUST BE AN EVEN VALUE) control history length; the longer, the more noise reduction but more delay

// band-pass filter coefficients (they are constant and must not be changed)
const int bp_filt_len = 5;
Expand Down

0 comments on commit c9a8241

Please sign in to comment.