Skip to content

Commit 0eec9ed

Browse files
committed
comments on frequency ranges
1 parent 197b2f2 commit 0eec9ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libprojectM/Renderer/BeatDetect.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ void BeatDetect::getBeatVals( float samplerate, unsigned fft_length, float *vdat
114114
assert( 512==fft_length || 1024==fft_length ); // should be power of 2, expect >= 512
115115

116116
// TODO: compute ranges based on samplerate
117-
unsigned ranges512[4] = {0, 3, 23, 200};
118-
unsigned ranges1024[4] = {0, 5, 46, 400};
117+
// roughly aiming or basee-mid cutoff of 220ish and mid-treb cutoff of 2000ish, if I did my math right
118+
unsigned ranges512[4] = {0, 3 /* 3*441000/512 = =258 */, 23 /* 23*441000/512 = =1981 */ , 200};
119+
unsigned ranges1024[4] = {0, 5 /* 5*44100/1024 == 215 */, 46 /* 46*44100/1024 == 1981 */, 400};
119120
unsigned *ranges = fft_length==1024 ? ranges1024 : ranges512;
120121

121122
bass_instant = 0;

0 commit comments

Comments
 (0)