source: examples/plotfb.py @ f72ceeb

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since f72ceeb was f72ceeb, checked in by Amaury Hazan <mahmoudax@gmail.com>, 17 years ago

aubiomfcc.c: added a dump filterbank funcion
filterbank: written mfcc filterbank init according to slaney auditory toolbox (90%)
plotfb.py: added x log scale option
#some hacks and debug test

  • Property mode set to 100755
File size: 424 bytes
RevLine 
[7a46bf6]1#!/usr/bin/env python
2
3import pylab
4import numpy
5import sys
6
[f72ceeb]7
[7a46bf6]8filename=sys.argv[1]
9
[f72ceeb]10doLog=False
11if len(sys.argv)>2: 
12  if sys.argv[2]=='log':
13    doLog=True
14
[7a46bf6]15mat = pylab.load(filename)
16nmat= numpy.array(mat)
17print numpy.shape(nmat)
18
19pylab.hold(True)
20
21n_filters=numpy.shape(nmat)[0]
22for i in range(n_filters):
[f72ceeb]23  if doLog==True:
24    pylab.semilogx(nmat[i,:])
25  else:
26    pylab.plot(nmat[i,:]) 
[7a46bf6]27
28
29pylab.hold(False)
30pylab.show()
Note: See TracBrowser for help on using the repository browser.