python/demos/demo_tempo_plot.py: import first
authorPaul Brossier <piem@piem.org>
Wed, 13 Mar 2013 18:24:02 +0000 (13:24 -0500)
committerPaul Brossier <piem@piem.org>
Wed, 13 Mar 2013 18:24:02 +0000 (13:24 -0500)
python/demos/demo_tempo_plot.py

index dd1cd9b..15be6da 100755 (executable)
@@ -44,11 +44,11 @@ beats = map( lambda x: x / float(samplerate), beats)
 bpms = [60./(b - a) for a,b in zip(beats[:-1],beats[1:])]
 
 if len(bpms):
-    print 'mean period:', "%.2f" % mean(bpms), 'bpm', 'median', "%.2f" % median(bpms), 'bpm'
-    print 'plotting', filename
     # do plotting
     from numpy import array, arange, mean, median
     import matplotlib.pyplot as plt
+    print 'mean period:', "%.2f" % mean(bpms), 'bpm', 'median', "%.2f" % median(bpms), 'bpm'
+    print 'plotting', filename
     plt1 = plt.axes([0.1, 0.75, 0.8, 0.19])
     plt2 = plt.axes([0.1, 0.1, 0.8, 0.65], sharex = plt1)
     plt.rc('lines',linewidth='.8')