source: interfaces/python/demo_filterbank.py @ d836c21

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since d836c21 was b8aaaff, checked in by Paul Brossier <piem@piem.org>, 15 years ago

demo_filterbank.py: add simple filterbank demo

  • Property mode set to 100644
File size: 321 bytes
Line 
1from _aubio import filterbank
2from numpy import array
3
4f = filterbank(9, 1024)
5freq_list = [40, 80, 200, 400, 800, 1600, 3200, 6400, 12800, 15000, 24000]
6freqs = array(freq_list, dtype = 'float32')
7f.set_triangle_bands(freqs, 48000)
8f.get_coeffs().T
9
10from pylab import loglog, show
11loglog(f.get_coeffs().T, '+-')
12show()
13
Note: See TracBrowser for help on using the repository browser.