Ismir2012SoftwareSessionPlan » History » Version 4
« Previous -
Version 4/12
(diff) -
Next » -
Current version
Luis Figueira, 2012-10-03 01:26 PM
Ismir2012: Software Session Plan¶
Length and plan¶
- 90 min (75 + 15m interval)
Software Requirements¶
- Python
- Numpy
- Matplotlib
- Nose and Nosetests
- ipython (desirable, not mandatory)
Repository¶
https://code.soundsoftware.ac.uk/hg/python-tutorial-skeleton
Script¶
- Clone/Check if repository was successfully cloned
- Explore folder and files
- Launch python shell (ipyhon)
- import audiofile.py and plot samples
- Explain what the test files are and introduction to nose
- Create a new file estimate_tempo.py (main programme)
- Create main program
import tempo_estimator as est import sys filename = sys.argv[1] tempo = est.estimate_tempo_of_file(filename)
- Easy Mercurial:
- ignore pyc and py~
- commit estimate_tempo.py
- commit .hgignore
- Create estimate_tempo.py
- Create test file test_estimate_tempo.py
import tempo_estimator as est def test_tempo_120bpm(): tempo = est.estimate_tempo_of_file("test files/120bpm.wav") # we consider the test to be passed if error is less than 1/4 of bpm error = abs(tempo - 120) < 0.25 assert