Ignore:
Timestamp:
Aug 2, 2006, 5:25:09 PM (18 years ago)
Author:
Paul Brossier <piem@altern.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
33cf541
Parents:
32fa8e8
Message:

factorise gnuplot_create options, update aubioplot-spec/audio
factorise gnuplot_create options, update aubioplot-spec/audio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/aubioplot-audio

    r32fa8e8 r0ab19df  
    11#!/usr/bin/python
    22
    3 import aubio.gnuplot, sys
     3import sys
     4from aubio.gnuplot import gnuplot_create,gnuplot_addargs,plot_audio
    45
    56usage = "usage: %s [options] -i soundfile" % sys.argv[0]
     
    1112                          action="store", dest="filename",
    1213                          help="input sound file")
    13         parser.add_option("-x","--xsize",
    14                           action="store", dest="xsize", default=1.,
    15                           type='float',help="define xsize for plot")
    16         parser.add_option("-y","--ysize",
    17                           action="store", dest="ysize", default=1.,
    18                           type='float',help="define ysize for plot")
    19         parser.add_option("-O","--outplot",
    20                           action="store", dest="outplot", default=None,
    21                           help="save plot to output.{ps,png}")
     14        gnuplot_addargs(parser)
    2215        (options, args) = parser.parse_args()
    2316        if not options.filename:
     
    3528  outplot = None
    3629
    37 g = aubio.gnuplot.gnuplot_create(outplot,extension,xsize=options.xsize, ysize=options.xsize)
    38 aubio.gnuplot.plot_audio(options.filename.split(','), g,
     30g = gnuplot_create(outplot,extension,options)
     31plot_audio(options.filename.split(','), g,
    3932  xsize=options.xsize,
    4033  ysize=options.ysize)
Note: See TracChangeset for help on using the changeset viewer.