Changeset b4f5967 for python


Ignore:
Timestamp:
Oct 15, 2009, 5:09:34 PM (15 years ago)
Author:
Paul Brossier <piem@piem.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:
cd77c15
Parents:
27fa522
Message:

src/onset: use a string to set onset mode, keeping onset types enum private, update everywhere onsets are used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/aubio/aubioclass.py

    r27fa522 rb4f5967  
    7070class onsetdetection:
    7171    """ class for aubio_onsetdetection """
    72     def __init__(self,type,buf,chan):
    73         self.od = new_aubio_onsetdetection(type,buf,chan)
     72    def __init__(self,mode,buf,chan):
     73        self.od = new_aubio_onsetdetection(mode,buf,chan)
    7474    def do(self,tc,tf):
    7575        aubio_onsetdetection_do(self.od,tc(),tf())
     
    9494        self.pv       = pvoc(bufsize,hopsize,channels)
    9595        if mode in ['dual'] :
    96                 self.myod     = onsetdetection(aubio_onset_hfc,bufsize,channels)
    97                 self.myod2    = onsetdetection(aubio_onset_mkl,bufsize,channels)
     96                self.myod     = onsetdetection("hfc",bufsize,channels)
     97                self.myod2    = onsetdetection("mkl",bufsize,channels)
    9898                self.myonset  = fvec(1,channels)
    9999                self.myonset2 = fvec(1,channels)
Note: See TracChangeset for help on using the changeset viewer.