ugly hack to plot beat track anyway
authorPaul Brossier <piem@altern.org>
Fri, 2 Jun 2006 17:23:29 +0000 (17:23 +0000)
committerPaul Brossier <piem@altern.org>
Fri, 2 Jun 2006 17:23:29 +0000 (17:23 +0000)
ugly hack to plot beat track anyway

python/aubio/task/beat.py
python/aubiocut

index cfd329aef0fd76229a89e04b41fe8fa34723b442..7edb1f86fb0738ab4af0d2d0529b0fce7cb5e06e 100644 (file)
@@ -192,14 +192,14 @@ class taskbeat(taskonset):
                import Gnuplot
                oplots.append(Gnuplot.Data(results,with='linespoints',title="auto"))
 
-       def plotplot(self,oplots,outplot=None):
+       def plotplot(self,wplot,oplots,outplot=None,extension=None,xsize=1.,ysize=1.,spectro=False):
                import Gnuplot
-               from aubio.gnuplot import gnuplot_init, audio_to_array, make_audio_plot
+               from aubio.gnuplot import gnuplot_create, audio_to_array, make_audio_plot
                import re
                # audio data
                #time,data = audio_to_array(self.input)
                #f = make_audio_plot(time,data)
 
-               g = gnuplot_init(outplot)
+               g = gnuplot_create(outplot=outplot, extension=extension)
                oplots = [Gnuplot.Data(self.gettruth(),with='linespoints',title="orig")] + oplots
                g.plot(*oplots)
index a922daddeca87c4acc6781c6fb008871a9b8df96..7f1b4735cbe1c1b55bbf12c35b8f72d16ce35d02 100755 (executable)
@@ -133,7 +133,11 @@ for i in range(len(modes)):
                ofunc = filetask.ofunc
                lofunc.append(ofunc)
 
-       if options.plot: filetask.plot(onsets, ofunc, wplot, oplots, nplot=options.nplot)
+       if options.plot:
+               if options.beat: 
+                       filetask.plot(oplots, onsets)
+               else:
+                       filetask.plot(onsets, ofunc, wplot, oplots, nplot=options.nplot)
 
        if options.func: 
                for i in ofunc: