Changeset 5cf415f for python/aubio
- Timestamp:
- Aug 9, 2005, 8:35:14 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:
- b1f723d
- Parents:
- a29ad46
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubio/aubioclass.py
ra29ad46 r5cf415f 80 80 self.pv = pvoc(bufsize,hopsize,channels) 81 81 if mode in ['dual'] : 82 self.myod = onsetdetection( hfc,bufsize,channels)83 self.myod2 = onsetdetection( complexdomain,bufsize,channels)82 self.myod = onsetdetection(aubio_onset_hfc,bufsize,channels) 83 self.myod2 = onsetdetection(aubio_onset_complex,bufsize,channels) 84 84 self.myonset = fvec(1,channels) 85 85 self.myonset2 = fvec(1,channels) … … 105 105 else: self.myonset.set(0.,0,0) 106 106 return self.pp.do(self.myonset),self.myonset.get(0,0) 107 108 def check_onset_mode(option, opt, value, parser): 109 nvalue = parser.rargs[0] 110 if nvalue == 'complexdomain' or nvalue == 'complex' : 111 setattr(parser.values, option.dest, aubio_onset_complex) 112 elif nvalue == 'hfc' : 113 setattr(parser.values, option.dest, aubio_onset_hfc) 114 elif nvalue == 'phase' : 115 setattr(parser.values, option.dest, aubio_onset_phase) 116 elif nvalue == 'specdiff' : 117 setattr(parser.values, option.dest, aubio_onset_specdiff) 118 elif nvalue == 'energy' : 119 setattr(parser.values, option.dest, aubio_onset_energy) 120 elif nvalue == 'kl' : 121 setattr(parser.values, option.dest, aubio_onset_kl) 122 elif nvalue == 'mkl' : 123 setattr(parser.values, option.dest, aubio_onset_mkl) 124 elif nvalue == 'dual' : 125 setattr(parser.values, option.dest, 'dual') 126 else: 127 print "unknown detection function selected\n", usage 128 sys.exit(1) 129 130 def check_pitch_mode(option, opt, value, parser): 131 nvalue = parser.rargs[0] 132 if nvalue == 'mcomb' : 133 setattr(parser.values, option.dest, aubio_pitch_mcomb) 134 elif nvalue == 'yin' : 135 setattr(parser.values, option.dest, aubio_pitch_yin) 136 elif nvalue == 'fcomb' : 137 setattr(parser.values, option.dest, aubio_pitch_fcomb) 138 elif nvalue == 'schmitt' : 139 setattr(parser.values, option.dest, aubio_pitch_schmitt) 140 else: 141 print "unknown detection function selected\n", usage 142 sys.exit(1) 143 107 144 108 145 def getonsets(filein,threshold=0.2,silence=-70.,bufsize=1024,hopsize=512,
Note: See TracChangeset
for help on using the changeset viewer.