zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit c9d40150022116a1ab9d11d60ca07ceda7f7b67e
parent 9f174377663d712409953aaf6651f9f7a64eea46
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Sun, 21 Dec 2014 11:03:20 -0500

Fix Resonance Application

Diffstat:
Msrc/Synth/Resonance.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Synth/Resonance.cpp b/src/Synth/Resonance.cpp @@ -100,7 +100,7 @@ void Resonance::applyres(int n, fft_t *fftdata, float freq) const for(int i = 1; i < n; ++i) { //compute where the n-th hamonics fits to the graph - const float x = limit((logf(freq) - l1) / l2, 0.0f, INFINITY) * N_RES_POINTS; + const float x = limit((logf(freq*i) - l1) / l2, 0.0f, INFINITY) * N_RES_POINTS; const float dx = x - floor(x); const int kx1 = limit<int>(floor(x), 0, N_RES_POINTS - 1); const int kx2 = limit<int>(kx1 + 1, 0, N_RES_POINTS - 1);