Unformatted text preview: CS100M Lab Exercise 12 Segmenting a sound file If you have headphones, you can listen to the sound files in the lab. However, you can just write the code now and listen to the results later. Download the file Segment.m from the Lecture Examples page (Lecture 22). Read and run the function to make sure that you understand it. You will modify that function to “remove” the lull (silence) from the sound data (or store only sound data above a certain threshold) in the cell array. Also indicate on the plot the user-selected breakpoints and the beginning and end of each sound segment with a red line and a green line, respectively. (See the color version on-line.) 0.5 1 1.5 2 2.5 3 3.5 4 x 10 4-1-0.8-0.6-0.4-0.2 0.2 0.4 0.6 0.8 1 Enter n breakpoints left to right To do this, first reduce the “spikiness” of the data by writing and using the following function: function d = ReduceSpikes(data) % Replace each value in data (a vector of length n) with the average of % the values in the 5-point neighborhood and store the result in d.% the values in the 5-point neighborhood and store the result in d....
View Full Document
This lab report was uploaded on 02/15/2008 for the course CS 100 taught by Professor Fan/vanloan during the Fall '07 term at Cornell.
- Fall '07