From b84c0c229b6ee7f84ab43aba8e07c4586309d726 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 11 Jul 2012 13:45:12 -0600 Subject: [PATCH] demo_filterbank.py: added simple demo --- interfaces/python/demo_filterbank.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) mode change 100644 => 100755 interfaces/python/demo_filterbank.py 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() - -- 2.26.2