Assignment 9: The Music Editor++
Due: by Wed 04/26 via a scheduled demo with instructors
There is no self-eval for this assignment, though you will still submit it on the handin server. For evaluation, you will schedule a 10-minute demo with one of the instructional staff. Available time slots will be posted on a Google document with a link on Piazza.
We prefer you complete this assignment with your partner, but if you need to work on it on your own, contact us in advance.
This assignment asks you to implement 4 sets of features for 4 tiers of extra credit. These tiers are mostly independent, i.e. you can choose to attempt any subset of them in any order. Each tier is all-or-none: either it works or it doesn’t. However there are points in each tier for designing well, in addition to working correctly.
1 Level 1: Tempo sensitivity
In this tier you will use the tempo of a composition to implement two features. Both features must work to get any credit for this level.
Use suitable keys to increase or decrease the tempo of a composition as it is playing.
Enhance the feature to add a note using the keyboard view. The duration of the added note should now depend on the length of time the mouse is pressed, using the currently set tempo of the song. The red line should advance giving the user a suitable cue of when to let go of the mouse. This means the duration of an added note will be sensitive to the tweaking of tempo above. This will effectively emulate adding new notes to an existing song “at its existing speed”.
2 Level 2: Practice mode
In this tier your program will serve as a tool to practice playing a given composition.
In this mode the program should halt at each beat, showing the notes and the keys to be pressed. The user must press the highlighted keys in order for the program to play those notes and advance to the next beat. You may handle sustained notes as repeated presses, similar to how you were adding notes earlier. The song should not advance until the correct keys have been pressed. You may design any combination of keyboard and mouse keys to allow pressing multiple keyboard keys at a given beat.
It should be possible to revert to the original modes of playing the song continuously or manually advancing using the arrow keys.
3 Level 3: Basic Repeating
At its simplest, a repeated section of music is just that: played through once, and then played though again. However, that doesn’t mean the notes of that repeated section are copied and pasted twice into the musical score. Instead, a repeat sign indicates the start and end of sections of music to be repeated. For example,
If no start-of-repeat symbol is explicitly used, then implicitly the start of repetition is the start of the piece.
Other repetition indicators include “Da capo al fine”, Italian for “from the head until the end”, or more colloquially, “from the top”, and several others. You can see many of them here.
In real music, multiple repeated sections cannot overlap, nor can they nest. You do not need to build support for such bizarre scenarios. See the last image below for an example of a piece with multiple repeated sections.
You must enhance your program to support simple repeats. This will involve going back to your model and extending it somehow, and then modifying your MIDI and GUI views to extend them as well (so that the repeats are visible in the GUI and are heard when the music is played, the red line stays in synch with playback, etc). You can ignore the text view.
You must support multiple repeat sections in your piece, meaning you cannot simply hard-code support for at most one go-backward and one resume-from-here spot in your piece—
your design must be more general.
4 Level 4: Varied endings
More complicated repeats involve multiple endings. The first time through a repeat, the first ending is played, then playback resumes at the beginning of the repeat, continues until the beginning of the first ending, and jumps to the beginning of the second ending. If there are more than two endings, playback jumps back to the beginning again, and skips to the appropriate ending.
Here is a more sophisticated example, including a repeat-to-the-beginning, and explicit repeat-between-bars, and a repeat-with-multiple-endings. Note that again, multiple repeat sections do not overlap.
Extend your support for repeats from Level 3 to include these more refined endings. You must support arbitrarily many endings, not just precisely 2. Again the red line, playback, and scrolling must work with the new functionality.
5 Evaluation
You will demo your work to the instructional staff. The moving red line, playback and scrolling should all work properly.
You will explain the architectural changes you made to the instructor or TA who is grading you.
6 Grading standards
For this assignment, you will be graded on
the cleanliness of your design,
the flexibility of your approach, and
the quality and completeness of your final submission.
For each level you will get 25% of the available credit. Within each level a correct implementation and a reasonable design are equally weighted.