History

python/scripts/aubiocut: add minioi option

Paul Brossier committed 12 years ago

Commit 4c0a1db1 parent 467122d1 file · +14 −4Browse files

Showing the changes to python/scripts (1 of 1 file). Show all

Unified · Split

python/scripts/aubiocut+14−4
@@ -54,6 +54,13 @@ def parse_args(): · 53 unmodified lines
5454 action="store_true", dest="cut", default=False,
5555 help="cut input sound file at detected labels \
5656 best used with option -L")
57+
58+ # minioi
59+ parser.add_option("-M","--minioi",
60+ metavar = "<value>", type='string',
61+ action="store", dest="minioi", default="12ms",
62+ help="minimum inter onset interval [default=12ms]")
63+
5764 """
5865 parser.add_option("-D","--delay",
5966 action = "store", dest = "delay", type = "float",
@@ -64,10 +71,6 @@ def parse_args(): · 4 unmodified lines
6471 metavar = "<value>",
6572 action="store", dest="dcthreshold", default=1.,
6673 help="onset peak picking DC component [default=1.]")
67− parser.add_option("-M","--mintol",
68− metavar = "<value>",
69− action="store", dest="mintol", default=0.048,
70− help="minimum inter onset interval [default=0.048]")
7174 parser.add_option("-L","--localmin",
7275 action="store_true", dest="localmin", default=False,
7376 help="use local minima after peak detection")
@@ -152,6 +155,13 @@ if __name__ == '__main__': · 78 unmodified lines
152155 o = tempo(options.onset_method, bufsize, hopsize)
153156 else:
154157 o = onset(options.onset_method, bufsize, hopsize)
158+ if options.minioi:
159+ if options.minioi.endswith('ms'):
160+ o.set_minioi_ms(int(options.minioi[:-2]))
161+ elif options.minioi.endswith('s'):
162+ o.set_minioi_s(int(options.minioi[:-1]))
163+ else:
164+ o.set_minioi(int(options.minioi))
155165 o.set_threshold(options.threshold)
156166
157167 timestamps = []

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