A Tk-based program that can help you prepare for your music final with randomly-generated listening quizzes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 3.5 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. __MusicQuizzer__ (_musicquizzer_) is a Python program that can help you prepare
  2. for any test that involves listening to excerpts of music pieces and answering
  3. multiple choice questions about them.
  4. # Installation
  5. ## Mac OS X
  6. Get [MacPorts](http://www.macports.org/install.php), if you don't have it.
  7. From Terminal (`/Applications/Utiliies/Terminal`), do:
  8. sudo port install python26
  9. sudo port install py26-game
  10. If you are having troubles with the latter command, try downloading the direct
  11. [installer](http://pygame.org/ftp/pygame-1.9.1release-py2.6-macosx10.5.zip).
  12. Next,
  13. [download MusicQuizzer](https://github.com/earwig/music-quizzer/tarball/v0.1.2)
  14. and uncompress it. Move the folder wherever you want (keep its contents
  15. intact!) and double-click on `mac_osx.command` to use the quizzer.
  16. ## Windows
  17. MusicQuizzer is written in Python, a language that does not come with Windows
  18. by default. Download the installer for Python 2.7.1
  19. [here](http://python.org/ftp/python/2.7.1/python-2.7.1.msi). Use the default
  20. settings during installation.
  21. Next, download and install pygame from
  22. [here](http://pygame.org/ftp/pygame-1.9.2a0.win32-py2.7.msi).
  23. Finally,
  24. [download MusicQuizzer](https://github.com/earwig/music-quizzer/zipball/v0.1.2)
  25. and extract it wherever you want. To use, simply double-click on the
  26. `musicquizzer` file inside (do not move or delete any of the other files).
  27. ## Linux (with apt-get)
  28. You should be on at least Python 2.7 (check with `python --version`), assuming
  29. you keep your operating system up-to-date. Install the latest versions of
  30. pygame and tk with:
  31. sudo apt-get install python-pygame python-tk
  32. Then,
  33. [download MusicQuizzer](https://github.com/earwig/music-quizzer/tarball/v0.1.2)
  34. and execute the program with `python musicquizzer.py` from your terminal.
  35. # Usage
  36. The first time you start the program, it will download all of the 25 necessary
  37. (default) music pieces to the `pieces` folder. This is a ~70 MB download.
  38. MusicQuizzer will present you with an answer sheet, containing four or five
  39. multiple choice questions per piece (which are, of course, randomized every
  40. time you begin a new quiz). Press `Start Quiz` to begin listening to the
  41. excerpts. Each one is played for 30 seconds. You are then given five seconds of
  42. rest, followed by the next piece. After all excerpts have been played, you
  43. _cannot_ re-listen to them. Press `Submit Answers` to "hand in" your quiz and
  44. view the results.
  45. # Modifying
  46. The music pieces are located in `pieces/`, in `.mp3` format. The file
  47. `config.cfg` contains the information for each excerpt, like so:
  48. [10.mp3]
  49. title: Der Erlkönig
  50. composer: Franz Schubert
  51. era: Romantic
  52. genre: Lied
  53. form: Through-composed
  54. url: http://stuy.enschool.org/music/10_The_Erlking_Erlkonig.mp3
  55. ...and so-on. The section's header is the name of the file in `pieces/` (or
  56. whatever directory you have chosen), and the fields hold the information that
  57. MusicQuizzer will use to generate questions. The exception is the `url` field,
  58. which is the _direct_ URL that MusicQuizzer will use to download the piece if
  59. it does not have a file with that name.
  60. Feel free to rename any of the pieces, delete them, add totally new ones, or
  61. change their information. This program is designed to be customizable.
  62. In the config file, you can also change the length of time each excerpt is
  63. played for, the time between each excerpt, and other things. If an attribute is
  64. not defined for a certain piece, the quizzer will not ask the question in that
  65. excerpt, but the question will remain for other pieces.