lab12 - CS100M Lab Exercise 12 Segmenting a sound file If...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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

Ask a homework question - tutors are online