Changes in / [de9178e:cc3f129]
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
azure-pipelines.yml
rde9178e rcc3f129 1 1 # configuration file for azure continuous integration 2 2 jobs: 3 3 4 - job: linux 4 5 pool: 5 6 vmImage: 'Ubuntu 16.04' 6 7 7 steps: 8 8 - script: | 9 9 make 10 10 displayName: 'make' 11 env: 12 CFLAGS: -Werror 13 11 14 - job: windows 12 15 pool: 13 16 vmIMage: 'VS2017-Win2016' 14 15 17 steps: 16 18 - script: | … … 24 26 pool: 25 27 vmIMage: macOS-10.13 26 27 28 steps: 28 29 - script: | … … 34 35 make 35 36 displayName: 'make' 37 env: 38 CFLAGS: -Werror -
doc/about.rst
rde9178e rcc3f129 60 60 ------- 61 61 62 aubio is a `free <http ://www.debian.org/intro/free>`_ and `open source62 aubio is a `free <https://www.debian.org/intro/free>`_ and `open source 63 63 <http://www.opensource.org/docs/definition.php>`_ software; **you** can 64 64 redistribute it and/or modify it under the terms of the `GNU -
doc/aubiomfcc.txt
rde9178e rcc3f129 52 52 url: 53 53 54 http ://cobweb.ecn.purdue.edu/~malcolm/interval/1998-010/ (see file mfcc.m)54 https://engineering.purdue.edu/~malcolm/interval/1998-010/ (see file mfcc.m) 55 55 56 56 SEE ALSO -
doc/conf.py
rde9178e rcc3f129 46 46 # General information about the project. 47 47 project = u'aubio' 48 copyright = u'201 6, Paul Brossier'48 copyright = u'2018, Paul Brossier' 49 49 50 50 # The version info for the project you're documenting, acts as replacement for -
doc/python_module.rst
rde9178e rcc3f129 80 80 .. _demo_filter.py: https://github.com/aubio/aubio/blob/master/python/demos/demo_filter.py 81 81 .. _python tests: https://github.com/aubio/aubio/blob/master/python/tests 82 -
python/ext/aubiomodule.c
rde9178e rcc3f129 118 118 smpl_t output; 119 119 120 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR , &input, &samplerate, &fftsize)) { 120 if (!PyArg_ParseTuple (args, 121 "" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, 122 &input, &samplerate, &fftsize)) { 121 123 return NULL; 122 124 } … … 133 135 smpl_t output; 134 136 135 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR , &input, &samplerate, &fftsize)) { 137 if (!PyArg_ParseTuple (args, 138 "" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, 139 &input, &samplerate, &fftsize)) { 136 140 return NULL; 137 141 } … … 148 152 smpl_t output; 149 153 150 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, &input, &samplerate, &fftsize)) { 154 if (!PyArg_ParseTuple (args, 155 "" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, 156 &input, &samplerate, &fftsize)) { 151 157 return NULL; 152 158 } … … 163 169 smpl_t output; 164 170 165 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, &input, &samplerate, &fftsize)) { 171 if (!PyArg_ParseTuple (args, 172 "" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, 173 &input, &samplerate, &fftsize)) { 166 174 return NULL; 167 175 } -
python/ext/py-filterbank.c
rde9178e rcc3f129 95 95 if (self->vec.length != self->win_s / 2 + 1) { 96 96 PyErr_Format(PyExc_ValueError, 97 "input cvec has length %d, but f ftexpects length %d",97 "input cvec has length %d, but filterbank expects length %d", 98 98 self->vec.length, self->win_s / 2 + 1); 99 99 return NULL; … … 140 140 if (err > 0) { 141 141 PyErr_SetString (PyExc_ValueError, 142 "error when setting filter to A-weighting");142 "error when running set_triangle_bands"); 143 143 return NULL; 144 144 } … … 159 159 if (err > 0) { 160 160 PyErr_SetString (PyExc_ValueError, 161 "error when setting filter to A-weighting");161 "error when running set_mel_coeffs_slaney"); 162 162 return NULL; 163 163 } -
python/lib/aubio/cmd.py
rde9178e rcc3f129 248 248 action = "store", dest = "cut_until_nslices", default = None, 249 249 help="how many extra slices should be added at the end of each slice") 250 self.add_argument("--create-first", 251 action = "store_true", dest = "create_first", default = False, 252 help="always include first slice") 250 253 251 254 # some utilities … … 500 503 def main(): 501 504 parser = aubio_parser() 502 args = parser.parse_args() 505 if sys.version_info[0] != 3: 506 # on py2, create a dummy ArgumentParser to workaround the 507 # optional subcommand issue. See https://bugs.python.org/issue9253 508 # This ensures that: 509 # - version string is shown when only '-V' is passed 510 # - help is printed if '-V' is passed with any other argument 511 # - any other argument get forwarded to the real parser 512 parser_root = argparse.ArgumentParser(add_help=False) 513 parser_root.add_argument('-V', '--version', help="show version", 514 action="store_true", dest="show_version") 515 args, extras = parser_root.parse_known_args() 516 if args.show_version == False: # no -V, forward to parser 517 args = parser.parse_args(extras, namespace=args) 518 elif len(extras) != 0: # -V with other arguments, print help 519 parser.print_help() 520 sys.exit(1) 521 else: # in py3, we can simply use parser directly 522 args = parser.parse_args() 503 523 if 'show_version' in args and args.show_version: 504 524 sys.stdout.write('aubio version ' + aubio.version + '\n') -
python/lib/aubio/cut.py
rde9178e rcc3f129 102 102 s = source(source_uri, samplerate, hopsize) 103 103 if samplerate == 0: 104 samplerate = s. get_samplerate()104 samplerate = s.samplerate 105 105 options.samplerate = samplerate 106 106 … … 151 151 timestamps, timestamps_end = timestamps_end, 152 152 output_dir = options.output_directory, 153 samplerate = options.samplerate) 153 samplerate = options.samplerate, 154 create_first = options.create_first) 154 155 155 156 def main(): -
python/lib/aubio/slicing.py
rde9178e rcc3f129 7 7 8 8 def slice_source_at_stamps(source_file, timestamps, timestamps_end=None, 9 output_dir=None, samplerate=0, hopsize=256): 9 output_dir=None, samplerate=0, hopsize=256, 10 create_first=False): 10 11 """ slice a sound file at given timestamps """ 11 12 … … 13 14 raise ValueError("no timestamps given") 14 15 15 if timestamps[0] != 0 :16 if timestamps[0] != 0 and create_first: 16 17 timestamps = [0] + timestamps 17 18 if timestamps_end is not None: … … 19 20 20 21 if timestamps_end is not None: 21 if len(timestamps_end) != len(timestamps): 22 if len(timestamps_end) == len(timestamps) - 1: 23 timestamps_end = timestamps_end + [_max_timestamp] 24 elif len(timestamps_end) != len(timestamps): 22 25 raise ValueError("len(timestamps_end) != len(timestamps)") 23 26 else: … … 49 52 vec, read = _source.do_multi() 50 53 # if the total number of frames read will exceed the next region start 51 iflen(regions) and total_frames + read >= regions[0][0]:54 while len(regions) and total_frames + read >= regions[0][0]: 52 55 #print "getting", regions[0], "at", total_frames 53 56 # get next region … … 76 79 # write remaining samples from current region 77 80 _sink.do_multi(vec[:, start:remaining], remaining - start) 78 #print "closing region", "remaining", remaining81 #print("closing region", "remaining", remaining) 79 82 # close this file 80 83 _sink.close() … … 83 86 _sink.do_multi(vec[:, start:read], read - start) 84 87 total_frames += read 88 # remove old slices 89 slices = list(filter(lambda s: s['end_stamp'] > total_frames, 90 slices)) 85 91 if read < hopsize: 86 92 break -
python/tests/test_aubio_cmd.py
rde9178e rcc3f129 20 20 21 21 def test_samples2seconds(self): 22 self.assertEqual(aubio.cmd.samples2seconds(3200, 32000), "0.100000\t") 22 self.assertEqual(aubio.cmd.samples2seconds(3200, 32000), 23 "0.100000\t") 23 24 24 25 def test_samples2milliseconds(self): 25 self.assertEqual(aubio.cmd.samples2milliseconds(3200, 32000), "100.000000\t") 26 self.assertEqual(aubio.cmd.samples2milliseconds(3200, 32000), 27 "100.000000\t") 26 28 27 29 def test_samples2samples(self): 28 self.assertEqual(aubio.cmd.samples2samples(3200, 32000), "3200\t") 30 self.assertEqual(aubio.cmd.samples2samples(3200, 32000), 31 "3200\t") 29 32 30 33 if __name__ == '__main__': -
python/tests/test_slicing.py
rde9178e rcc3f129 24 24 def test_slice_start_only_no_zero(self): 25 25 regions_start = [i*1000 for i in range(1, n_slices)] 26 slice_source_at_stamps(self.source_file, regions_start, output_dir = self.output_dir) 26 slice_source_at_stamps(self.source_file, regions_start, 27 output_dir = self.output_dir, create_first=True) 27 28 28 29 def test_slice_start_beyond_end(self): 29 30 regions_start = [i*1000 for i in range(1, n_slices)] 30 31 regions_start += [count_samples_in_file(self.source_file) + 1000] 31 slice_source_at_stamps(self.source_file, regions_start, output_dir = self.output_dir) 32 slice_source_at_stamps(self.source_file, regions_start, 33 output_dir = self.output_dir, create_first=True) 32 34 33 35 def test_slice_start_every_blocksize(self): 34 36 hopsize = 200 35 regions_start = [i*hopsize for i in range( 1, n_slices)]37 regions_start = [i*hopsize for i in range(0, n_slices)] 36 38 slice_source_at_stamps(self.source_file, regions_start, output_dir = self.output_dir, 37 39 hopsize = 200) 40 41 def test_slice_start_every_half_blocksize(self): 42 hopsize = 200 43 regions_start = [i*hopsize//2 for i in range(0, n_slices)] 44 slice_source_at_stamps(self.source_file, regions_start, 45 output_dir = self.output_dir, hopsize = 200) 38 46 39 47 def tearDown(self): … … 92 100 "number of samples written different from number of original samples") 93 101 102 def test_slice_start_and_ends_with_missing_end(self): 103 regions_start = [i*1000 for i in range(n_slices)] 104 regions_ends = [r-1 for r in regions_start[1:]] 105 slice_source_at_stamps(self.source_file, regions_start, regions_ends, 106 output_dir = self.output_dir) 107 written_samples = count_samples_in_directory(self.output_dir) 108 original_samples = count_samples_in_file(self.source_file) 109 total_files = count_files_in_directory(self.output_dir) 110 assert_equal(n_slices, total_files, 111 "number of slices created different from expected") 112 assert_equal(written_samples, original_samples, 113 "number of samples written different from number of original samples") 114 94 115 def tearDown(self): 95 116 shutil.rmtree(self.output_dir) … … 134 155 regions_end = None 135 156 slice_source_at_stamps (self.source_file, regions_start, regions_end, 136 output_dir = self.output_dir )157 output_dir = self.output_dir, create_first=True) 137 158 total_files = count_files_in_directory(self.output_dir) 138 159 assert_equal(n_slices, total_files, -
src/io/source_avcodec.c
rde9178e rcc3f129 453 453 goto beach; 454 454 } 455 #else 456 #warning "avutil < 53 is deprecated, crashes might occur on corrupt files" 455 457 #endif 456 458 -
src/spectral/filterbank_mel.h
rde9178e rcc3f129 59 59 60 60 The filter coefficients are built according to Malcolm Slaney's Auditory 61 Toolbox, available at http://engineering.purdue.edu/~malcolm/interval/1998-010/ 62 (see file mfcc.m). 61 Toolbox, available online at the following address (see file mfcc.m): 62 63 https://engineering.purdue.edu/~malcolm/interval/1998-010/ 63 64 64 65 */ -
src/spectral/mfcc.h
rde9178e rcc3f129 27 27 28 28 The implementation follows the specifications established by Malcolm Slaney 29 in its Auditory Toolbox, available online (see file mfcc.m). 29 in its Auditory Toolbox, available online at the following address (see 30 file mfcc.m): 30 31 31 http ://engineering.ecn.purdue.edu/~malcolm/interval/1998-010/32 https://engineering.purdue.edu/~malcolm/interval/1998-010/ 32 33 33 34 \example spectral/test-mfcc.c -
src/spectral/phasevoc.c
rde9178e rcc3f129 213 213 synthold[i] += synth[i + pv->hop_s] * pv->scale; 214 214 } 215 216 uint_t aubio_pvoc_get_win(aubio_pvoc_t* pv) 217 { 218 return pv->win_s; 219 } 220 221 uint_t aubio_pvoc_get_hop(aubio_pvoc_t* pv) 222 { 223 return pv->hop_s; 224 } -
src/spectral/phasevoc.h
rde9178e rcc3f129 89 89 */ 90 90 uint_t aubio_pvoc_get_win(aubio_pvoc_t* pv); 91 91 92 /** get hop size 92 93 -
src/synth/wavetable.c
rde9178e rcc3f129 165 165 aubio_wavetable_set_amp (s, 0.); 166 166 //s->last_pos = 0; 167 return aubio_wavetable_set_playing (s, 1);167 return aubio_wavetable_set_playing (s, 0); 168 168 } 169 169 -
src/synth/wavetable.h
rde9178e rcc3f129 51 51 */ 52 52 aubio_wavetable_t * new_aubio_wavetable(uint_t samplerate, uint_t hop_size); 53 54 /** load source in wavetable55 56 \param o wavetable, created by new_aubio_wavetable()57 \param uri the uri of the source to load58 59 \return 0 if successful, non-zero otherwise60 61 */62 uint_t aubio_wavetable_load( aubio_wavetable_t * o, const char_t * uri );63 53 64 54 /** process wavetable function
Note: See TracChangeset
for help on using the changeset viewer.