CS 110
Foundations of Computing through Digital Media

Denison

CS 110 Spring 2012 

Homework07: A Sound Editor

Part I Due: Monday, April 9th at 11pm


In Homework 07, you will create a GUI-based sound editor. In the description that follows, we will outline a basic set of required elements, but you are encouraged to be creative and to define other manipulations to make the program more complete and more interesting.

Part I: The Manipulation of Sounds

As we have learned in class, the Sound objects that we create in our programs are complex, aggregate objects that have, as part of their makeup, a large number of Sample objects in an ordered collection, and that these sample objects are themselves aggregate, and composed of sample values, including left and right stereo channels, as well as information that ties the sample back to the sound.

In the abstract, we can think of sounds as a list of integer samples, and it is easier to manipulate lists of integers. So to make the Sound Editor project more manageable, we break the problem into two parts:

Part I of this assignment separates the function types described above from the graphical user interface that presents the sound editor to the user. The deliverable for Part I is a main() function along with definitions of all of the functions described below. The main() function will interact with the user to get the information need to drive the testing of the sound manipulations and demonstrate their correct operation. You will be graded on both the manipulation functions and on the devising of your main() function and how well it demonstrates your work.

I-A: Converting between Representations

We require two conversion functions. One to go from a Sound object to a list of integers, and the other to go from a list of integers to a (newly created) Sound object.

I-B: Sound-motivated functions to manipulate lists of integer samples

The following list documents the set of required functions for the manipulation of the lists of integers for use as building blocks in our sound editor.

I-C: Driving the functions through their paces

Part of your grade for the Sound Lab Part I will be the demonstration of your functions. You should write a main() function that goes through and thoroughly demonstrates the correct operation of all of your sound functions, with multiple test cases for each function. Be sure to to test, for example, a merge where the first sound is shorter and a merge where the second sound is shorter.

If your main() function execution sequence depends on particular sounds in order to test correctly, you should inlcude a README file (simply a text file) with instructions on the appropriate way to run your main() function.

Submitting your lab

Please make sure that your lab07 directory has the following file: