mirror of
https://github.com/brmlab/ledbar.git
synced 2025-06-09 13:24:01 +02:00
equalizer: Fix loss of intensity in higher frequencies due to wider ranges
This commit is contained in:
parent
e05a43783f
commit
ca762a30f1
1 changed files with 4 additions and 2 deletions
|
@ -127,6 +127,7 @@ try:
|
||||||
i += 1
|
i += 1
|
||||||
freq += FREQ_STEP
|
freq += FREQ_STEP
|
||||||
freq_limit *= PIXEL_FREQ_RANGE
|
freq_limit *= PIXEL_FREQ_RANGE
|
||||||
|
freq_steps = 1
|
||||||
pixel = 0
|
pixel = 0
|
||||||
count = 0
|
count = 0
|
||||||
volumes = []
|
volumes = []
|
||||||
|
@ -136,9 +137,10 @@ try:
|
||||||
total += abs(fft[i])**2
|
total += abs(fft[i])**2
|
||||||
i += 1; count += 1
|
i += 1; count += 1
|
||||||
freq += FREQ_STEP
|
freq += FREQ_STEP
|
||||||
volume = (total/count)**0.5/SAMPLE_SIZE
|
volume = (total/count)**0.5
|
||||||
volumes.append(volume)
|
volumes.append(volume/SAMPLE_SIZE*freq_steps)
|
||||||
freq_limit *= PIXEL_FREQ_RANGE
|
freq_limit *= PIXEL_FREQ_RANGE
|
||||||
|
freq_steps += 1
|
||||||
pixel += 1
|
pixel += 1
|
||||||
count = 0
|
count = 0
|
||||||
for pixel in xrange(EPIXELS):
|
for pixel in xrange(EPIXELS):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue