Commit 90e4cb62 by Jared Lincenberg

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

parent 2be34dfe
 ... @@ -5,13 +5,26 @@ import numpy as np ... @@ -5,13 +5,26 @@ import numpy as np def getBaseWeight(transform): def getBaseWeight(transform): freqs = np.fft.fftfreq(len(transform)) freqs = np.fft.fftfreq(len(transform)) hz=[] hz=[] for i in range(0,len(freqs[:120])): for i in range(0,len(freqs[:1000])): x=i * (44100/len(freqs)/2) x=i * (44100/len(freqs)/2) hz.append(x) hz.append(x) tf=zip(list(hz),list(transform)) tf=zip(list(hz),list(transform)) tf=list(tf) tf=list(tf) print() 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)) 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) 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!