History

rename aubio_pitchdetection to aubio_pitch

Paul Brossier committed 17 years ago

Commit ca1abdd1 parent 9f07d5212 files · +130 −130Browse files

Showing the changes to python (3 of 12 files). Show all

Unified · Split

3 files
  1. python/aubio/aubioclass.py +6 −6
  2. python/aubio/task/notes.py +1 −1
  3. python/aubio/task/pitch.py +1 −1
python/aubio/aubioclass.py+6−6
@@ -126,19 +126,19 @@ class onsetpick: · 125 unmodified lines
126 if dval < self.dcthreshold: isonset = 0 126 if dval < self.dcthreshold: isonset = 0
127 return isonset, dval127 return isonset, dval
128 128
129class pitchdetection:129class pitch:
130 def __init__(self,mode="mcomb",bufsize=2048,hopsize=1024,130 def __init__(self,mode="mcomb",bufsize=2048,hopsize=1024,
131 channels=1,samplerate=44100.,omode="freq",tolerance=0.1):131 channels=1,samplerate=44100.,omode="freq",tolerance=0.1):
132 self.pitchp = new_aubio_pitchdetection(mode,bufsize,hopsize,channels,132 self.pitchp = new_aubio_pitch(mode,bufsize,hopsize,channels,
133 samplerate)133 samplerate)
134 self.mypitch = fvec(1, channels)134 self.mypitch = fvec(1, channels)
135 aubio_pitchdetection_set_unit(self.pitchp,omode)135 aubio_pitch_set_unit(self.pitchp,omode)
136 aubio_pitchdetection_set_tolerance(self.pitchp,tolerance)136 aubio_pitch_set_tolerance(self.pitchp,tolerance)
137 #self.filt = filter(srate,"adsgn")137 #self.filt = filter(srate,"adsgn")
138 def __del__(self):138 def __del__(self):
139 del_aubio_pitchdetection(self.pitchp)139 del_aubio_pitch(self.pitchp)
140 def __call__(self,myvec): 140 def __call__(self,myvec):
141 aubio_pitchdetection_do(self.pitchp,myvec(), self.mypitch())141 aubio_pitch_do(self.pitchp,myvec(), self.mypitch())
142 return self.mypitch.get(0,0)142 return self.mypitch.get(0,0)
143 143
144class filter:144class filter:
python/aubio/task/notes.py+1−1
@@ -13,7 +13,7 @@ class tasknotes(task): · 12 unmodified lines
13 mode=self.params.onsetmode,13 mode=self.params.onsetmode,
14 dcthreshold=self.params.dcthreshold,14 dcthreshold=self.params.dcthreshold,
15 derivate=self.params.derivate)15 derivate=self.params.derivate)
16 self.pitchdet = pitchdetection(mode=self.params.pitchmode,16 self.pitchdet = pitch(mode=self.params.pitchmode,
17 bufsize=self.params.pbufsize,17 bufsize=self.params.pbufsize,
18 hopsize=self.params.phopsize,18 hopsize=self.params.phopsize,
19 channels=self.channels,19 channels=self.channels,
python/aubio/task/pitch.py+1−1
@@ -12,7 +12,7 @@ class taskpitch(task): · 11 unmodified lines
12 tolerance = self.params.yinfftthresh12 tolerance = self.params.yinfftthresh
13 else:13 else:
14 tolerance = 0.14 tolerance = 0.
15 self.pitchdet = pitchdetection(mode=self.params.pitchmode,15 self.pitchdet = pitch(mode=self.params.pitchmode,
16 bufsize=self.params.bufsize,16 bufsize=self.params.bufsize,
17 hopsize=self.params.hopsize,17 hopsize=self.params.hopsize,
18 channels=self.channels,18 channels=self.channels,

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