- Timestamp:
- Aug 9, 2005, 7:56:21 PM (19 years ago)
- 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
- Location:
- python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubio/aubioclass.py
r28d8c4a r5e9c68a 30 30 def __init__(self,filename,model=None): 31 31 if (model!=None): 32 self.file = new_ file_wo(model.file,filename)32 self.file = new_aubio_sndfile_wo(model.file,filename) 33 33 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) 37 37 def info(self): 38 file_info(self.file)38 aubio_sndfile_info(self.file) 39 39 def samplerate(self): 40 return aubio_ file_samplerate(self.file)40 return aubio_sndfile_samplerate(self.file) 41 41 def channels(self): 42 return aubio_ file_channels(self.file)42 return aubio_sndfile_channels(self.file) 43 43 def read(self,nfram,vecread): 44 return file_read(self.file,nfram,vecread())44 return aubio_sndfile_read(self.file,nfram,vecread()) 45 45 def write(self,nfram,vecwrite): 46 return file_write(self.file,nfram,vecwrite())46 return aubio_sndfile_write(self.file,nfram,vecwrite()) 47 47 48 48 class pvoc: … … 205 205 return mylist 206 206 207 def getpitch(filein,mode=aubio_ mcomb,bufsize=1024,hopsize=512,omode=aubio_freq,207 def getpitch(filein,mode=aubio_pitch_mcomb,bufsize=1024,hopsize=512,omode=aubio_pitchm_freq, 208 208 samplerate=44100.,silence=-70): 209 209 frameread = 0 … … 228 228 229 229 class 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): 232 232 self.pitchp = new_aubio_pitchdetection(bufsize,hopsize,channels, 233 233 samplerate,mode,omode) -
python/aubiopitch
r28d8c4a r5e9c68a 14 14 nvalue = parser.rargs[0] 15 15 if nvalue == 'mcomb' : 16 setattr(parser.values, option.dest, aubio_ mcomb)16 setattr(parser.values, option.dest, aubio_pitch_mcomb) 17 17 elif nvalue == 'yin' : 18 setattr(parser.values, option.dest, aubio_ yin)18 setattr(parser.values, option.dest, aubio_pitch_yin) 19 19 elif nvalue == 'fcomb' : 20 setattr(parser.values, option.dest, aubio_ fcomb)20 setattr(parser.values, option.dest, aubio_pitch_fcomb) 21 21 elif nvalue == 'schmitt' : 22 setattr(parser.values, option.dest, aubio_ schmitt)22 setattr(parser.values, option.dest, aubio_pitch_schmitt) 23 23 24 24 … … 30 30 help="input sound file") 31 31 parser.add_option("-m","--mode", action="callback", 32 callback=check_mode, dest="mode", default=aubio_ mcomb,32 callback=check_mode, dest="mode", default=aubio_pitch_mcomb, 33 33 help="pitch detection mode [default=mcomb] \ 34 34 mcomb|yin|fcomb|schmitt")
Note: See TracChangeset
for help on using the changeset viewer.