diff --git a/src/generators.cpp b/src/generators.cpp index 4933980..8470bea 100644 --- a/src/generators.cpp +++ b/src/generators.cpp @@ -27,7 +27,7 @@ sample_table_t gen_squ() if (i < (DEFAULT_N_SAMPLES / 2)) { squ_vals[i] = 1; } else { - squ_vals[i] = 0; + squ_vals[i] = -1; } } @@ -38,7 +38,7 @@ sample_table_t gen_saw() { sample_table_t saw_vals = {0}; float_t step = 2.0 / DEFAULT_N_SAMPLES; // calculate our incremental step size - float_t val = 0; // place to store calculate value + float_t val = -1; // place to store calculate value // Start low go high [0, 1] for (uint16_t i = 0; i < DEFAULT_N_SAMPLES; i++) { @@ -54,9 +54,9 @@ sample_table_t gen_tri() sample_table_t tri_vals = {0}; uint16_t half_samples = DEFAULT_N_SAMPLES / 2; float_t step = 2.0 / half_samples; // calculate our incremental step size - float_t val = 0; // place to store calculate value + float_t val = -1; // place to store calculate value - // Start low go high then low [0, 1, 0] + // Start low go high then low [-1, 1, -1] for (uint16_t i = 0; i < DEFAULT_N_SAMPLES; i++) { tri_vals[i] = val; if (i < half_samples) {