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
6969
7070 class onsetdetection:
7171 """ class for aubio_onsetdetection """
72− def __init__(self,type,buf,chan):
73− self.od = new_aubio_onsetdetection(type,buf,chan)
72+ def __init__(self,mode,buf,chan):
73+ self.od = new_aubio_onsetdetection(mode,buf,chan)
7474 def do(self,tc,tf):
7575 aubio_onsetdetection_do(self.od,tc(),tf())
7676 def __del__(self):
@@ -93,8 +93,8 @@ class onsetpick: · 16 unmodified lines
9393 self.myfft = cvec(bufsize,channels)
9494 self.pv = pvoc(bufsize,hopsize,channels)
9595 if mode in ['dual'] :
96− self.myod = onsetdetection(aubio_onset_hfc,bufsize,channels)
97− self.myod2 = onsetdetection(aubio_onset_mkl,bufsize,channels)
96+ self.myod = onsetdetection("hfc",bufsize,channels)
97+ self.myod2 = onsetdetection("mkl",bufsize,channels)
9898 self.myonset = fvec(1,channels)
9999 self.myonset2 = fvec(1,channels)
100100 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