Changeset e638bcf for python/aubio


Ignore:
Timestamp:
Aug 2, 2006, 1:21:46 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:
778bc7a
Parents:
aa3637a
Message:

add buffer and hosize options to aubioplot-spec, use 10000 as default value for maxf
add buffer and hosize options to aubioplot-spec, use 10000 as default value for maxf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/aubio/gnuplot.py

    raa3637a re638bcf  
    7373        g.gnuplot('unset multiplot;')
    7474
    75 def audio_to_spec(filename,minf = 0, maxf = 0, lowthres = -20.):
     75def audio_to_spec(filename,minf = 0, maxf = 0, lowthres = -20.,
     76                bufsize= 8192, hopsize = 1024):
    7677        from aubioclass import fvec,cvec,pvoc,sndfile
    7778        from math import log10
    78         bufsize   = 8192
    79         hopsize   = bufsize/8 # could depend on filelength
    8079        filei     = sndfile(filename)
    8180        srate     = float(filei.samplerate())
     
    118117        return data,time,freq
    119118
    120 def plot_spec(filename, outplot='',extension='', fileout=None, start=0, end=None, noaxis=None,log=1, minf=0, maxf= 0, xsize = 1., ysize = 1.):
     119def plot_spec(filename, outplot='',extension='', fileout=None, start=0, end=None, noaxis=None,log=1, minf=0, maxf= 0, xsize = 1., ysize = 1.,bufsize=8192, hopsize=1024):
    121120        import Gnuplot
    122121        g = gnuplot_create(outplot,extension)
    123         data,time,freq = audio_to_spec(filename,minf=minf,maxf=maxf)
     122        data,time,freq = audio_to_spec(filename,minf=minf,maxf=maxf,bufsize=bufsize,hopsize=hopsize)
    124123        xorig = 0.
    125124        if not noaxis:
Note: See TracChangeset for help on using the changeset viewer.