History

python/: remove task.utils, not used anymore

Paul Brossier committed 17 years ago

Commit 515c7b21 parent fe163ad5 files · +3 −50Browse files

Showing the changes to python/aubio (5 of 5 files). Show all

Unified · Split

5 files
  1. python/aubio/task/__init__.py +0 −1
  2. python/aubio/task/notes.py +2 −3
  3. python/aubio/task/onset.py +1 −2
  4. python/aubio/task/pitch.py +0 −1
  5. python/aubio/task/utils.py +0 −43
python/aubio/task/__init__.py+0−1
@@ -1,6 +1,5 @@
11 from aubio.aubioclass import *
22 from aubio.task.task import task
3−from aubio.task.utils import *
43 from aubio.task.params import taskparams
54 from aubio.task.silence import tasksilence
65 from aubio.task.onset import taskonset
python/aubio/task/notes.py+2−3
@@ -1,6 +1,5 @@
11
22 from aubio.task import task
3−from aubio.task.utils import *
43 from aubio.aubioclass import *
54
65 class tasknotes(task):
@@ -11,10 +10,10 @@ class tasknotes(task): · 4 unmodified lines
1110 self.channels,
1211 self.myvec,
1312 self.params.threshold,
14− mode=get_onset_mode(self.params.onsetmode),
13+ mode=self.params.onsetmode,
1514 dcthreshold=self.params.dcthreshold,
1615 derivate=self.params.derivate)
17− self.pitchdet = pitchdetection(mode=get_pitch_mode(self.params.pitchmode),
16+ self.pitchdet = pitchdetection(mode=self.params.pitchmode,
1817 bufsize=self.params.pbufsize,
1918 hopsize=self.params.phopsize,
2019 channels=self.channels,
python/aubio/task/onset.py+1−2
@@ -1,5 +1,4 @@
11 from aubio.task.task import task
2−from aubio.task.utils import *
32 from aubio.aubioclass import *
43
54 class taskonset(task):
@@ -13,7 +12,7 @@ class taskonset(task): · 7 unmodified lines
1312 self.channels,
1413 self.myvec,
1514 self.params.threshold,
16− mode=get_onset_mode(self.params.onsetmode),
15+ mode=self.params.onsetmode,
1716 dcthreshold=self.params.dcthreshold,
1817 derivate=self.params.derivate)
1918 self.olist = []
python/aubio/task/pitch.py+0−1
@@ -1,6 +1,5 @@
11 from aubio.task.task import task
22 from aubio.task.silence import tasksilence
3−from aubio.task.utils import *
43 from aubio.aubioclass import *
54
65 class taskpitch(task):
python/aubio/task/utils.py+0−43
@@ -1,43 +0,0 @@
1−from aubio.aubioclass import *
2−
3−def get_onset_mode(nvalue):
4− """ utility function to convert a string to aubio_onsetdetection_type """
5− if nvalue == 'complexdomain' or nvalue == 'complex' :
6− return aubio_onset_complex
7− elif nvalue == 'hfc' :
8− return aubio_onset_hfc
9− elif nvalue == 'phase' :
10− return aubio_onset_phase
11− elif nvalue == 'specdiff' :
12− return aubio_onset_specdiff
13− elif nvalue == 'energy' :
14− return aubio_onset_energy
15− elif nvalue == 'kl' :
16− return aubio_onset_kl
17− elif nvalue == 'mkl' :
18− return aubio_onset_mkl
19− elif nvalue == 'specflux' :
20− return aubio_onset_specflux
21− elif nvalue == 'dual' :
22− return 'dual'
23− else:
24− import sys
25− print "unknown onset detection function selected: %s" % nvalue
26− sys.exit(1)
27−
28−def check_onset_mode(option, opt, value, parser):
29− """ wrapper function to convert a list of modes to
30− aubio_onsetdetection_type """
31− nvalues = parser.rargs[0].split(',')
32− val = []
33− for nvalue in nvalues:
34− val.append(get_onset_mode(nvalue))
35− setattr(parser.values, option.dest, val)
36−
37−def check_pitch_mode(option, opt, value, parser):
38− """ utility function to convert a string to aubio_pitchdetection_type"""
39− nvalues = parser.rargs[0].split(',')
40− val = []
41− for nvalue in nvalues:
42− val.append(get_pitch_mode(nvalue))
43− setattr(parser.values, option.dest, val)

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