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 @@
1from aubio.aubioclass import *1from aubio.aubioclass import *
2from aubio.task.task import task2from aubio.task.task import task
3from aubio.task.utils import *
4from aubio.task.params import taskparams3from aubio.task.params import taskparams
5from aubio.task.silence import tasksilence4from aubio.task.silence import tasksilence
6from aubio.task.onset import taskonset5from aubio.task.onset import taskonset
python/aubio/task/notes.py+2−3
@@ -1,6 +1,5 @@
1 1
2from aubio.task import task2from aubio.task import task
3from aubio.task.utils import *
4from aubio.aubioclass import *3from aubio.aubioclass import *
5 4
6class tasknotes(task):5class tasknotes(task):
@@ -11,10 +10,10 @@ class tasknotes(task): · 4 unmodified lines
11 self.channels,10 self.channels,
12 self.myvec,11 self.myvec,
13 self.params.threshold,12 self.params.threshold,
14 mode=get_onset_mode(self.params.onsetmode),13 mode=self.params.onsetmode,
15 dcthreshold=self.params.dcthreshold,14 dcthreshold=self.params.dcthreshold,
16 derivate=self.params.derivate)15 derivate=self.params.derivate)
17 self.pitchdet = pitchdetection(mode=get_pitch_mode(self.params.pitchmode),16 self.pitchdet = pitchdetection(mode=self.params.pitchmode,
18 bufsize=self.params.pbufsize,17 bufsize=self.params.pbufsize,
19 hopsize=self.params.phopsize,18 hopsize=self.params.phopsize,
20 channels=self.channels,19 channels=self.channels,
python/aubio/task/onset.py+1−2
@@ -1,5 +1,4 @@
1from aubio.task.task import task1from aubio.task.task import task
2from aubio.task.utils import *
3from aubio.aubioclass import *2from aubio.aubioclass import *
4 3
5class taskonset(task):4class taskonset(task):
@@ -13,7 +12,7 @@ class taskonset(task): · 7 unmodified lines
13 self.channels,12 self.channels,
14 self.myvec,13 self.myvec,
15 self.params.threshold,14 self.params.threshold,
16 mode=get_onset_mode(self.params.onsetmode),15 mode=self.params.onsetmode,
17 dcthreshold=self.params.dcthreshold,16 dcthreshold=self.params.dcthreshold,
18 derivate=self.params.derivate)17 derivate=self.params.derivate)
19 self.olist = [] 18 self.olist = []
python/aubio/task/pitch.py+0−1
@@ -1,6 +1,5 @@
1from aubio.task.task import task1from aubio.task.task import task
2from aubio.task.silence import tasksilence2from aubio.task.silence import tasksilence
3from aubio.task.utils import *
4from aubio.aubioclass import *3from aubio.aubioclass import *
5 4
6class taskpitch(task):5class taskpitch(task):
python/aubio/task/utils.py+0−43
@@ -1,43 +0,0 @@
1from aubio.aubioclass import *
2
3def 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
28def 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
37def 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