changeset 8:99038dfea9e5

Write top-level tempo estimator test and estimator stub
author Chris Cannam
date Mon, 08 Oct 2012 15:12:37 +0100
parents 1ef0ce23bf78
children d43d1adecea6
files tempo_estimator.py test_tempo_estimator.py
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tempo_estimator.py	Mon Oct 08 15:12:37 2012 +0100
@@ -0,0 +1,5 @@
+
+def estimate_tempo_of_file(filename):
+    """Given the name of a WAV file, return the estimated tempo in bpm."""
+    return 0
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test_tempo_estimator.py	Mon Oct 08 15:12:37 2012 +0100
@@ -0,0 +1,8 @@
+
+import tempo_estimator as est
+
+def test_tempo_120bpm():
+    tempo = est.estimate_tempo_of_file('testfiles/120bpm.wav')
+    assert abs(tempo - 120.0) < 0.5
+
+