Changeset fcacd88
- Timestamp:
- Sep 26, 2009, 1:09:50 AM (15 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:
- 707c30e
- Parents:
- a250b35
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/aubio/task/onset.py
ra250b35 rfcacd88 93 93 import aubio.txtfile 94 94 import os.path 95 import numarray 95 from numpy import arange, array, ones 96 96 from aubio.onsetcompare import onset_roc 97 97 … … 103 103 self.maxofunc = max(ofunc) 104 104 # onset detection function 105 downtime = numarray.arange(len(ofunc))*self.params.step105 downtime = arange(len(ofunc))*self.params.step 106 106 oplot.append(Gnuplot.Data(downtime,ofunc,with='lines',title=self.params.onsetmode)) 107 107 … … 112 112 y1.append(self.maxofunc) 113 113 y1p.append(-self.maxofunc) 114 #x1 = numarray.array(onsets)*self.params.step115 #y1 = self.maxofunc* numarray.ones(len(onsets))114 #x1 = array(onsets)*self.params.step 115 #y1 = self.maxofunc*ones(len(onsets)) 116 116 if x1: 117 117 oplot.append(Gnuplot.Data(x1,y1,with='impulses')) … … 127 127 else: 128 128 t_onsets = aubio.txtfile.read_datafile(datafile) 129 x2 = numarray.array(t_onsets).resize(len(t_onsets))130 y2 = self.maxofunc* numarray.ones(len(t_onsets))129 x2 = array(t_onsets).resize(len(t_onsets)) 130 y2 = self.maxofunc*ones(len(t_onsets)) 131 131 wplot.append(Gnuplot.Data(x2,y2,with='impulses')) 132 132
Note: See TracChangeset
for help on using the changeset viewer.