You are on page 1of 3

JERICOH JHON V.

FUERTE
BS ECE IV
1.) music=wavread('C:\Users\ALLAN\Documents\lovely.wav');
2.) >> fs

fs =

11025

3.) soundsc(music,,fs)
4.) plot(t,music(1:200));

xlabel('time (sec)');
ylabel('relative signal stregth');

5.) fNorm = 250 / (fs/2);


[b,a] = butter(10, fNorm, 'low');
musicLow = filtfilt(b, a, music);
freqz(b,a,128,fs);
sound(musicLow,fs)

6.) fNorm = 3000 / (fs/2);


[b, a] = butter(5, fNorm, 'high');
musicHigh = filtfilt(b, a, music);
freqz(b,a,128,fs);
sound(musicHigh,fs)

7.) left=music(:,1);
right=music(:,1);
time=(1/11025)*length(left);
t=linspace(0,time,length(left));
plot(t,left)
xlabel('time (sec)');
ylabel('Signal strength')
left=music(:,1);
right=music(:,1);
time=(1/11025)*length(right);
t=linspace(0,time,length(right));
plot(t,right)
xlabel('time (sec)');
ylabel('Signal strength')

8.) >> left=music(:,1);


soundsc(left,fs)

9.) y=[1;2;3;4;5];
y2=flipud(y);
left2=flipud(left);
soundsc(left2,fs);

10.) soundsc(music,fs*2)

11.) a = sin(2*pi*220.00*(0:0.0125:5));
b = sin(2*pi*246.94*(0:0.0125:5));
c = sin(2*pi*261.62*(0:0.0125:5));
d = sin(2*pi*293.66*(0:0.0125:5));
e = sin(2*pi*329.62*(0:0.0125:5));
f = sin(2*pi*349.22*(0:0.0125:5));
g= sin(2*pi*391.99*(0:0.0125:5));
cprime= sin(2*pi*277.18*(0:0.0125:5));
dprime= sin(2*pi*311.12*(0:0.0125:5));
gprime= sin(2*pi*415.30*(0:0.0125:5));
fprime= sin(2*pi*369.99*(0:0.0125:5));
Line1=[g,a,b,c,f,e,d,cprime,dprime,gprime];
Line2=[d,c,e,f,fprime,e,dprime,a,b,c];
Notes=[Line1,Line2];
sound(Notes)

5.) plot(music), title('Entire waveform');

smallRange = 10000:10000+floor(fs/200);
plot(smallRange, music(smallRange)), title('200 milliseconds');

You might also like