Unformatted text preview: deltat = 1./sf; %determines the time step totalt = deltat:deltat:duration; %determines the total time of the sound file vecsnd = 0; %initializes the output for ndx = 1:length(vecf) vecsnd = vecsnd + sin(2.*pi.*vecf(ndx).*totalt); %generates the sound vector end largest = max(vecsnd); %finds the largest value in the vector vecsnd = vecsnd./largest; %gets the entire vector to be less than or equal to 1 vecsnd = vecsnd(:); %makes the vector vertical to be played like a sound end...
View Full Document
This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Tech.
- Spring '08