time = numarray.arange(len(data))*framestep
return time,data
-def plot_audio(filenames, fileout=None, start=0, end=None, noaxis=None,xsize=1.,ysize=1.):
- g = gnuplot_init(fileout)
+def plot_audio(filenames, outplot='', extension='', start=0, end=None, noaxis=None,xsize=1.,ysize=1.):
+ g = gnuplot_create(outplot, extension)
d = []
todraw = len(filenames)
xorig = 0.
options, args = parse_args()
+if options.outplot:
+ extension = options.outplot.split('.')[-1]
+ outplot = '.'.join(options.outplot.split('.')[:-1])
+else:
+ extension = ''
+ outplot = None
+
aubio.gnuplot.plot_audio(options.filename.split(','),
- fileout=options.outplot,
+ extension = extension,
+ outplot = outplot,
xsize=float(options.xsize),
ysize=float(options.ysize))