Changeset 5e9c68a for python/aubio


Ignore:
Timestamp:
Aug 9, 2005, 7:56:21 PM (19 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:
a29ad46
Parents:
28d8c4a
Message:

rename file_ to aubio_sndfile, protect aubio_pitdetection_{mode,type} enumerators

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/aubio/aubioclass.py

    r28d8c4a r5e9c68a  
    3030    def __init__(self,filename,model=None):
    3131        if (model!=None):
    32             self.file = new_file_wo(model.file,filename)
     32            self.file = new_aubio_sndfile_wo(model.file,filename)
    3333        else:
    34             self.file = new_file_ro(filename)
    35     def __del__(self):
    36         del_file(self.file)
     34            self.file = new_aubio_sndfile_ro(filename)
     35    def __del__(self):
     36        del_aubio_sndfile(self.file)
    3737    def info(self):
    38         file_info(self.file)
     38        aubio_sndfile_info(self.file)
    3939    def samplerate(self):
    40         return aubio_file_samplerate(self.file)
     40        return aubio_sndfile_samplerate(self.file)
    4141    def channels(self):
    42         return aubio_file_channels(self.file)
     42        return aubio_sndfile_channels(self.file)
    4343    def read(self,nfram,vecread):
    44         return file_read(self.file,nfram,vecread())
     44        return aubio_sndfile_read(self.file,nfram,vecread())
    4545    def write(self,nfram,vecwrite):
    46         return file_write(self.file,nfram,vecwrite())
     46        return aubio_sndfile_write(self.file,nfram,vecwrite())
    4747
    4848class pvoc:
     
    205205    return mylist
    206206
    207 def getpitch(filein,mode=aubio_mcomb,bufsize=1024,hopsize=512,omode=aubio_freq,
     207def getpitch(filein,mode=aubio_pitch_mcomb,bufsize=1024,hopsize=512,omode=aubio_pitchm_freq,
    208208        samplerate=44100.,silence=-70):
    209209    frameread = 0
     
    228228
    229229class pitchdetection:
    230     def __init__(self,mode=aubio_mcomb,bufsize=2048,hopsize=1024,
    231         channels=1,samplerate=44100.,omode=aubio_freq):
     230    def __init__(self,mode=aubio_pitch_mcomb,bufsize=2048,hopsize=1024,
     231        channels=1,samplerate=44100.,omode=aubio_pitchm_freq):
    232232        self.pitchp = new_aubio_pitchdetection(bufsize,hopsize,channels,
    233233                samplerate,mode,omode)
Note: See TracChangeset for help on using the changeset viewer.