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
609 int n, tindex = s->timeindex;609 int n, tindex = s->timeindex;
610 int framesize = s->framesize;610 int framesize = s->framesize;
611 int mask = framesize - 1;611 int mask = framesize - 1;
612 float norm = 1. / sqrt((float)(framesize * 2));612 float norm = 1.0f / sqrtf((float)(framesize * 2));
613 613
614 float *inputbuf = s->inputbuf;614 float *inputbuf = s->inputbuf;
615 float *processbuf = s->processbuf;615 float *processbuf = s->processbuf;
LEAF/Src/leaf-effects.c+2−2
@@ -1209,14 +1209,14 @@ float tRetune_getInputPeriod(tRetune* const rt) · 1208 unmodified lines
1209{1209{
1210 _tRetune* r = *rt;1210 _tRetune* r = *rt;
1211 1211
1212 return r->inputPeriod;1212 return (r->inputPeriod * leaf.invSampleRate);
1213}1213}
1214 1214
1215float tRetune_getInputFreq(tRetune* const rt)1215float tRetune_getInputFreq(tRetune* const rt)
1216{1216{
1217 _tRetune* r = *rt;1217 _tRetune* r = *rt;
1218 1218
1219 return 1.0f/r->inputPeriod;1219 return 1.0f/(r->inputPeriod * leaf.invSampleRate);
1220}1220}
1221 1221
1222//============================================================================================================1222//============================================================================================================

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