====================================================================== ===== COMP2720 ===== Semester 2, 2006 ===== Lab sheet ===== ====================================================================== Student name: Dean Dal Broi Student Uni ID: u4222206 Lab goup: Wed 10-12 Tutor: Peter Christen ---------------------------------------------------------------------- Lab number: 3 Date: 30/8/06 ====================================================================== Have downloaded all the required files for the lab. Moving onto part 1 Part 1. Q1. Have run the normalise function on the 2 required sound files to find that it increases the sound volume level slightly. This was evident as the sound wave was increased to the maximum level in mediatools sound viewer. Q2. However if I choose a 16 bit(2byte) sound file such as gotmail2.wav I find that the sound is clipped. However if I change the amplification variable to the following it will work for that sound: amplification = 127.0 / largest Q3. Have run the playBackward function on some sounds and have found that it works as expected. Q4. Have created the normaliseBackward function which call upon normailse and playBackward to achive its purpose. The function code is as follows: def normaliseBackward(filename): backwardsound = playBackward(filename) #reverse the sound normalise(backwardsound) #normalise the sound return backwardsound #return the sound Part 2. I approached this problem using a top down design. I knew the program would take a sound, a starting point and an end point. I first calculated my start and end samples from the given start and end points I then made an empty sound to the correct length using the start and end points. After that I set up a loop to copy the samples in the given sound that were between the start and end samples into the empty sound. I then simply played that sound (as required) and then returned it at the end of the function. Part 3. I created the sound collage function using both the normalise and playSection functions. I designed the function to take in 3 sounds , normalise them and then take snips from them using playSection which I renamed to getSection as I removed the 'Play' feature. Then all the sound snips were added to an empty sound using 3 separate loops. I then play that sound and got the function to return it. ======================================================================