projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c01c0f
)
demo_filterbank.py: add simple filterbank demo
author
Paul Brossier
<piem@piem.org>
Fri, 25 Dec 2009 05:12:44 +0000
(06:12 +0100)
committer
Paul Brossier
<piem@piem.org>
Fri, 25 Dec 2009 05:12:44 +0000
(06:12 +0100)
interfaces/python/demo_filterbank.py
[new file with mode: 0644]
patch
|
blob
diff --git a/interfaces/python/demo_filterbank.py
b/interfaces/python/demo_filterbank.py
new file mode 100644
(file)
index 0000000..
012777f
--- /dev/null
+++ b/
interfaces/python/demo_filterbank.py
@@ -0,0
+1,13
@@
+from _aubio import filterbank
+from numpy import array
+
+f = filterbank(9, 1024)
+freq_list = [40, 80, 200, 400, 800, 1600, 3200, 6400, 12800, 15000, 24000]
+freqs = array(freq_list, dtype = 'float32')
+f.set_triangle_bands(freqs, 48000)
+f.get_coeffs().T
+
+from pylab import loglog, show
+loglog(f.get_coeffs().T, '+-')
+show()
+