Commit 90e4cb62 authored by Jared Lincenberg's avatar Jared Lincenberg

Added treble 1000-...Hz and extend base to 20-1000

parent 2be34dfe
......@@ -5,13 +5,26 @@ import numpy as np
def getBaseWeight(transform):
freqs = np.fft.fftfreq(len(transform))
hz=[]
for i in range(0,len(freqs[:120])):
for i in range(0,len(freqs[:1000])):
x=i * (44100/len(freqs)/2)
hz.append(x)
tf=zip(list(hz),list(transform))
tf=list(tf)
print()
t1=[t[1] for t in tf if t[0]>20 and t[0]<120]
t1=[t[1] for t in tf if t[0]>20 and t[0]<1000]
print(sum(t1))
tfinal=int(sum(t1)*10)
tfinal=int(sum(t1))
return(tfinal)
def getTrebleWeight(transform):
freqs = np.fft.fftfreq(len(transform))
hz=[]
for i in range(0,len(freqs[1000:])):
x=i * (44100/len(freqs)/2)
hz.append(x)
tf=zip(list(hz),list(transform))
tf=list(tf)
print()
t1=[t[1] for t in tf if t[0]>1000]
print(sum(t1))
tfinal=sum(t1)
return(tfinal)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment