shithub: aubio

Download patch

ref: 614963a4992753def0b8f69ad75c2576432d8760
parent: 55012c4cefd8ade0d0b10533aac4bd8552645351
parent: 3cd243456ba97dae6fe6162eb6a6872e250b0d8c
author: Paul Brossier <piem@piem.org>
date: Sun Jul 15 12:44:01 EDT 2012

Merge branch 'develop' into io

--- a/interfaces/python/demo_filterbank_slaney.py
+++ b/interfaces/python/demo_filterbank_slaney.py
@@ -11,13 +11,11 @@
 
 from pylab import loglog, title, show, xlim, ylim, xlabel, ylabel
 xlim([0,samplerate / 2])
-print f.get_coeffs().shape
 times = vstack([arange(win_s / 2 + 1) * samplerate / win_s] * 40)
-print times.shape
 loglog(times.T, f.get_coeffs().T, '.-')
 title('Mel frequency bands coefficients')
 xlim([100, 7500])
 ylim([1.0e-3, 2.0e-2])
-xlabel('frequency (Hz)')
-ylabel('amplitude')
+xlabel('Frequency (Hz)')
+ylabel('Amplitude')
 show()
--- a/interfaces/python/demo_filterbank_triangle_bands.py
+++ b/interfaces/python/demo_filterbank_triangle_bands.py
@@ -20,7 +20,7 @@
 loglog(times.T, f.get_coeffs().T, '.-')
 xlim([50, samplerate/2])
 ylim([1.0e-6, 2.0e-2])
-ylabel('amplitude')
+ylabel('Amplitude')
 
 ## build a new filterbank
 
@@ -41,7 +41,7 @@
 loglog(times.T, f.get_coeffs().T, '.-')
 xlim([50, samplerate/2])
 ylim([1.0e-6, 2.0e-2])
-xlabel('frequency (Hz)')
-ylabel('amplitude')
+xlabel('Frequency (Hz)')
+ylabel('Amplitude')
 
 show()
--- a/src/tempo/beattracking.c
+++ b/src/tempo/beattracking.c
@@ -159,7 +159,7 @@
   /* compute shift invariant comb filterbank */
   for (i = 1; i < laglen - 1; i++) {
     for (a = 1; a <= numelem; a++) {
-      for (b = (1 - a); b < a; b++) {
+      for (b = (1 - a); b < (sint_t)a; b++) {
         bt->acfout->data[i] += bt->acf->data[a * (i + 1) + b - 1]
             * 1. / (2. * a - 1.);
       }
@@ -299,7 +299,7 @@
     fvec_zeros (acfout);
     for (i = 1; i < laglen - 1; i++) {
       for (a = 1; a <= bt->timesig; a++) {
-        for (b = (1 - a); b < a; b++) {
+        for (b = (1 - a); b < (sint_t)a; b++) {
           acfout->data[i] += acf->data[a * (i + 1) + b - 1];
         }
       }