Changeset aa17581 for python/aubio
- Timestamp:
- Aug 22, 2005, 9:52:17 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:
- c29dae2
- Parents:
- f97445c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubio/aubioclass.py
rf97445c raa17581 125 125 setattr(parser.values, option.dest, 'dual') 126 126 else: 127 print "unknown detection function selected\n", usage127 print "unknown onset detection function selected" 128 128 sys.exit(1) 129 129 130 130 def check_pitch_mode(option, opt, value, parser): 131 131 nvalue = parser.rargs[0] 132 if nvalue == 'mcomb' :132 if nvalue == 'mcomb' : 133 133 setattr(parser.values, option.dest, aubio_pitch_mcomb) 134 elif nvalue == 'yin' 134 elif nvalue == 'yin' : 135 135 setattr(parser.values, option.dest, aubio_pitch_yin) 136 elif nvalue == 'fcomb' 136 elif nvalue == 'fcomb' : 137 137 setattr(parser.values, option.dest, aubio_pitch_fcomb) 138 elif nvalue == 'schmitt' 138 elif nvalue == 'schmitt': 139 139 setattr(parser.values, option.dest, aubio_pitch_schmitt) 140 140 else: 141 print "unknown detection function selected\n", usage 141 print "error: unknown pitch detection function selected" 142 sys.exit(1) 143 144 def check_pitchm_mode(option, opt, value, parser): 145 nvalue = parser.rargs[0] 146 if nvalue == 'freq' : 147 setattr(parser.values, option.dest, aubio_pitchm_freq) 148 elif nvalue == 'midi' : 149 setattr(parser.values, option.dest, aubio_pitchm_midi) 150 elif nvalue == 'cent' : 151 setattr(parser.values, option.dest, aubio_pitchm_cent) 152 elif nvalue == 'bin' : 153 setattr(parser.values, option.dest, aubio_pitchm_bin) 154 else: 155 print "error: unknown pitch detection output selected" 142 156 sys.exit(1) 143 157 … … 192 206 framestep = hopsize/(filei.samplerate()+0.) 193 207 channels = filei.channels() 194 newname = "%s%s% f%s%s" % (filein.split(".")[0].split("/")[-1],".",208 newname = "%s%s%09.5f%s%s" % (filein.split(".")[0].split("/")[-1],".", 195 209 frameread*framestep,".",filein.split(".")[-1]) 196 210 fileo = sndfile(newname,model=filei) … … 214 228 zerocross += 1 215 229 del fileo 216 fileo = sndfile("%s%s% f%s%s" %230 fileo = sndfile("%s%s%09.5f%s%s" % 217 231 (filein.split(".")[0].split("/")[-1],".", 218 232 frameread*framestep,".",filein.split(".")[-1]),model=filei) … … 261 275 mylist.append(freq) 262 276 else: 263 mylist.append( 0)277 mylist.append(-1.) 264 278 frameread += 1 265 279 return mylist
Note: See TracChangeset
for help on using the changeset viewer.