Mercurial > hg > cm
view run.py @ 4:29cd3e735c4c
* Added run.py for testing
* Changed frequency decomposition to bank of gammatones
author | Carl Bussey <c.bussey@se10.qmul.ac.uk> |
---|---|
date | Sat, 22 Feb 2014 13:53:55 +0000 |
parents | |
children | d7b2784ff5a3 |
line wrap: on
line source
import cortical_model as cm import numpy as np import utils t = np.array(range(44100)) sine = np.sin(2*np.pi*t*1000/44100) sine1 = np.sin(2*np.pi*t*100/44100) x = np.append(sine, sine1) exc_i = cm.get_excitation_i(x, 44100, 90, verbose = True) sl = cm.get_specific_loudness(exc_i) for i in range(39): print "ERB " + str(i) utils.plot_waveform(sl[i]) print "Loudness" loudness = np.sum(sl,0) utils.plot_waveform(loudness)