History

fixed frequency calculation in tRetune

spiricom committed 6 years ago

Commit 6e63ff91 parent c1f26964 files · +1 −1Browse files

Unified · Split

4 files
  1. .DS_Store +0 −0
  2. LEAF/.DS_Store +0 −0
  3. LEAF/Src/leaf-analysis.c +1 −1
  4. LEAF/Src/leaf-effects.c +2 −2
.DS_Store+0−0

Binary file not shown.

LEAF/.DS_Store+0−0

Binary file not shown.

LEAF/Src/leaf-analysis.c+1−1
@@ -609,7 +609,7 @@ static void snac_analyzeframe(tSNAC* const snac) · 608 unmodified lines
609609 int n, tindex = s->timeindex;
610610 int framesize = s->framesize;
611611 int mask = framesize - 1;
612− float norm = 1. / sqrt((float)(framesize * 2));
612+ float norm = 1.0f / sqrtf((float)(framesize * 2));
613613
614614 float *inputbuf = s->inputbuf;
615615 float *processbuf = s->processbuf;
LEAF/Src/leaf-effects.c+2−2
@@ -1209,14 +1209,14 @@ float tRetune_getInputPeriod(tRetune* const rt) · 1208 unmodified lines
12091209 {
12101210 _tRetune* r = *rt;
12111211
1212− return r->inputPeriod;
1212+ return (r->inputPeriod * leaf.invSampleRate);
12131213 }
12141214
12151215 float tRetune_getInputFreq(tRetune* const rt)
12161216 {
12171217 _tRetune* r = *rt;
12181218
1219− return 1.0f/r->inputPeriod;
1219+ return 1.0f/(r->inputPeriod * leaf.invSampleRate);
12201220 }
12211221
12221222 //============================================================================================================

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t