Ignore:
Timestamp:
Mar 6, 2013, 9:25:23 PM (11 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:
037319a
Parents:
143cc43
Message:

tests/test_{source,sink}.py: add sink, improve source, use sounds in python/tests/sounds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/utils.py

    r143cc43 re1bfde5  
    22
    33def array_from_text_file(filename, dtype = 'float'):
    4   import os.path
    5   from numpy import array
    6   filename = os.path.join(os.path.dirname(__file__), filename)
    7   return array([line.split() for line in open(filename).readlines()],
    8       dtype = dtype)
     4    import os.path
     5    from numpy import array
     6    filename = os.path.join(os.path.dirname(__file__), filename)
     7    return array([line.split() for line in open(filename).readlines()],
     8        dtype = dtype)
    99
     10def list_all_sounds(rel_dir):
     11    import os.path, glob
     12    datadir = os.path.join(os.path.dirname(__file__), rel_dir)
     13    return glob.glob(os.path.join(datadir,'*.*'))
Note: See TracChangeset for help on using the changeset viewer.