Mercurial > hg > python-tutorial-ssw2012-output
view test_audiofile.py @ 7:1ef0ce23bf78
Write tempo estimator main program
author | Chris Cannam |
---|---|
date | Mon, 08 Oct 2012 15:08:30 +0100 |
parents | ea2387fd1b90 |
children |
line wrap: on
line source
# To the extent possible under law, Chris Cannam and QMUL have waived # all copyright and related or neighboring rights to this file # (http://creativecommons.org/about/cc0) import audiofile as af def test_read_all_mono_from_file(): (samples, samplerate) = af.read_all_mono_samples_from_file('testfiles/4sample-stereo-ny.wav') assert samplerate == 44100 assert len(samples) == 4 assert samples[0] > 0.999 and samples[0] < 1 assert samples[1] == -1 assert samples[2] > 0.999 and samples[2] < 1 assert samples[3] == -1