From: Paul Brossier Date: Fri, 2 Jun 2006 17:23:29 +0000 (+0000) Subject: ugly hack to plot beat track anyway X-Git-Tag: bzr2git~662 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=14aae817e4c13ce56a40b83283bfb9c263e5a1c9;p=aubio.git ugly hack to plot beat track anyway ugly hack to plot beat track anyway --- diff --git a/python/aubio/task/beat.py b/python/aubio/task/beat.py index cfd329ae..7edb1f86 100644 --- a/python/aubio/task/beat.py +++ b/python/aubio/task/beat.py @@ -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) diff --git a/python/aubiocut b/python/aubiocut index a922dadd..7f1b4735 100755 --- a/python/aubiocut +++ b/python/aubiocut @@ -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: