Assignment 9: The Music Editor:   Da Capo al Fine
1 Level 1:   Basic repeating
2 Level 2:   Varied endings
3 Level 3:   Control
4 Evaluation
5 Grading standards
6.7

Assignment 9: The Music Editor: Da Capo al Fine

Due: by Wed 12/14 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 signup sheets outside Prof Lerner’s office.

We prefer you complete this assignment with your partner, but if you need to work on it on your own, contact Sam Berin in advance.

Most music is not just played straight through from beginning to end: many pieces involve repeating parts of the piece. In this assignment you will extend your music program to support such repeats.

There are three levels of extra credit described here. You can complete more of them for additional credit...providing they are all designed well and implemented properly.

1 Level 1: 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.

  1. You must enhance your program to support 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).1In other words...this assignment itself is da capo al fine of the whole music project. You can ignore the text view.

  2. 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.

2 Level 2: 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.

  1. Extend your support for repeats from Level 1 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.

3 Level 3: Control

  1. Extend your controller to allow creating these repeated sections, so that a user can create them through your GUI as the program is running. You do not need to support creating repeat sections while the piece is playing,2What would that even mean? but you do need to support playing them properly once they’ve been created. Additionally, your controller should not allow the user to create malformed repeats (e.g. overlapping or nested repeated sections).

4 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.

5 Grading standards

For this assignment, you will be graded on

You will receive 0%, 25%, 50%, 75%, or 100% of the available credit. We’re not going to provide fine-grained feedback here, due entirely to time constraints and supporting everyone who wants to complete the extra credit. Completing only Level 1 limits your grade to at most 50% of the credit; completing Levels 1 and 2 (or Levels 1 and 3) limits your grade to at most 75% credit; completing all three levels is required for 100% credit.

1In other words...this assignment itself is da capo al fine of the whole music project.

2What would that even mean?