Showing the changes to python/scripts/aubiocut (1 of 1 file). Show all
Unified · Split
| @@ -54,6 +54,13 @@ def parse_args(): · 53 unmodified lines | |||
| 54 | action="store_true", dest="cut", default=False, | 54 | action="store_true", dest="cut", default=False, |
| 55 | help="cut input sound file at detected labels \ | 55 | help="cut input sound file at detected labels \ |
| 56 | best used with option -L") | 56 | 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 | |||
| 57 | """ | 64 | """ |
| 58 | parser.add_option("-D","--delay", | 65 | parser.add_option("-D","--delay", |
| 59 | action = "store", dest = "delay", type = "float", | 66 | action = "store", dest = "delay", type = "float", |
| @@ -64,10 +71,6 @@ def parse_args(): · 4 unmodified lines | |||
| 64 | metavar = "<value>", | 71 | metavar = "<value>", |
| 65 | action="store", dest="dcthreshold", default=1., | 72 | action="store", dest="dcthreshold", default=1., |
| 66 | help="onset peak picking DC component [default=1.]") | 73 | 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]") | ||
| 71 | parser.add_option("-L","--localmin", | 74 | parser.add_option("-L","--localmin", |
| 72 | action="store_true", dest="localmin", default=False, | 75 | action="store_true", dest="localmin", default=False, |
| 73 | help="use local minima after peak detection") | 76 | help="use local minima after peak detection") |
| @@ -152,6 +155,13 @@ if __name__ == '__main__': · 78 unmodified lines | |||
| 152 | o = tempo(options.onset_method, bufsize, hopsize) | 155 | o = tempo(options.onset_method, bufsize, hopsize) |
| 153 | else: | 156 | else: |
| 154 | o = onset(options.onset_method, bufsize, hopsize) | 157 | 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)) | ||
| 155 | o.set_threshold(options.threshold) | 165 | o.set_threshold(options.threshold) |
| 156 | 166 | ||
| 157 | timestamps = [] | 167 | timestamps = [] |