Mix Tape Calculator

Software Specification

1.0 Introduction

This program will assist the user in planning the organization of music to be recorded on a cassette tape or Compact Disc. Its primary purpose is to compute the total time for a list of songs in order to help the user determine a selection of songs that makes the best use of time available on the tape.  To accomplish this a graphical user interface is envisioned that allows the user to add or remove songs to the playlist with a "point and click" interaction.  In addition the program will allow reordering of songs on the playlist.

It is assumed the user is a music enthusiast familiar with tape recording audio cassettes from Compact Discs.  The user must know how to manipulate a common WIMP interface (windows, icons, menus, pointers).  It is assumed the user knows how to save playlists using the WinAmp© software.
 

Figure 1:  Tape Calculator Main Window
main window
 
 

2.0 Functional Requirements

2.1 The system will allow the user to select a file containing a list of songs to open.  The file will be in WinAmp© saved playlist format. (See section 6.1 below).
2.2 The system will also allow for "import" of song file in plain ascii text format. (See section 6.2).
2.3 When a file is opened the song titles in the file will appear in the Song Pool along with the song duration. 
2.4 Songs can be moved from the Song Pool to the Play List, or from the Play List back to the Song Pool. A song moved from one list to the other appears at the bottom of the list.
2.5 A song can be manually entered and added to the Song Pool.
2.6 The system will compute and display the total time of all the songs in the Play List and the time remaining on the tape.
2.7 The Play List can be saved to a text file (along with the total time used).
2.8 The desired tape length can be set to a user specified number of minutes.  If the desired length is less than the time on current playlist an error message is displayed. The initial default length is 45 minutes.
2.9 The system will allow the list in the Song Pool to be cleared.
2.10 The songs in the Play List can be moved up or down to create a user specified ordering.
2.11 Error Handling - The program may assume the input files are properly formatted and no validity checking is required. The program doesn't need to check validity of songs added manually.

3.0 Behavioral Requirements

3.1 When the application begins the main window will appear similar to Figure 1 but with the Song Pool and Play List initially empty.

3.2 The primary function afforded by the interface is moving songs from the Song Pool to the Play List.  This is accomplished by selecting a song with the mouse and then clicking the move button (">>").  See this storyboard for a step-by-step illustration. If there is not enough time remaining on the tape for the song to fit, an error message appears saying "Not enough remaining time for that song."

3.3 Menu Bar
The menu bar has available the following options:

File
    Open    
    Import
    Save
    Exit
Song
    Add
Options
    TapeLength
    Clear Pool
    Reorder


3.4 File -> Open
Selecting File -> Open will open a standard File Chooser Dialog as shown in Figure 2. The default file type will be ".m3u" for WinAmp files.  The contents of the selected file will appear in the Song Pool.  If songs already exist in the Song Pool, the new songs will be appended to the bottom of the list.

Figure 2: Open File Chooser Dialog
file chooser

3.5 File -> Import
Selecting File -> Import will open a standard File Chooser Dialog to enter the name of the desired text file. The contents of the selected file will appear in the Song Pool.  If songs already exist in the Song Pool, the new songs will be appended to the bottom of the list.  The format of imported files is shown in section 6.2.

3.6 File -> Save
Selecting  File -> Save will open a standard File Chooser Dialog similar to Figure 2.  The user may select or enter the name of the file where the current Play List will be saved.  The contents of the Play List will be stored as a text file in the format shown in Section 6.3.

3.7 File -> Exit
The Exit option terminates the application. Implementation note: Do not use System.exit(). Instead simply allow the application's main method to run to completion.

3.8 Song -> Add
Selecting the Add Song option presents a text entry dialog for the user to enter the time and title of an individual song. The song will be added to the bottom of the Song Pool.

Figure 4: Add Song Dialog
add song dialog

3.9 Options -> Tape Length
The user can enter a new value for the length of the audio tape (in minutes) using the Tape Length option.

Figure 5: Set Tape Length Dialog
tape length dialog

3.10 Options -> Clear
Selecting Clear will delete all the songs in the song pool (without confirmation).

3.11 Options -> Reorder
Selecting the Reorder option will present the Reorder Dialog shown in Figure 6.   All the songs in the current Play List will populate the reorder list. The user may place individual songs into a different ordering using the "move up" and "move down" buttons as shown in the sequence below.

Figure 6: Reorder Dialog

Step 1: The Reorder dialog appears with the songs in the current Play List.


Step 2: The user selects the song they desire to move to a new location. The selected song is highlighted.


Step 3: The user has clicked "move down" and the selected song now appears one spot lower in the list. The user may press "move down" as many consecutive times as desired without having to re-select the song. If the song is at the bottom of the list pressing "move down" has no affect.  The dialog works in a similar fashion for "move up."  Clicking the OK button closes the dialog and the reordered list is displayed in the Play List.

3.11 Console Interface
A simple text console-based user interface provides a primitive way to use the tape calculator.  It provides all the functionality except reordering (2.10).  The style of user interaction is shown in this sample console session.

4.0 Nonfunctional Requirements

4.1 Usability - The user must be able to move songs from the Song Pool to the Play List with a maximum of two mouse clicks.

5.0 Engineering Analysis

The user wants us to develop this application quickly and inexpensively and is willing to accept a solution with minimal "bullet proofing".  So we have decided to assume the user will be responsible for creating the input files in the proper format and for entering data in the input dialogs correctly.  The program will not do any data validation.

6.0 File Formats

6.1 WinAmp file format

#EXTM3U
#EXTINF:336,Where The Streets Have No Name
F:\Track01.cda
#EXTINF:278,I still Have not Found What I'm Looking for
F:\Track02.cda
#EXTINF:296,With or With out you
F:\Track03.cda
#EXTINF:272,Bullet the Blue Sky
F:\Track04.cda
#EXTINF:258,Running to stand still
F:\Track05.cda
#EXTINF:293,Red Hill Mining Town
F:\Track06.cda
#EXTINF:177,In God's Country
  See also this M3U description.

6.2 Import Text File Format

 6:47 feel so different
 4:47 three babies
 5:16 the emperor's new clothes
 3:35 black boys on mopeds
 5:10 nothing Compares 2U
 4:12 Jump in the river
 

6.3 Saved File format

PlayList created by Mix Tape Calculator

9:49 Freddie Freeloader
9:25 Flamenco Sketches
5:37 Blue in Green
11:35 All Blues

36:26


Document History
JD 9/30/2009 Modified Audio Tape Calculator Spec