From 05b4fbe27262b7c5f070c55c0087d9554b0e4311 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 9 Jun 2011 18:58:02 -0400 Subject: [PATCH] initial commit of text files --- .gitignore | 2 ++ LICENSE | 19 ++++++++++++++ README.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b49dc53 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# For the love of God, don't track the actual music piece files themselves. +pieces/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6572aa7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 by Ben Kurtovic + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3f3269a --- /dev/null +++ b/README.md @@ -0,0 +1,84 @@ +__MusicQuizzer__ (_musicquizzer_) is a Python program that can help you prepare +for any test that involves listening to excerpts of music pieces and answering +multiple choice questions about them. + +# Installation + +## Mac OS X + +Get [MacPorts](http://www.macports.org/install.php), if you don't have it. + +From Terminal (`/Applications/Utiliies/Terminal`), do: + + sudo port install python26 + sudo port install py26-game + +Next, download MusicQuizzer and uncompress it. Move the folder wherever you +want (keep its contents intact!) and double-click on `mac_osx.sh` to use the +quizzer. + +## Windows + +MusicQuizzer is written in Python, a language that does not come with Windows +by default. Download the latest version of Python 2.7.x +[here](http://python.org/download/) (_not_ Python 3). Use the default settings +during installation. + +Next, download and install pygame from +[here](http://pygame.org/ftp/pygame-1.9.2a0.win32-py2.7.msi). + +Finally, download MusicQuizzer and extract it wherever you want. To use, simply +double-click on the "musicquizzer" file inside (do not move or delete any of +the other files). + +## Linux (with apt-get) + +You should be on at least Python 2.7 (check with `python --version`), assuming +you keep your operating system up-to-date. + + git clone git://github.com/earwig/music-quizzer.git + cd music-quizzer + sudo apt-get install python-pygame python-tk + +Execute `python musicquizzer.py` from your terminal when you wish to use the +quizzer. + +# Usage + +The first time you start the program, it will download all of the 25 necessary +(default) music pieces to the `pieces` folder. This is a ~70 MB download. + +MusicQuizzer will present you with an answer sheet, containing four or five +multiple choice questions per piece (which are, of course, randomized every +time you begin a new quiz). Press `Start Quiz` to begin listening to the +excerpts. Each one is played for 30 seconds. You are then given five seconds of +rest, followed by the next piece. After all excerpts have been played, you +_cannot_ re-listen to them. Press `Submit Answers` to "hand in" your quiz and +view the results. + +# Modifying + +The music pieces are located in `pieces/`, in `.mp3` format. The file +`config.cfg` contains the information for each excerpt, like so: + + [10.mp3] + title: Der Erlkönig + composer: Franz Schubert + era: Romantic + genre: Lied + form: Through-composed + url: http://stuy.enschool.org/music/10_The_Erlking_Erlkonig.mp3 + +...and so-on. The section's header is the name of the file in `pieces/` (or +whatever directory you have chosen), and the fields hold the information that +MusicQuizzer will use to generate questions. The exception is the `url` field, +which is the _direct_ URL that MusicQuizzer will use to download the piece if +it does not have a file with that name. + +Feel free to rename any of the pieces, delete them, add totally new ones, or +change their information. This program is designed to be customizable. + +In the config file, you can also change the length of time each excerpt is +played for, the time between each excerpt, and other things. If an attribute is +not defined for a certain piece, the quizzer will not ask the question in that +excerpt, but the question will remain for other pieces.