Changeset f50dea4


Ignore:
Timestamp:
Apr 19, 2016, 1:40:39 AM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
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.
Message:

Merge branch 'develop' of github.com:aubio/aubio into develop

Files:
2 added
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • .travis.yml

    r81ad577 rf50dea4  
    2222    - python-dev
    2323    - python-numpy
     24    - python3-setuptools
     25    - python3-dev
     26    - python3-numpy
    2427
    2528script:
     
    2730  - make build_python
    2831  - make clean_python
     32  - make build_python3
     33  - make clean_python3
    2934  - make clean
    3035  - make distcheck
  • Makefile

    r81ad577 rf50dea4  
    2626        cd python && ./setup.py clean
    2727
     28build_python3:
     29        cd python && python3 ./setup.py build
     30
     31clean_python3:
     32        cd python && python3 ./setup.py clean
     33
    2834clean:
    2935        $(WAFCMD) clean
  • python/lib/aubio/midiconv.py

    r81ad577 rf50dea4  
    11# -*- coding: utf-8 -*-
     2
     3import sys
     4PY3 = sys.version_info[0] == 3
     5if PY3:
     6    string_types = [str]
     7else:
     8    string_types = [str, unicode]
    29
    310def note2midi(note):
     
    613    _valid_modifiers = {None: 0, u'♮': 0, '#': +1, u'♯': +1, u'\udd2a': +2, 'b': -1, u'♭': -1, u'\ufffd': -2}
    714    _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)) ))
    1017    if not (1 < len(note) < 5):
    1118        raise ValueError(
  • python/setup.py

    r81ad577 rf50dea4  
    2929
    3030if not os.path.isdir(output_path):
    31     from lib.generator import generate_object_files
    32     generated_object_files = generate_object_files(output_path)
     31    from lib.gen_external import generate_external
     32    generated_object_files = generate_external(output_path)
    3333    # define include dirs
    3434else:
  • python/tests/test_note2midi.py

    r81ad577 rf50dea4  
    11#! /usr/bin/env python
    22# -*- coding: utf-8 -*-
     3
     4from __future__ import unicode_literals
    35
    46from aubio import note2midi, freq2note
     
    1517        ( 'A#4', 70 ),
    1618        ( 'Bb4', 70 ),
    17         ( u'B♭4', 70 ),
     19        ( 'B♭4', 70 ),
    1820        ( 'G8', 115 ),
    19         ( u'G♯8', 116 ),
     21        ( 'G♯8', 116 ),
    2022        ( '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 ),
    2426        )
    2527
  • python/tests/test_sink.py

    r81ad577 rf50dea4  
    3030        shutil.rmtree(tmpdir)
    3131
    32     def test_many_sinks_not_closed(self):
    33         from tempfile import mkdtemp
    34         import os.path
    35         import shutil
    36         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 = 256
    44                 for n in range(200):
    45                     vec = fvec(write)
    46                     g(vec, write)
    47         except Exception:
    48             pass
    49         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 
    5532    def test_read_and_write(self):
    5633
     
    7047                    total_frames += read
    7148                    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)
    7849                del_tmp_sink_path(sink_path)
    7950
     
    9566                    total_frames += read
    9667                    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")
    10568                del_tmp_sink_path(sink_path)
    10669
  • python/tests/test_source.py

    r81ad577 rf50dea4  
    3939            total_frames += read
    4040            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))
    4544        return total_frames
    4645
     
    109108            total_frames += read
    110109            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))
    116113        return total_frames
    117114
Note: See TracChangeset for help on using the changeset viewer.