History

src/onset: use a string to set onset mode, keeping onset types enum private, update everywhere onsets are used

Paul Brossier committed 17 years ago

Commit b4f59671 parent 27fa52216 files · +70 −86Browse files

Showing the changes to python (1 of 16 files). Show all

Unified · Split

python/aubio/aubioclass.py+4−4
@@ -69,8 +69,8 @@ class pvoc: · 68 unmodified lines
69 69
70class onsetdetection:70class onsetdetection:
71 """ class for aubio_onsetdetection """71 """ class for aubio_onsetdetection """
72 def __init__(self,type,buf,chan):72 def __init__(self,mode,buf,chan):
73 self.od = new_aubio_onsetdetection(type,buf,chan)73 self.od = new_aubio_onsetdetection(mode,buf,chan)
74 def do(self,tc,tf):74 def do(self,tc,tf):
75 aubio_onsetdetection_do(self.od,tc(),tf())75 aubio_onsetdetection_do(self.od,tc(),tf())
76 def __del__(self):76 def __del__(self):
@@ -93,8 +93,8 @@ class onsetpick: · 16 unmodified lines
93 self.myfft = cvec(bufsize,channels)93 self.myfft = cvec(bufsize,channels)
94 self.pv = pvoc(bufsize,hopsize,channels)94 self.pv = pvoc(bufsize,hopsize,channels)
95 if mode in ['dual'] :95 if mode in ['dual'] :
96 self.myod = onsetdetection(aubio_onset_hfc,bufsize,channels)96 self.myod = onsetdetection("hfc",bufsize,channels)
97 self.myod2 = onsetdetection(aubio_onset_mkl,bufsize,channels)97 self.myod2 = onsetdetection("mkl",bufsize,channels)
98 self.myonset = fvec(1,channels)98 self.myonset = fvec(1,channels)
99 self.myonset2 = fvec(1,channels)99 self.myonset2 = fvec(1,channels)
100 else: 100 else:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t