From: Paul Brossier Date: Wed, 11 Jul 2012 19:45:12 +0000 (-0600) Subject: demo_filterbank.py: added simple demo X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b84c0c229b6ee7f84ab43aba8e07c4586309d726;p=aubio.git demo_filterbank.py: added simple demo --- diff --git a/interfaces/python/demo_filterbank.py b/interfaces/python/demo_filterbank.py old mode 100644 new mode 100755 index 19c09af7..1b90ad3f --- a/interfaces/python/demo_filterbank.py +++ b/interfaces/python/demo_filterbank.py @@ -1,12 +1,16 @@ -from aubio import filterbank, fvec +#! /usr/bin/python + +try: + from aubio import filterbank, fvec +except ImportError: + import localaubio + from aubio import filterbank, fvec f = filterbank(9, 1024) freq_list = [60, 80, 200, 400, 800, 1600, 3200, 6400, 12800, 15000, 24000] freqs = fvec(freq_list) f.set_triangle_bands(freqs, 48000) -f.get_coeffs().T from pylab import loglog, show loglog(f.get_coeffs().T, '+-') show() -