Changeset f50dea4
- Timestamp:
- Apr 19, 2016, 1:40:39 AM (9 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 5652a8c
- Parents:
- 81ad577 (diff), e89310a0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 2 added
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
.travis.yml
r81ad577 rf50dea4 22 22 - python-dev 23 23 - python-numpy 24 - python3-setuptools 25 - python3-dev 26 - python3-numpy 24 27 25 28 script: … … 27 30 - make build_python 28 31 - make clean_python 32 - make build_python3 33 - make clean_python3 29 34 - make clean 30 35 - make distcheck -
Makefile
r81ad577 rf50dea4 26 26 cd python && ./setup.py clean 27 27 28 build_python3: 29 cd python && python3 ./setup.py build 30 31 clean_python3: 32 cd python && python3 ./setup.py clean 33 28 34 clean: 29 35 $(WAFCMD) clean -
python/lib/aubio/midiconv.py
r81ad577 rf50dea4 1 1 # -*- coding: utf-8 -*- 2 3 import sys 4 PY3 = sys.version_info[0] == 3 5 if PY3: 6 string_types = [str] 7 else: 8 string_types = [str, unicode] 2 9 3 10 def note2midi(note): … … 6 13 _valid_modifiers = {None: 0, u'♮': 0, '#': +1, u'♯': +1, u'\udd2a': +2, 'b': -1, u'♭': -1, u'\ufffd': -2} 7 14 _valid_octaves = range(-1, 10) 8 if type(note) not in (str, unicode):9 raise TypeError("a string is required, got %s " % note)15 if type(note) not in string_types: 16 raise TypeError("a string is required, got %s (%s)" % (note, str(type(note)) )) 10 17 if not (1 < len(note) < 5): 11 18 raise ValueError( -
python/setup.py
r81ad577 rf50dea4 29 29 30 30 if not os.path.isdir(output_path): 31 from lib.gen erator import generate_object_files32 generated_object_files = generate_ object_files(output_path)31 from lib.gen_external import generate_external 32 generated_object_files = generate_external(output_path) 33 33 # define include dirs 34 34 else: -
python/tests/test_note2midi.py
r81ad577 rf50dea4 1 1 #! /usr/bin/env python 2 2 # -*- coding: utf-8 -*- 3 4 from __future__ import unicode_literals 3 5 4 6 from aubio import note2midi, freq2note … … 15 17 ( 'A#4', 70 ), 16 18 ( 'Bb4', 70 ), 17 ( u'B♭4', 70 ),19 ( 'B♭4', 70 ), 18 20 ( 'G8', 115 ), 19 ( u'G♯8', 116 ),21 ( 'G♯8', 116 ), 20 22 ( 'G9', 127 ), 21 ( u'G\udd2a2', 45 ),22 ( u'B\ufffd2', 45 ),23 ( u'A♮2', 45 ),23 ( 'G\udd2a2', 45 ), 24 ( 'B\ufffd2', 45 ), 25 ( 'A♮2', 45 ), 24 26 ) 25 27 -
python/tests/test_sink.py
r81ad577 rf50dea4 30 30 shutil.rmtree(tmpdir) 31 31 32 def test_many_sinks_not_closed(self):33 from tempfile import mkdtemp34 import os.path35 import shutil36 tmpdir = mkdtemp()37 sink_list = []38 try:39 for i in range(many_files):40 path = os.path.join(tmpdir, 'f-' + str(i) + '.wav')41 g = sink(path, 0)42 sink_list.append(g)43 write = 25644 for n in range(200):45 vec = fvec(write)46 g(vec, write)47 except Exception:48 pass49 else:50 self.fail("does not fail on too many files open")51 for g in sink_list:52 g.close()53 shutil.rmtree(tmpdir)54 55 32 def test_read_and_write(self): 56 33 … … 70 47 total_frames += read 71 48 if read < f.hop_size: break 72 if 0:73 print ("read", "%.2fs" % (total_frames / float(f.samplerate) ) ),74 print ("(", total_frames, "frames", "in" ),75 print (total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")" ),76 print ("from", f.uri ),77 print ("to", g.uri)78 49 del_tmp_sink_path(sink_path) 79 50 … … 95 66 total_frames += read 96 67 if read < f.hop_size: break 97 if 0:98 print ("read", "%.2fs" % (total_frames / float(f.samplerate) ) ),99 print ("(", total_frames, "frames", "in" ),100 print (f.channels, "channels", "in" ),101 print (total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")" ),102 print ("from", f.uri ),103 print ("to", g.uri ),104 print ("in", g.channels, "channels")105 68 del_tmp_sink_path(sink_path) 106 69 -
python/tests/test_source.py
r81ad577 rf50dea4 39 39 total_frames += read 40 40 if read < f.hop_size: break 41 print ("read", "%.2fs" % (total_frames / float(f.samplerate) ) ), 42 print ("(", total_frames, "frames", "in" ), 43 print (total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")" ), 44 print ("from", f.uri) 41 result_str = "read {:.2f}s ({:d} frames in {:d} blocks at {:d}Hz) from {:s}" 42 params = total_frames / float(f.samplerate), total_frames, int(total_frames/f.hop_size), f.samplerate, f.uri 43 print (result_str.format(*params)) 45 44 return total_frames 46 45 … … 109 108 total_frames += read 110 109 if read < f.hop_size: break 111 print ("read", "%.2fs" % (total_frames / float(f.samplerate) ) ), 112 print ("(", total_frames, "frames", "in" ), 113 print (f.channels, "channels and" ), 114 print (total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")" ), 115 print ("from", f.uri) 110 result_str = "read {:.2f}s ({:d} frames in {:d} channels and {:d} blocks at {:d}Hz) from {:s}" 111 params = total_frames / float(f.samplerate), total_frames, f.channels, int(total_frames/f.hop_size), f.samplerate, f.uri 112 print (result_str.format(*params)) 116 113 return total_frames 117 114
Note: See TracChangeset
for help on using the changeset viewer.